Source Code Cross Referenced for BorderLayoutData.java in  » Ajax » MyGWT » net » mygwt » ui » client » widget » layout » 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 » Ajax » MyGWT » net.mygwt.ui.client.widget.layout 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * MyGWT Widget Library
003:         * Copyright(c) 2007, MyGWT.
004:         * licensing@mygwt.net
005:         * 
006:         * http://mygwt.net/license
007:         */
008:        package net.mygwt.ui.client.widget.layout;
009:
010:        import net.mygwt.ui.client.Style;
011:
012:        /**
013:         * Layout data describing a "region" in a border panel.
014:         * 
015:         * @see Style#NORTH
016:         * @see Style#WEST
017:         * @see Style#SOUTH
018:         * @see Style#EAST
019:         * @see Style#CENTER
020:         */
021:        public class BorderLayoutData {
022:
023:            boolean background = true;
024:            boolean borders = true;
025:            boolean exclude = false;
026:            int maximumSize = 500;
027:            int minimumSize;
028:            int region = 0;
029:            boolean resizeable = false;
030:            float size;
031:
032:            /**
033:             * Creates a new border layout data.
034:             * <p>
035:             * <dl>
036:             * <dt><b>Regions:</b></dt>
037:             * <dd>NORTH,WEST,SOUTH,EAST,CENTER</dd>
038:             * </dl>
039:             * </p>
040:             * 
041:             * @param region the region
042:             */
043:            public BorderLayoutData(int region) {
044:                this .region = region;
045:            }
046:
047:            /**
048:             * Creates a new border layout data with a given size.
049:             * <p>
050:             * <dl>
051:             * <dt><b>Regions:</b></dt>
052:             * <dd>NORTH,WEST,SOUTH,EAST,CENTER</dd>
053:             * </dl>
054:             * </p>
055:             * 
056:             * @param region the region (NORTH, WEST, SOUTH, EAST, CENTER).
057:             * @param size the preferred size
058:             */
059:            public BorderLayoutData(int region, float size) {
060:                this .region = region;
061:                this .size = size;
062:            }
063:
064:            /**
065:             * Creates a new border layout data. Region will be resizable using the min
066:             * and max values.
067:             * <p>
068:             * <dl>
069:             * <dt><b>Regions:</b></dt>
070:             * <dd>NORTH,WEST,SOUTH,EAST,CENTER</dd>
071:             * </dl>
072:             * </p>
073:             * 
074:             * @param region the region (NORTH, WEST, SOUTH, EAST, CENTER).
075:             * @param size the preferred size
076:             * @param minSize the minimum size when resizing this region
077:             * @param maxSize the maximum size when resizing this region
078:             */
079:            public BorderLayoutData(int region, float size, int minSize,
080:                    int maxSize) {
081:                this .region = region;
082:                this .size = size;
083:                this .minimumSize = minSize;
084:                this .maximumSize = maxSize;
085:                resizeable = true;
086:            }
087:
088:            /**
089:             * Returns <code>true</code> if the background should be displayed.
090:             * 
091:             * @return the backgrond state
092:             */
093:            public boolean getBackground() {
094:                return background;
095:            }
096:
097:            /**
098:             * Displays the region's background if <code>true</code>, clears otherwise.
099:             * Default value is <code>true</code>.
100:             * 
101:             * @param background the background
102:             */
103:            public void setBackground(boolean background) {
104:                this .background = background;
105:            }
106:
107:            /**
108:             * Returns the border state
109:             * 
110:             * @return <code>true</code> to display the border
111:             */
112:            public boolean getBorders() {
113:                return borders;
114:            }
115:
116:            /**
117:             * Sets whether the border should be displayed.
118:             * 
119:             * @param borders <code>true</code> to show
120:             */
121:            public void setBorders(boolean borders) {
122:                this .borders = borders;
123:            }
124:
125:            /**
126:             * Returns <code>true</code> if the region should be excluded.
127:             * 
128:             * @return the exclude state
129:             */
130:            public boolean getExclude() {
131:                return exclude;
132:            }
133:
134:            /**
135:             * Hides the region if <code>true</code>, shows otherwise. Default value is
136:             * <code>false</code>.
137:             * 
138:             * @param exclude the exclude state
139:             */
140:            public void setExclude(boolean exclude) {
141:                this .exclude = exclude;
142:            }
143:
144:            /**
145:             * Returns the region's maximum size.
146:             * 
147:             * @return the max size
148:             */
149:            public int getMaximumSize() {
150:                return maximumSize;
151:            }
152:
153:            /**
154:             * Sets the regions's max size. Default value is 500.
155:             * 
156:             * @param maximumSize the max size
157:             */
158:            public void setMaximumSize(int maximumSize) {
159:                this .maximumSize = maximumSize;
160:            }
161:
162:            /**
163:             * Returns the region's minimum size.
164:             * 
165:             * @return the minimum size
166:             */
167:            public int getMinimumSize() {
168:                return minimumSize;
169:            }
170:
171:            /**
172:             * Sets the regions's min size.
173:             * 
174:             * @param minimumSize the minimum size
175:             */
176:            public void setMinimumSize(int minimumSize) {
177:                this .minimumSize = minimumSize;
178:            }
179:
180:            /**
181:             * Returns the region.
182:             * 
183:             * @return the region
184:             */
185:            public int getRegion() {
186:                return region;
187:            }
188:
189:            /**
190:             * Specifies the region in the border panel.
191:             * 
192:             * @param region the region
193:             */
194:            public void setRegion(int region) {
195:                this .region = region;
196:            }
197:
198:            /**
199:             * Returns <code>true</code> if the region is resizable.
200:             * 
201:             * @return the resizable state
202:             */
203:            public boolean getResizeable() {
204:                return resizeable;
205:            }
206:
207:            /**
208:             * Enables resizing if <code>true</code>, disables otherwise. Default value
209:             * is <code>false</code>.
210:             * 
211:             * @param resizeable the resizable state
212:             */
213:            public void setResizeable(boolean resizeable) {
214:                this .resizeable = resizeable;
215:            }
216:
217:            /**
218:             * Returns the region's size.
219:             * 
220:             * @return the size
221:             */
222:            public float getSize() {
223:                return size;
224:            }
225:
226:            /**
227:             * The regions preferred size. Values of 1 or less are treated as percentages.
228:             * @param size the size
229:             */
230:            public void setSize(float size) {
231:                this.size = size;
232:            }
233:
234:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.