Source Code Cross Referenced for XTarget.java in  » XML-UI » xui32 » com » xoetrope » carousel » wizard » 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 » xui32 » com.xoetrope.carousel.wizard 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.xoetrope.carousel.wizard;
002:
003:        import java.awt.Container;
004:        import java.awt.Dimension;
005:        import java.awt.BorderLayout;
006:        import java.awt.Graphics;
007:        import java.util.Hashtable;
008:        import java.awt.Component;
009:        import net.xoetrope.xui.XContentHolder;
010:
011:        /**
012:         * When using framesets the 'screen' is devided up into a number of different
013:         * target areas. Each target area may contain a page. The content for each
014:         * target area is set by naming the target area when calling displayPage. This
015:         * class provides support for this behaviour by wrapping the Container class to
016:         * ensure the target area is properly sized. How the target areas are actually
017:         * laid out depends on the layout manager being used.
018:         *
019:         * <p> Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
020:         * the GNU Public License (GPL), please see license.txt for more details. If
021:         * you make commercial use of this software you must purchase a commercial
022:         * license from Xoetrope.</p>
023:         * <p> $Revision: 1.4 $</p>
024:         */
025:        public class XTarget extends Container implements  XContentHolder {
026:            private Dimension prefSize, minSize;
027:            private boolean hasListeners;
028:            private String content;
029:
030:            /**
031:             * Setup a new target area
032:             */
033:            public XTarget() {
034:            }
035:
036:            /**
037:             * Set the attributes for the next component being added
038:             * @param attribs a table of attributes
039:             */
040:            public void setNextAttributes(Object attribs) {
041:            }
042:
043:            /**
044:             * Setup a new target area and set its size
045:             * @param name The name with which this instance will be associated
046:             * @param width the width
047:             * @param height the height
048:             * @param params extra parameters for the target
049:             */
050:            public void setup(String name, int width, int height,
051:                    Hashtable params) {
052:                hasListeners = false;
053:                setName(name);
054:                setSize(width, height);
055:                if ((width != 0) && (height != 0)) {
056:                    prefSize = new Dimension(width, height);
057:                    minSize = new Dimension(width, height);
058:                } else {
059:                    prefSize = null;
060:                    minSize = null;
061:                }
062:                setLayout(new BorderLayout());
063:            }
064:
065:            /**
066:             * Get the preferred size of the target area. If zero width and height were
067:             * specified this method returns the default size, otherwise it returns a
068:             * dimension with the specified width and height.
069:             * @return the size
070:             */
071:            public Dimension getPreferredSize() {
072:                return (prefSize != null ? prefSize : super .getPreferredSize());
073:            }
074:
075:            /**
076:             * Set the preferred size for this target area
077:             * @param d the new size
078:             */
079:            public void setPreferredSize(Dimension d) {
080:                prefSize = d;
081:            }
082:
083:            /**
084:             * Get the minimum size of the target area. If zero width and height were
085:             * specified this method returns the default size, otherwise it returns a
086:             * dimension with the specified width and height.
087:             * @return the size
088:             */
089:            public Dimension getMinimumSize() {
090:                return (minSize != null ? minSize : super .getMinimumSize());
091:            }
092:
093:            /**
094:             * Get the hasListeners flag
095:             * @return the value
096:             */
097:            public boolean getHasListeners() {
098:                return hasListeners;
099:            }
100:
101:            /**
102:             * Set the hasListeners flag
103:             * @param value the new value
104:             */
105:            public void setHasListeners(boolean value) {
106:                hasListeners = value;
107:            }
108:
109:            /**
110:             * Update the target by repainting
111:             * @param g the graphics context
112:             */
113:            public void update(Graphics g) {
114:                paint(g);
115:            }
116:
117:            /**
118:             * Get the content of this target
119:             * @return the content or page name
120:             */
121:            public String getContent() {
122:                return content;
123:            }
124:
125:            /**
126:             * Set the content of this target
127:             * @param pageName the content page name
128:             */
129:            public void setContent(String pageName) {
130:                content = pageName;
131:            }
132:
133:            /**
134:             * Get a child component
135:             * @param i the index of the child within the container
136:             * @return the child component
137:             */
138:            public Object getChildComponent(int i) {
139:                return super .getComponent(i);
140:            }
141:
142:            /**
143:             * Add a child component
144:             * @param c the child component
145:             * @param constraint the layout constraint
146:             */
147:            public void add(Object c, Object constraint) {
148:                super .add((Component) c, constraint);
149:            }
150:
151:            /**
152:             * Remove a child component
153:             * @param c the child component
154:             */
155:            public void remove(Object c) {
156:                super .remove((Component) c);
157:            }
158:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.