Source Code Cross Referenced for RowData.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:         * Copyright (c) 2000, 2007 IBM Corporation and others.
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         *
008:         * Contributors:
009:         *     IBM Corporation - initial API and implementation
010:         *     Darrell Meyer <darrell@mygwt.net> - derived implementation
011:         *******************************************************************************/package net.mygwt.ui.client.widget.layout;
012:
013:        import net.mygwt.ui.client.Style;
014:
015:        /**
016:         * Layout data for <code>RowLayouts</code>. A layout will not adjust the
017:         * height or width if its value is DEFAULT.
018:         * 
019:         * <dl>
020:         * <dt><b>Styles:</b></dt>
021:         * <dd>FILL_BOTH, FILL_HORIZONTAL, FILL_VERTICAL</dd>
022:         * </dl>
023:         */
024:        public class RowData {
025:
026:            /**
027:             * Fills both horizontally and vertically.
028:             */
029:            public static final int FILL_BOTH = 0;
030:
031:            /**
032:             * Fills horizontally.
033:             */
034:            public static final int FILL_HORIZONTAL = 1;
035:
036:            /**
037:             * Fills vertically.
038:             */
039:            public static final int FILL_VERTICAL = 2;
040:
041:            float height = Style.DEFAULT;
042:            float width = Style.DEFAULT;
043:            boolean fillWidth;
044:            boolean fillHeight;
045:            float calcWidth, calcHeight;
046:
047:            /**
048:             * Creates a new row data.
049:             */
050:            public RowData() {
051:
052:            }
053:
054:            /**
055:             * Creates a new row data instance.
056:             * 
057:             * @param height the height in pixels
058:             * @param width the width in pixels
059:             */
060:            public RowData(float height, float width) {
061:                this .height = height;
062:                this .width = width;
063:            }
064:
065:            /**
066:             * Creates a new row data.
067:             * 
068:             * @param style the style information
069:             */
070:            public RowData(int style) {
071:                switch (style) {
072:                case FILL_BOTH:
073:                    fillWidth = true;
074:                    fillHeight = true;
075:                    break;
076:                case FILL_HORIZONTAL:
077:                    fillWidth = true;
078:                    break;
079:                case FILL_VERTICAL:
080:                    fillHeight = true;
081:                    break;
082:                }
083:            }
084:
085:            /**
086:             * Returns <code>true</code> if the height should fill.
087:             * 
088:             * @return the fill height state
089:             */
090:            public boolean getFillHeight() {
091:                return fillHeight;
092:            }
093:
094:            /**
095:             * Returns <code>true</code> if the width should fill.
096:             * 
097:             * @return the fill width state
098:             */
099:            public boolean getFillWidth() {
100:                return fillWidth;
101:            }
102:
103:            /**
104:             * Returns the height.
105:             * 
106:             * @return the height
107:             */
108:            public float getHeight() {
109:                return height;
110:            }
111:
112:            /**
113:             * Returns the width.
114:             * 
115:             * @return the width
116:             */
117:            public float getWidth() {
118:                return width;
119:            }
120:
121:            /**
122:             * Sets if the widget's height should fill its region. When <code>true</code>,
123:             * the height field is ignored. Default value is <code>false</code>.
124:             * 
125:             * @param fillHeight the fill height state
126:             */
127:            public void setFillHeight(boolean fillHeight) {
128:                this .fillHeight = fillHeight;
129:            }
130:
131:            /**
132:             * Sets if the widget's width should fill its region. When <code>true</code>,
133:             * the width field is ignored. Default value is <code>false</code>.
134:             * 
135:             * @param fillWidth the fill width state
136:             */
137:            public void setFillWidth(boolean fillWidth) {
138:                this .fillWidth = fillWidth;
139:            }
140:
141:            /**
142:             * Sets the preferred height in pixels. Default value is DEFAULT.
143:             * 
144:             * @param height the height
145:             */
146:            public void setHeight(float height) {
147:                this .height = height;
148:            }
149:
150:            /**
151:             * Sets the desired width in pixels. Default value is DEFAULT.
152:             * 
153:             * @param width the width
154:             */
155:            public void setWidth(float width) {
156:                this.width = width;
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.