Source Code Cross Referenced for XDivision.java in  » Swing-Library » wings3 » org » wingx » 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 » wings3 » org.wingx 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.wingx;
002:
003:        import java.awt.Color;
004:        import org.wings.*;
005:        import org.wings.style.CSSAttributeSet;
006:        import org.wings.style.CSSProperty;
007:        import org.wings.style.CSSStyle;
008:        import org.wings.style.CSSStyleSheet;
009:        import org.wings.style.Selector;
010:        import org.wings.style.Style;
011:
012:        /**
013:         * Created by IntelliJ IDEA.
014:         * User: hengels
015:         * Date: Aug 27, 2006
016:         * Time: 9:58:56 PM
017:         * To change this template use File | Settings | File Templates.
018:         */
019:        public class XDivision extends SContainer implements 
020:                LowLevelEventListener {
021:            String title;
022:            SIcon icon;
023:
024:            /**
025:             * Is the XDivision shaded?
026:             */
027:            boolean shaded;
028:
029:            /**
030:             * Is the title clickable? Default is false.
031:             */
032:            protected boolean isTitleClickable = false;
033:
034:            public static final Selector SELECTOR_TITLE = new Selector(
035:                    "xdiv.title");
036:
037:            /**
038:             * Creates a XDivision instance with the specified LayoutManager
039:             * @param l the LayoutManager
040:             */
041:            public XDivision(SLayoutManager l) {
042:                super (l);
043:            }
044:
045:            /**
046:             * Creates a XDivision instance
047:             */
048:            public XDivision() {
049:            }
050:
051:            /**
052:             * Returns the title of the XDivision.
053:             * @return String the title
054:             */
055:            public String getTitle() {
056:                return title;
057:            }
058:
059:            /**
060:             * Sets the title of the XDivision.
061:             * @param title the title
062:             */
063:            public void setTitle(String title) {
064:                reloadIfChange(this .title, title);
065:                this .title = title;
066:            }
067:
068:            /**
069:             * Sets the title-font of the XDivision.
070:             * @param titleFont the font for the title
071:             */
072:            public void setTitleFont(org.wings.SFont titleFont) {
073:                CSSAttributeSet attributes = CSSStyleSheet
074:                        .getAttributes(titleFont);
075:                Style style = getDynamicStyle(SELECTOR_TITLE);
076:                if (style == null) {
077:                    addDynamicStyle(new CSSStyle(SELECTOR_TITLE, attributes));
078:                } else {
079:                    style.remove(CSSProperty.FONT);
080:                    style.remove(CSSProperty.FONT_FAMILY);
081:                    style.remove(CSSProperty.FONT_SIZE);
082:                    style.remove(CSSProperty.FONT_STYLE);
083:                    style.remove(CSSProperty.FONT_WEIGHT);
084:                    style.putAll(attributes);
085:                }
086:            }
087:
088:            /**
089:             * Returns the title-font of the XDivision.
090:             * @return SFont the font for the title
091:             */
092:            public SFont getTitleFont() {
093:                return dynamicStyles == null
094:                        || dynamicStyles.get(SELECTOR_TITLE) == null ? null
095:                        : CSSStyleSheet.getFont((CSSAttributeSet) dynamicStyles
096:                                .get(SELECTOR_TITLE));
097:            }
098:
099:            /**
100:             * Sets the title-color of the XDivision.
101:             * @param titleColor the color for the title
102:             */
103:            public void setTitleColor(Color titleColor) {
104:                setAttribute(SELECTOR_TITLE, CSSProperty.COLOR, CSSStyleSheet
105:                        .getAttribute(titleColor));
106:            }
107:
108:            /**
109:             * Returns the title-color of the XDivision.
110:             * @return titleColor the color for the title
111:             */
112:            public Color getTitleColor() {
113:                return dynamicStyles == null
114:                        || dynamicStyles.get(SELECTOR_TITLE) == null ? null
115:                        : CSSStyleSheet
116:                                .getForeground((CSSAttributeSet) dynamicStyles
117:                                        .get(SELECTOR_TITLE));
118:            }
119:
120:            /**
121:             * Determines whether or not the title is clickable.
122:             * @param clickable true if the title is clickable
123:             */
124:            public void setTitleClickable(boolean clickable) {
125:                this .isTitleClickable = clickable;
126:            }
127:
128:            /**
129:             * Returns true if the title is clickable.
130:             * @return boolean true if the title is clickable
131:             */
132:            public boolean isTitleClickable() {
133:                return this .isTitleClickable;
134:            }
135:
136:            public SIcon getIcon() {
137:                return icon;
138:            }
139:
140:            public void setIcon(SIcon icon) {
141:                reloadIfChange(this .icon, icon);
142:                this .icon = icon;
143:            }
144:
145:            /**
146:             * Returns true if the XDivision is shaded.
147:             * @return boolean true if the XDivision is shaded
148:             */
149:            public boolean isShaded() {
150:                return shaded;
151:            }
152:
153:            /** 
154:             * Determines whether or not the XDivision is shaded.
155:             * @param shaded true if the XDivision is shaded
156:             */
157:            public void setShaded(boolean shaded) {
158:                reloadIfChange(this .shaded, shaded);
159:                this .shaded = shaded;
160:            }
161:
162:            public void processLowLevelEvent(String name, String[] values) {
163:                if (values.length == 1 && "t".equals(values[0])) {
164:                    shaded = !shaded;
165:                    reload();
166:                }
167:
168:                /*
169:                TODO: first focusable component
170:                if (!shaded && getComponentCount() > 0)
171:                    getComponent(0).requestFocus();
172:                else
173:                    requestFocus();
174:                 */
175:            }
176:
177:            public void fireIntermediateEvents() {
178:            }
179:
180:            public boolean isEpochCheckEnabled() {
181:                return false;
182:            }
183:
184:            @Override
185:            protected boolean isShowingChildren() {
186:                return !shaded;
187:            }
188:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.