Source Code Cross Referenced for ShortcutPrefixActiveEvent.java in  » Swing-Library » jEdit » org » gjt » sp » jedit » gui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » jEdit » org.gjt.sp.jedit.gui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  ShortcutPrefixActiveEvent.java - Event fired when jEdit starts and stops
003:         *  listening for shortcut completions
004:         *  :tabSize=8:indentSize=8:noTabs=false:
005:         *  :folding=explicit:collapseFolds=1:
006:         *
007:         *  Copyright (C) 2005 Jeffrey Hoyt
008:         *
009:         *  This program is free software; you can redistribute it and/or
010:         *  modify it under the terms of the GNU General Public License
011:         *  as published by the Free Software Foundation; either version 2
012:         *  of the License, or any later version.
013:         *
014:         *  This program is distributed in the hope that it will be useful,
015:         *  but WITHOUT ANY WARRANTY; without even the implied warranty of
016:         *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
017:         *  GNU General Public License for more details.
018:         *
019:         *  You should have received a copy of the GNU General Public License
020:         *  along with this program; if not, write to the Free Software
021:         *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
022:         */
023:        package org.gjt.sp.jedit.gui;
024:
025:        //{{{ Imports
026:        import java.util.Hashtable;
027:
028:        import javax.swing.event.ChangeEvent;
029:        import javax.swing.event.ChangeListener;
030:        import javax.swing.event.EventListenerList;
031:
032:        import org.gjt.sp.util.Log;
033:
034:        //}}}
035:
036:        /**
037:         *  Description of the Class
038:         *
039:         *@author     jchoyt
040:         *@created    December 17, 2005
041:         */
042:        public class ShortcutPrefixActiveEvent extends ChangeEvent {
043:
044:            /**
045:             * Description of the Field
046:             */
047:            protected Hashtable bindings;
048:            /**
049:             * Description of the Field
050:             */
051:            protected boolean active;
052:
053:            /**
054:             * Description of the Field
055:             */
056:            protected static EventListenerList listenerList = new EventListenerList();
057:
058:            //{{{  Constructor
059:            /**
060:             * Constructor for the ShortcutPrefixActiveEvent object
061:             *
062:             * @param bindings Description of the Parameter
063:             * @param active   Description of the Parameter
064:             */
065:            public ShortcutPrefixActiveEvent(Hashtable bindings, boolean active) {
066:                super (new Object());
067:                this .bindings = bindings;
068:                this .active = active;
069:            } //}}}
070:
071:            //{{{ addChangeEventListener() method
072:            /**
073:             * Adds a feature to the ChangeEventListener attribute of the
074:             * ShortcutPrefixActiveEvent class
075:             *
076:             * @param l The feature to be added to the ChangeEventListener attribute
077:             */
078:            public static void addChangeEventListener(ChangeListener l) {
079:                listenerList.add(ChangeListener.class, l);
080:                Log.log(Log.DEBUG, ShortcutPrefixActiveEvent.class,
081:                        "Listener added.  "
082:                                + listenerList.getListenerList().length
083:                                + " left.");
084:            }//}}}
085:
086:            //{{{ removeChangeEventListener() method
087:            /**
088:             * Description of the Method
089:             *
090:             * @param l Description of the Parameter
091:             */
092:            public static void removeChangeEventListener(ChangeListener l) {
093:                listenerList.remove(ChangeListener.class, l);
094:                Log.log(Log.DEBUG, ShortcutPrefixActiveEvent.class,
095:                        "Listener removed.  "
096:                                + listenerList.getListenerList().length
097:                                + " left.");
098:            }//}}}
099:
100:            //{{{ firePrefixStateChange() method
101:            /**
102:             * Description of the Method
103:             *
104:             * @param bindings                       Description of the Parameter
105:             * @param listeningForShortcutCompletion Description of the Parameter
106:             */
107:            protected static void firePrefixStateChange(Hashtable bindings,
108:                    boolean listeningForShortcutCompletion) {
109:                //Log.log( Log.DEBUG, ShortcutPrefixActiveEvent.class, "firePrefixStateChange() called, listening? " + listeningForShortcutCompletion );
110:                // Guaranteed to return a non-null array
111:                Object[] listeners = listenerList.getListenerList();
112:                //Log.log( Log.DEBUG, ShortcutPrefixActiveEvent.class, listeners.length + " listeners." );
113:                // Process the listeners last to first, notifying
114:                // those that are interested in this event
115:                for (int i = listeners.length - 2; i >= 0; i -= 2) {
116:                    //Log.log( Log.DEBUG, ShortcutPrefixActiveEvent.class, "firePrefixStateChange() called, listening? " + listeningForShortcutCompletion );
117:                    ChangeEvent event = new ShortcutPrefixActiveEvent(bindings,
118:                            listeningForShortcutCompletion);
119:                    ((ChangeListener) listeners[i + 1]).stateChanged(event);
120:                }
121:            }//}}}
122:
123:            //{{{  getBindings()
124:            /**
125:             * Gets the bindings attribute of the ShortcutPrefixActiveEvent object
126:             *
127:             * @return The bindings value
128:             */
129:            public Hashtable getBindings() {
130:                return bindings;
131:            }//}}}
132:
133:            //{{{  getActive()
134:            /**
135:             * Gets the active attribute of the ShortcutPrefixActiveEvent object
136:             *
137:             * @return The active value
138:             */
139:            public boolean getActive() {
140:                return active;
141:            }
142:            //}}}
143:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.