Source Code Cross Referenced for SInternalFrame.java in  » Swing-Library » Swinglets » com » javelin » swinglets » 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 » Swinglets » com.javelin.swinglets 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright Javelin Software, All rights reserved.
003:         */
004:
005:        package com.javelin.swinglets;
006:
007:        import java.awt.*;
008:        import java.awt.event.*;
009:        import java.io.*;
010:        import java.util.*;
011:
012:        import com.javelin.swinglets.plaf.*;
013:        import com.javelin.swinglets.theme.*;
014:        import com.javelin.swinglets.event.*;
015:
016:        /**
017:         * A InternalFrame is a page that behaves like a Frame within 
018:         * a Frame.
019:         * 
020:         * @author Robin Sharp
021:         */
022:
023:        public class SInternalFrame extends SContainer {
024:            /**
025:             * Construct a fully qualified SInternalFrame. 
026:             */
027:            public SInternalFrame() {
028:            }
029:
030:            /**
031:             * Returns the name of the L&F class that renders this component.
032:             */
033:            public Class getUIClass() {
034:                return SInternalFrame.class;
035:            }
036:
037:            /** 
038:             * Set that this SInternalFrame can be closed by some user action.
039:             */
040:            public SInternalFrame setCloseable(boolean closeable) {
041:                firePropertyChange("closeable", this .closeable,
042:                        this .closeable = closeable);
043:                return this ;
044:            }
045:
046:            /** 
047:             * Returns whether this SInternalFrame be closed. 
048:             */
049:            public boolean isCloseable() {
050:                return closeable;
051:            }
052:
053:            /** 
054:             * Returns whether this SInternalFrame is currently closed. 
055:             */
056:            public boolean isClosed() {
057:                return closed;
058:            }
059:
060:            /** 
061:             * Calling this method with a value of <code>true</code> to close
062:             * the frame. 
063:             */
064:            public SInternalFrame setClosed(boolean closed) {
065:                firePropertyChange("closed", this .closed, this .closed = closed);
066:                return this ;
067:            }
068:
069:            /** 
070:             * Set that the SInternalFrame can be resized by some user action.
071:             */
072:            public SInternalFrame setResizable(boolean resizable) {
073:                firePropertyChange("resizable", this .resizable,
074:                        this .resizable = resizable);
075:                return this ;
076:            }
077:
078:            /** 
079:             * Returns whether the SInternalFrame can be resized by some user action.
080:             */
081:            public boolean isResizable() {
082:                // don't allow resizing when maximized.
083:                return maximized ? false : resizable;
084:            }
085:
086:            /** 
087:             * Set that the SInternalFrame can be made an icon by some user action. 
088:             */
089:            public SInternalFrame setIconizable(boolean iconizable) {
090:                firePropertyChange("iconizable", this .iconizable,
091:                        this .iconizable = iconizable);
092:                return this ;
093:            }
094:
095:            /** 
096:             * Returns whether the SInternalFrame can be iconified by some user action.
097:             */
098:            public boolean isIconizable() {
099:                return iconizable;
100:            }
101:
102:            /** 
103:             * Returns whether the SInternalFrame is currently iconified.
104:             */
105:            public boolean isIconized() {
106:                return iconized;
107:            }
108:
109:            /** 
110:             * Iconizes and deconizes the frame.
111:             */
112:            public SInternalFrame setIconized(boolean iconized) {
113:                firePropertyChange("iconized", this .iconized,
114:                        this .iconized = iconized);
115:                return this ;
116:            }
117:
118:            /** 
119:             * Set that the SInternalFrame can be maximized by some user action.
120:             */
121:            public SInternalFrame setMaximizable(boolean maximizable) {
122:                firePropertyChange("maximizable", this .maximizable,
123:                        this .maximizable = maximizable);
124:                return this ;
125:            }
126:
127:            /** 
128:             * Returns whether the SInternalFrame can be maximized by some user action.
129:             */
130:            public boolean isMaximizable() {
131:                return maximizable;
132:            }
133:
134:            /** 
135:             * Returns whether the SInternalFrame is currently maximized.
136:             */
137:            public boolean isMaximized() {
138:                return maximized;
139:            }
140:
141:            /**
142:             * Maximizes and restores the frame. 
143:             */
144:            public SInternalFrame setMaximized(boolean maximized) {
145:                firePropertyChange("maximized", this .maximized,
146:                        this .maximized = maximized);
147:                return this ;
148:            }
149:
150:            /** 
151:             * Sets an image to be displayed in the titlebar of the frame (usually
152:             * in the top-left corner).
153:             * Passing null to this function is valid, but the Theme can choose the
154:             * appropriate icon
155:             */
156:            public SInternalFrame setFrameIcon(SIcon frameIcon) {
157:                firePropertyChange("frameIcon", this .frameIcon,
158:                        this .frameIcon = frameIcon);
159:                return this ;
160:            }
161:
162:            /** 
163:             * Returns the image displayed in the title bar of the frame (usually
164:             * in the top-left corner).
165:             */
166:            public SIcon getFrameIcon() {
167:                return frameIcon;
168:            }
169:
170:            /**
171:             * Set the title of the Page.
172:             */
173:            public SInternalFrame setTitle(String title) {
174:                firePropertyChange("title", this .title, this .title = title);
175:                return this ;
176:            }
177:
178:            /**
179:             * Get the title of the Page.
180:             */
181:            public String getTitle() {
182:                return title;
183:            }
184:
185:            /**
186:             * Sets the desktop SIcon associated with this SInternalFrame.
187:             */
188:            public SInternalFrame setDesktopIcon(SIcon desktopIcon) {
189:                firePropertyChange("desktopIcon", this .desktopIcon,
190:                        this .desktopIcon = desktopIcon);
191:                return this ;
192:            }
193:
194:            /** 
195:             * Returns the SIcon
196:             */
197:            public SIcon getDesktopIcon() {
198:                return desktopIcon;
199:            }
200:
201:            /**
202:             * Get the collapsed title of the Page.
203:             */
204:            public String getDesktopTitle() {
205:                return desktopTitle;
206:            }
207:
208:            /**
209:             * Set the title of the Page when it is collapsed.
210:             */
211:            public SInternalFrame setDesktopTitle(String desktopTitle) {
212:                firePropertyChange("desktopTitle", this .desktopTitle,
213:                        this .desktopTitle = desktopTitle);
214:                return this ;
215:            }
216:
217:            // DISPATCH & EVENTS //////////////////////////////////////////////////////
218:
219:            /** 
220:             * Process an AWTEvent
221:             */
222:            protected void processEvent(AWTEvent event) {
223:                if (event instanceof  FormEvent) {
224:                    String buttonType = ((FormEvent) event)
225:                            .getParameter("_BUTTON");
226:                    if (STheme.FRAME_MIN.equals(buttonType)) {
227:                        setIconized(true);
228:                    } else if (STheme.FRAME_MAX.equals(buttonType)) {
229:                        setMaximized(true);
230:                    } else if (STheme.FRAME_RESTORE.equals(buttonType)) {
231:                        setMaximized(false);
232:                    } else if (STheme.FRAME_DESKTOP.equals(buttonType)) {
233:                        setIconized(false);
234:                    } else if (STheme.FRAME_CLOSE.equals(buttonType)) {
235:                        setVisible(false);
236:                    }
237:                }
238:            }
239:
240:            /**
241:             * Adds the specified window listener to receive window events from
242:             * this window.
243:             */
244:            public synchronized SInternalFrame addWindowListener(
245:                    WindowListener listener) {
246:                getUI().addListener(listener);
247:                return this ;
248:            }
249:
250:            /**
251:             * Removes the specified window listener so that it no longer
252:             * receives window events from this window.
253:             */
254:            public synchronized SInternalFrame removeWindowListener(
255:                    WindowListener listener) {
256:                getUI().removeListener(listener);
257:                return this ;
258:            }
259:
260:            // PRIVATE ///////////////////////////////////////////////////////////////////////////////
261:
262:            protected boolean closeable = true;
263:            protected boolean closed;
264:            protected boolean resizable;
265:            protected boolean iconizable = true;
266:            protected boolean iconized;
267:            protected boolean maximizable = true;
268:            protected boolean maximized;
269:
270:            protected SIcon frameIcon;
271:            protected String title;
272:            protected String desktopTitle;
273:            protected SIcon desktopIcon;
274:
275:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.