Source Code Cross Referenced for DockingWindowProperties.java in  » Swing-Library » InfoNode-Docking-Windows » net » infonode » docking » properties » 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 » InfoNode Docking Windows » net.infonode.docking.properties 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (C) 2004 NNL Technology AB
003:         * Visit www.infonode.net for information about InfoNode(R) 
004:         * products and how to contact NNL Technology AB.
005:         *
006:         * This program is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU General Public License
008:         * as published by the Free Software Foundation; either version 2
009:         * of the License, or (at your option) any later version.
010:         *
011:         * This program is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014:         * GNU General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU General Public License
017:         * along with this program; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place - Suite 330, Boston, 
019:         * MA 02111-1307, USA.
020:         */
021:
022:        // $Id: DockingWindowProperties.java,v 1.25 2005/12/04 13:46:04 jesper Exp $
023:        package net.infonode.docking.properties;
024:
025:        import net.infonode.docking.title.DockingWindowTitleProvider;
026:        import net.infonode.docking.title.DockingWindowTitleProviderProperty;
027:        import net.infonode.properties.propertymap.*;
028:        import net.infonode.properties.types.BooleanProperty;
029:
030:        /**
031:         * Properties and property values common for all docking windows.
032:         *
033:         * @author $Author: jesper $
034:         * @version $Revision: 1.25 $
035:         */
036:        public class DockingWindowProperties extends PropertyMapContainer {
037:            /**
038:             * Property group containing all docking window properties.
039:             */
040:            public static final PropertyMapGroup PROPERTIES = new PropertyMapGroup(
041:                    "Docking Window Properties", "");
042:
043:            /**
044:             * Property values for the window tab when the window is located in a TabWindow or a WindowBar.
045:             */
046:            public static final PropertyMapProperty TAB_PROPERTIES = new PropertyMapProperty(
047:                    PROPERTIES,
048:                    "Tab Properties",
049:                    "Property values for the window tab when the window is located in a TabWindow or a WindowBar.",
050:                    WindowTabProperties.PROPERTIES);
051:
052:            /**
053:             * Property values for drop filters.
054:             *
055:             * @since IDW 1.4.0
056:             */
057:            public static final PropertyMapProperty DROP_FILTER_PROPERTIES = new PropertyMapProperty(
058:                    PROPERTIES, "Drop Filter Properties",
059:                    "Property values for drop filters.",
060:                    DockingWindowDropFilterProperties.PROPERTIES);
061:
062:            /**
063:             * Enables/disables window drag by the user.
064:             *
065:             * @since IDW 1.2.0
066:             */
067:            public static final BooleanProperty DRAG_ENABLED = new BooleanProperty(
068:                    PROPERTIES, "Drag Enabled",
069:                    "Enables/disables window drag by the user.",
070:                    PropertyMapValueHandler.INSTANCE);
071:
072:            /**
073:             * Enables/disables undock to a floating window.
074:             *
075:             * @since IDW 1.4.0
076:             */
077:            public static final BooleanProperty UNDOCK_ENABLED = new BooleanProperty(
078:                    PROPERTIES,
079:                    "Undock Enabled",
080:                    "Enables/disables if a window can be undocked to a floating window.",
081:                    PropertyMapValueHandler.INSTANCE);
082:            /**
083:             * <p>
084:             * Enables/disables undock when dropped outside root window.
085:             * </p>
086:             *
087:             * <p>
088:             * <strong>Note:</strong> This property will only have effect if window drag is enabled and undocking is enabled.
089:             * </p>
090:             *
091:             * @since IDW 1.4.0
092:             */
093:            public static final BooleanProperty UNDOCK_ON_DROP = new BooleanProperty(
094:                    PROPERTIES,
095:                    "Undock when Dropped",
096:                    "Enables/disables window undock to floating window when a drag and drop is performed outside the root window.",
097:                    PropertyMapValueHandler.INSTANCE);
098:
099:            /**
100:             * Enables/disables undock to a floating window.
101:             *
102:             * @since IDW 1.4.0
103:             */
104:            public static final BooleanProperty DOCK_ENABLED = new BooleanProperty(
105:                    PROPERTIES,
106:                    "Dock Enabled",
107:                    "Enables/disables if a window can be docked to the root window from a floating window.",
108:                    PropertyMapValueHandler.INSTANCE);
109:
110:            /**
111:             * Enables/disables window minimize by the user.
112:             *
113:             * @since IDW 1.2.0
114:             */
115:            public static final BooleanProperty MINIMIZE_ENABLED = new BooleanProperty(
116:                    PROPERTIES, "Minimize Enabled",
117:                    "Enables/disables window minimize by the user.",
118:                    PropertyMapValueHandler.INSTANCE);
119:
120:            /**
121:             * Enables/disables window close by the user.
122:             *
123:             * @since IDW 1.2.0
124:             */
125:            public static final BooleanProperty CLOSE_ENABLED = new BooleanProperty(
126:                    PROPERTIES, "Close Enabled",
127:                    "Enables/disables window close by the user.",
128:                    PropertyMapValueHandler.INSTANCE);
129:
130:            /**
131:             * Enables/disables window restore by the user.
132:             *
133:             * @since IDW 1.2.0
134:             */
135:            public static final BooleanProperty RESTORE_ENABLED = new BooleanProperty(
136:                    PROPERTIES, "Restore Enabled",
137:                    "Enables/disables window restore by the user.",
138:                    PropertyMapValueHandler.INSTANCE);
139:
140:            /**
141:             * Enables/disables window maximize by the user.
142:             *
143:             * @since IDW 1.2.0
144:             */
145:            public static final BooleanProperty MAXIMIZE_ENABLED = new BooleanProperty(
146:                    PROPERTIES, "Maximize Enabled",
147:                    "Enables/disables window maximize by the user.",
148:                    PropertyMapValueHandler.INSTANCE);
149:
150:            /**
151:             * Provides a title for a window.
152:             *
153:             * @since IDW 1.3.0
154:             */
155:            public static final DockingWindowTitleProviderProperty TITLE_PROVIDER = new DockingWindowTitleProviderProperty(
156:                    PROPERTIES, "Title Provider",
157:                    "Provides a title for a window.",
158:                    PropertyMapValueHandler.INSTANCE);
159:
160:            /**
161:             * Creates an empty property object.
162:             */
163:            public DockingWindowProperties() {
164:                super (PropertyMapFactory.create(PROPERTIES));
165:            }
166:
167:            /**
168:             * Creates a property map containing the map.
169:             *
170:             * @param map the property map
171:             */
172:            public DockingWindowProperties(PropertyMap map) {
173:                super (map);
174:            }
175:
176:            /**
177:             * Creates a property object that inherit values from another property object.
178:             *
179:             * @param inheritFrom the object from which to inherit property values
180:             */
181:            public DockingWindowProperties(DockingWindowProperties inheritFrom) {
182:                super (PropertyMapFactory.create(inheritFrom.getMap()));
183:            }
184:
185:            /**
186:             * Adds a super object from which property values are inherited.
187:             *
188:             * @param properties the object from which to inherit property values
189:             * @return this
190:             */
191:            public DockingWindowProperties addSuperObject(
192:                    DockingWindowProperties properties) {
193:                getMap().addSuperMap(properties.getMap());
194:                return this ;
195:            }
196:
197:            /**
198:             * Removes the last added super object.
199:             *
200:             * @return this
201:             * @since IDW 1.1.0
202:             * @deprecated Use {@link #removeSuperObject(DockingWindowProperties)} instead.
203:             */
204:            public DockingWindowProperties removeSuperObject() {
205:                getMap().removeSuperMap();
206:                return this ;
207:            }
208:
209:            /**
210:             * Removes a super object.
211:             *
212:             * @param superObject the super object to remove
213:             * @return this
214:             * @since IDW 1.3.0
215:             */
216:            public DockingWindowProperties removeSuperObject(
217:                    DockingWindowProperties super Object) {
218:                getMap().removeSuperMap(super Object.getMap());
219:                return this ;
220:            }
221:
222:            /**
223:             * Returns the property values for the window tab when the window is located in a TabWindow or a WindowBar.
224:             *
225:             * @return the property values for the window tab when the window is located in a TabWindow or a WindowBar
226:             */
227:            public WindowTabProperties getTabProperties() {
228:                return new WindowTabProperties(TAB_PROPERTIES.get(getMap()));
229:            }
230:
231:            /**
232:             * Returns the property values for drop filters.
233:             *
234:             * @return the property values for drop filters
235:             * @since IDW 1.4.0
236:             */
237:            public DockingWindowDropFilterProperties getDropFilterProperties() {
238:                return new DockingWindowDropFilterProperties(
239:                        DROP_FILTER_PROPERTIES.get(getMap()));
240:            }
241:
242:            /**
243:             * Returns true if the window drag by the user is enabled.
244:             *
245:             * @return true if the window drag is enabled
246:             * @since IDW 1.2.0
247:             */
248:            public boolean getDragEnabled() {
249:                return DRAG_ENABLED.get(getMap());
250:            }
251:
252:            /**
253:             * Enables/disables window drag by the user.
254:             *
255:             * @param enabled if true, drag is enabled, otherwise it's disabled
256:             * @return this
257:             * @since IDW 1.2.0
258:             */
259:            public DockingWindowProperties setDragEnabled(boolean enabled) {
260:                DRAG_ENABLED.set(getMap(), enabled);
261:                return this ;
262:            }
263:
264:            /**
265:             * Returns true if the window can be undocked to a floating window.
266:             *
267:             * @return true if undocking is enabled
268:             * @since IDW 1.4.0
269:             */
270:            public boolean getUndockEnabled() {
271:                return UNDOCK_ENABLED.get(getMap());
272:            }
273:
274:            /**
275:             * Enables/disables undock to floating window.
276:             *
277:             * @param enabled if true, a window can be undocked to a floating window,
278:             *                otherwise it's disabled
279:             * @return this
280:             * @since IDW 1.4.0
281:             */
282:            public DockingWindowProperties setUndockEnabled(boolean enabled) {
283:                UNDOCK_ENABLED.set(getMap(), enabled);
284:                return this ;
285:            }
286:
287:            /**
288:             * <p>
289:             * Returns true if the window drag by the user and is dropped outside the root window should undock to a floating
290:             * window.
291:             * </p>
292:             *
293:             * <p>
294:             * <strong>Note:</strong> This property will only have effect if drag is enabled.
295:             * </p>
296:             *
297:             * @return true if the dropped window should undock to a floating window
298:             * @since IDW 1.4.0
299:             */
300:            public boolean getUndockOnDropEnabled() {
301:                return UNDOCK_ON_DROP.get(getMap());
302:            }
303:
304:            /**
305:             * <p>
306:             * Enables/disables if the window drag by the user and is dropped outside the root window should undock to a floating
307:             * window or not.
308:             * </p>
309:             *
310:             * <p>
311:             * <strong>Note:</strong> This property will only have effect if drag is enabled.
312:             * </p>
313:             *
314:             * @param enabled if true, drop to floating window is enabled, otherwise it's disabled
315:             * @return this
316:             * @since IDW 1.4.0
317:             */
318:            public DockingWindowProperties setUndockOnDropEnabled(
319:                    boolean enabled) {
320:                UNDOCK_ON_DROP.set(getMap(), enabled);
321:                return this ;
322:            }
323:
324:            /**
325:             * Returns true if the window can be docked to the root window from a floating window.
326:             *
327:             * @return true if docking is enabled
328:             * @since IDW 1.4.0
329:             */
330:            public boolean getDockEnabled() {
331:                return DOCK_ENABLED.get(getMap());
332:            }
333:
334:            /**
335:             * Enables/disables dock to the root window from a floating window.
336:             *
337:             * @param enabled if true, a window can be docked to the root window from a floating window,
338:             *                otherwise it's disabled
339:             * @return this
340:             * @since IDW 1.4.0
341:             */
342:            public DockingWindowProperties setDockEnabled(boolean enabled) {
343:                DOCK_ENABLED.set(getMap(), enabled);
344:                return this ;
345:            }
346:
347:            /**
348:             * Returns true if the window minimize by the user is enabled.
349:             *
350:             * @return true if the window minimize is enabled
351:             * @since IDW 1.2.0
352:             */
353:            public boolean getMinimizeEnabled() {
354:                return MINIMIZE_ENABLED.get(getMap());
355:            }
356:
357:            /**
358:             * Enables/disables window minimize by the user.
359:             *
360:             * @param enabled if true, minimize is enabled, otherwise it's disabled
361:             * @return this
362:             * @since IDW 1.2.0
363:             */
364:            public DockingWindowProperties setMinimizeEnabled(boolean enabled) {
365:                MINIMIZE_ENABLED.set(getMap(), enabled);
366:                return this ;
367:            }
368:
369:            /**
370:             * Returns true if the window maximize by the user is enabled.
371:             *
372:             * @return true if the window maximize is enabled
373:             * @since IDW 1.2.0
374:             */
375:            public boolean getMaximizeEnabled() {
376:                return MAXIMIZE_ENABLED.get(getMap());
377:            }
378:
379:            /**
380:             * Enables/disables window maximize by the user.
381:             *
382:             * @param enabled if true, maximize is enabled, otherwise it's disabled
383:             * @return this
384:             * @since IDW 1.2.0
385:             */
386:            public DockingWindowProperties setMaximizeEnabled(boolean enabled) {
387:                MAXIMIZE_ENABLED.set(getMap(), enabled);
388:                return this ;
389:            }
390:
391:            /**
392:             * Returns true if the window close by the user is enabled.
393:             *
394:             * @return true if the window close is enabled
395:             * @since IDW 1.2.0
396:             */
397:            public boolean getCloseEnabled() {
398:                return CLOSE_ENABLED.get(getMap());
399:            }
400:
401:            /**
402:             * Enables/disables window close by the user.
403:             *
404:             * @param enabled if true, close is enabled, otherwise it's disabled
405:             * @return this
406:             * @since IDW 1.2.0
407:             */
408:            public DockingWindowProperties setCloseEnabled(boolean enabled) {
409:                CLOSE_ENABLED.set(getMap(), enabled);
410:                return this ;
411:            }
412:
413:            /**
414:             * Returns true if the window restore by the user is enabled.
415:             *
416:             * @return true if the window restore is enabled
417:             * @since IDW 1.2.0
418:             */
419:            public boolean getRestoreEnabled() {
420:                return RESTORE_ENABLED.get(getMap());
421:            }
422:
423:            /**
424:             * Enables/disables window restore by the user.
425:             *
426:             * @param enabled if true, restore is enabled, otherwise it's disabled
427:             * @return this
428:             * @since IDW 1.2.0
429:             */
430:            public DockingWindowProperties setRestoreEnabled(boolean enabled) {
431:                RESTORE_ENABLED.set(getMap(), enabled);
432:                return this ;
433:            }
434:
435:            /**
436:             * Returns the title provider for the window.
437:             *
438:             * @return the title provider for the window
439:             * @since IDW 1.3.0
440:             */
441:            public DockingWindowTitleProvider getTitleProvider() {
442:                return TITLE_PROVIDER.get(getMap());
443:            }
444:
445:            /**
446:             * Sets the title provider for the window.
447:             *
448:             * @param titleProvider the title provider for the window
449:             * @since IDW 1.3.0
450:             */
451:            public DockingWindowProperties setTitleProvider(
452:                    DockingWindowTitleProvider titleProvider) {
453:                TITLE_PROVIDER.set(getMap(), titleProvider);
454:                return this;
455:            }
456:
457:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.