Source Code Cross Referenced for TextPanelEvent.java in  » Internationalization-Localization » icu4j » com » ibm » richtext » textpanel » 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 » Internationalization Localization » icu4j » com.ibm.richtext.textpanel 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * (C) Copyright IBM Corp. 1998-2004.  All Rights Reserved.
003:         *
004:         * The program is provided "as is" without any warranty express or
005:         * implied, including the warranty of non-infringement and the implied
006:         * warranties of merchantibility and fitness for a particular purpose.
007:         * IBM will not be liable for any damages suffered by you as a result
008:         * of using the Program. In no event will IBM be liable for any
009:         * special, indirect or consequential damages or lost profits even if
010:         * IBM has been advised of the possibility of their occurrence. IBM
011:         * will not be liable for any third party claims against you.
012:         */
013:        package com.ibm.richtext.textpanel;
014:
015:        import java.util.EventObject;
016:
017:        /**
018:         * TextPanelEvent is generated by an MTextPanel to notify listeners
019:         * of changes.  To receive TextPanelEvents from an MTextPanel, clients
020:         * must implement TextPanelListener and add themselves to the MTextPanel's
021:         * list of listeners.
022:         * <p>
023:         * Some event types are special cases of others.  This is intentional - it
024:         * allows notifications to be sent less often in certain common cases.  For
025:         * example, a change in the selection range generates a SELECTION_RANGE_CHANGED 
026:         * event.  This is a very common occurrance, and if many clients listen for this
027:         * event, there may be a significant performance penalty.  By
028:         * listening for a more specialized event (such as SELECTION_EMPTY_CHANGED), clients
029:         * can reduce the number of notifications sent.
030:         * 
031:         * @see MTextPanel
032:         * @see TextPanelListener
033:         */
034:        public final class TextPanelEvent extends EventObject {
035:
036:            static final String COPYRIGHT = "(C) Copyright IBM Corp. 1998-1999 - All Rights Reserved";
037:
038:            /**
039:             * The lower bound of TextPanelEvent ID's.
040:             */
041:            public static final int TEXT_PANEL_FIRST = 11;
042:
043:            /**
044:             * Events of this type indicate a change in the selection range.
045:             * This occurs quite often.  Most clients do not need to be 
046:             * notified every time the selection range changes.
047:             */
048:            public static final int SELECTION_RANGE_CHANGED = 11;
049:
050:            /**
051:             * Events of this type are sent when the selection range becomes
052:             * 0-length after not being 0-length, or vice versa.  This event
053:             * is a special case of SELECTION_RANGE_CHANGED.
054:             */
055:            public static final int SELECTION_EMPTY_CHANGED = 12;
056:
057:            /**
058:             * Events of this type indicate that the text in the TextPanel changed.
059:             * This type of event occurs often.
060:             */
061:            public static final int TEXT_CHANGED = 13;
062:
063:            /**
064:             * Events of this type are sent when the styles in the current
065:             * selection change.
066:             */
067:            public static final int SELECTION_STYLES_CHANGED = 14;
068:
069:            /**
070:             * Events of this type are sent when the undo/redo state changes.
071:             */
072:            public static final int UNDO_STATE_CHANGED = 15;
073:
074:            /**
075:             * Events of this type are sent when the clipboard state changes.
076:             */
077:            public static final int CLIPBOARD_CHANGED = 16;
078:
079:            /**
080:             * Events of this type are sent when 
081:             * the wrap width of the text changes.
082:             */
083:            public static final int FORMAT_WIDTH_CHANGED = 17;
084:
085:            /**
086:             * Events of this type are sent when the key remap changes.
087:             */
088:            public static final int KEYREMAP_CHANGED = 18;
089:
090:            /**
091:             * The upper bound of TextPanelEvent ID's.
092:             */
093:            public static final int TEXT_PANEL_LAST = 18;
094:
095:            private int fId;
096:
097:            /**
098:             * Create a new TextPanelEvent.
099:             * @param source the MTextPanel which generated the event
100:             * @param id the ID for this event.  Must be within
101:             * [TEXT_PANEL_FIRST, TEXT_PANEL_LAST].
102:             */
103:            TextPanelEvent(MTextPanel source, int id) {
104:
105:                super (source);
106:                if (id < TEXT_PANEL_FIRST || id > TEXT_PANEL_LAST) {
107:                    throw new IllegalArgumentException("id out of range");
108:                }
109:                fId = id;
110:            }
111:
112:            /**
113:             * Return the event ID for this event.  Event ID's are
114:             * one of the class constants.
115:             * @return the event ID for this event
116:             */
117:            public int getID() {
118:
119:                return fId;
120:            }
121:
122:            public String toString() {
123:
124:                String desc = null;
125:
126:                switch (fId) {
127:                case SELECTION_RANGE_CHANGED:
128:                    desc = "SELECTION_RANGE_CHANGED";
129:                    break;
130:                case SELECTION_EMPTY_CHANGED:
131:                    desc = "SELECTION_EMPTY_CHANGED";
132:                    break;
133:                case TEXT_CHANGED:
134:                    desc = "TEXT_CHANGED";
135:                    break;
136:                case SELECTION_STYLES_CHANGED:
137:                    desc = "SELECTION_STYLES_CHANGED";
138:                    break;
139:                case UNDO_STATE_CHANGED:
140:                    desc = "UNDO_STATE_CHANGED";
141:                    break;
142:                case CLIPBOARD_CHANGED:
143:                    desc = "CLIPBOARD_CHANGED";
144:                    break;
145:                case FORMAT_WIDTH_CHANGED:
146:                    desc = "FORMAT_WIDTH_CHANGED";
147:                    break;
148:                case KEYREMAP_CHANGED:
149:                    desc = "KEYREMAP_CHANGED";
150:                    break;
151:                }
152:                return "[TextPanelEvent:" + desc + "]";
153:            }
154:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.