Source Code Cross Referenced for TabInfo.java in  » XML-UI » JAXX » jaxx » runtime » swing » 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 » XML UI » JAXX » jaxx.runtime.swing 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2006 Ethan Nicholas. All rights reserved.
003:         * Use is subject to license terms.
004:         */
005:        package jaxx.runtime.swing;
006:
007:        import java.awt.*;
008:        import java.beans.*;
009:        import javax.swing.*;
010:        import javax.swing.event.*;
011:
012:        public class TabInfo {
013:            public static String BACKGROUND_PROPERTY = "background";
014:            public static String DISABLED_ICON_PROPERTY = "disabledIcon";
015:            public static String DISPLAYED_MNEMONIC_INDEX_PROPERTY = "displayedMnemonicIndex";
016:            public static String ENABLED_PROPERTY = "enabled";
017:            public static String FOREGROUND_PROPERTY = "foreground";
018:            public static String ICON_PROPERTY = "icon";
019:            public static String MNEMONIC_PROPERTY = "mnemonic";
020:            public static String TITLE_PROPERTY = "title";
021:            public static String TOOL_TIP_TEXT_PROPERTY = "toolTipText";
022:
023:            private String id;
024:            private Color background;
025:            private Icon disabledIcon;
026:            private int displayedMnemonicIndex = -1;
027:            private boolean enabled = true;
028:            private Color foreground;
029:            private Icon icon;
030:            private int mnemonic = -1;
031:            private String title;
032:            private String toolTipText;
033:
034:            private PropertyChangeSupport propertyChangeSupport;
035:
036:            public TabInfo() {
037:            }
038:
039:            public TabInfo(String id) {
040:                this .id = id;
041:            }
042:
043:            public String getId() {
044:                return id;
045:            }
046:
047:            public Color getBackground() {
048:                return background;
049:            }
050:
051:            public void setBackground(Color background) {
052:                Color oldValue = this .background;
053:                this .background = background;
054:                firePropertyChange(BACKGROUND_PROPERTY, oldValue, background);
055:            }
056:
057:            public Icon getDisabledIcon() {
058:                return disabledIcon;
059:            }
060:
061:            public void setDisabledIcon(Icon disabledIcon) {
062:                Icon oldValue = this .disabledIcon;
063:                this .disabledIcon = disabledIcon;
064:                firePropertyChange(DISABLED_ICON_PROPERTY, oldValue,
065:                        disabledIcon);
066:            }
067:
068:            public int getDisplayedMnemonicIndex() {
069:                return displayedMnemonicIndex;
070:            }
071:
072:            public void setDisplayedMnemonicIndex(int displayedMnemonicIndex) {
073:                int oldValue = this .displayedMnemonicIndex;
074:                this .displayedMnemonicIndex = displayedMnemonicIndex;
075:                firePropertyChange(DISPLAYED_MNEMONIC_INDEX_PROPERTY,
076:                        new Integer(oldValue), new Integer(
077:                                displayedMnemonicIndex));
078:            }
079:
080:            public boolean isEnabled() {
081:                return enabled;
082:            }
083:
084:            public void setEnabled(boolean enabled) {
085:                boolean oldValue = this .enabled;
086:                this .enabled = enabled;
087:                firePropertyChange(ENABLED_PROPERTY, new Boolean(oldValue),
088:                        new Boolean(enabled));
089:            }
090:
091:            public Color getForeground() {
092:                return foreground;
093:            }
094:
095:            public void setForeground(Color foreground) {
096:                Color oldValue = this .foreground;
097:                this .foreground = foreground;
098:                firePropertyChange(FOREGROUND_PROPERTY, oldValue, foreground);
099:            }
100:
101:            public Icon getIcon() {
102:                return icon;
103:            }
104:
105:            public void setIcon(Icon icon) {
106:                Icon oldValue = this .icon;
107:                this .icon = icon;
108:                firePropertyChange(ICON_PROPERTY, oldValue, icon);
109:            }
110:
111:            public int getMnemonic() {
112:                return mnemonic;
113:            }
114:
115:            public void setMnemonic(int mnemonic) {
116:                int oldValue = this .mnemonic;
117:                this .mnemonic = mnemonic;
118:                firePropertyChange(MNEMONIC_PROPERTY, new Integer(oldValue),
119:                        new Integer(mnemonic));
120:            }
121:
122:            public String getTitle() {
123:                return title;
124:            }
125:
126:            public void setTitle(String title) {
127:                String oldValue = this .title;
128:                this .title = title;
129:                firePropertyChange(TITLE_PROPERTY, oldValue, title);
130:            }
131:
132:            public String getToolTipText() {
133:                return toolTipText;
134:            }
135:
136:            public void setToolTipText(String toolTipText) {
137:                String oldValue = this .toolTipText;
138:                this .toolTipText = toolTipText;
139:                firePropertyChange(TOOL_TIP_TEXT_PROPERTY, oldValue,
140:                        toolTipText);
141:            }
142:
143:            private PropertyChangeSupport getPropertyChangeSupport() {
144:                if (propertyChangeSupport == null)
145:                    propertyChangeSupport = new SwingPropertyChangeSupport(this );
146:                return propertyChangeSupport;
147:            }
148:
149:            public void addPropertyChangeListener(
150:                    PropertyChangeListener listener) {
151:                getPropertyChangeSupport().addPropertyChangeListener(listener);
152:            }
153:
154:            public void addPropertyChangeListener(String property,
155:                    PropertyChangeListener listener) {
156:                getPropertyChangeSupport().addPropertyChangeListener(property,
157:                        listener);
158:            }
159:
160:            public void removePropertyChangeListener(
161:                    PropertyChangeListener listener) {
162:                getPropertyChangeSupport().removePropertyChangeListener(
163:                        listener);
164:            }
165:
166:            public void removePropertyChangeListener(String property,
167:                    PropertyChangeListener listener) {
168:                getPropertyChangeSupport().removePropertyChangeListener(
169:                        property, listener);
170:            }
171:
172:            protected void firePropertyChange(String propertyName,
173:                    Object oldValue, Object newValue) {
174:                if (propertyChangeSupport != null)
175:                    getPropertyChangeSupport().firePropertyChange(propertyName,
176:                            oldValue, newValue);
177:            }
178:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.