Source Code Cross Referenced for Row.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » internal » 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 » IDE Eclipse » ui workbench » org.eclipse.ui.internal.layout 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2004, 2006 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:         *******************************************************************************/package org.eclipse.ui.internal.layout;
011:
012:        /**
013:         * Describes a single row (or column) in a CellLayout
014:         * 
015:         * @since 3.0
016:         */
017:        public class Row {
018:            /**
019:             * True iff this row will expand to fill available space
020:             */
021:            boolean grows = false;
022:
023:            /**
024:             * Size of this row. For growing rows, this is the relative size
025:             * of the row with respect to other rows (ie: a row of size 100 is twice
026:             * as wide as a row of size 50). For fixed rows, this is the absolute size
027:             * of the row, in pixels. 
028:             */
029:            int size = 0;
030:
031:            /**
032:             * True iff this row should query its child controls for its size.
033:             */
034:            boolean largerThanChildren = true;
035:
036:            /**
037:             * Creates a fixed-size row with the given width (pixels).
038:             * The preferred sizes of child controls are ignored.
039:             * 
040:             * @param size
041:             */
042:            public Row(int size) {
043:                largerThanChildren = false;
044:                this .size = size;
045:                grows = false;
046:            }
047:
048:            /**
049:             * Creates a row that automatically computes its size based on the preferred
050:             * sizes of its children.
051:             * 
052:             * @param growing
053:             */
054:            public Row(boolean growing) {
055:                this .grows = growing;
056:
057:                if (growing) {
058:                    size = 100;
059:                }
060:            }
061:
062:            /**
063:             * Creates a growing row.
064:             * 
065:             * @param sizeRatio determines the size of this row with respect to other growing rows
066:             * (for example, a row with size = 3 will be 3x as large as a row with size = 1)
067:             * @param largerThanChildren true iff the preferred size of this row should take into
068:             * account the preferred sizes of its children.
069:             */
070:            public Row(int size, boolean largerThanChildren) {
071:                this .grows = true;
072:                this .size = size;
073:                this .largerThanChildren = largerThanChildren;
074:            }
075:
076:            /**
077:             * Construct and return a typical growing row.
078:             * 
079:             * @return a growing row
080:             */
081:            public static Row growing() {
082:                return new Row(100, true);
083:            }
084:
085:            /**
086:             * Construct and return a growing row with custom properties
087:             * 
088:             * @param size relative size of this row with respect to other growing rows
089:             * @param largerThanChildren true iff the preferred size of this row should
090:             * be based on the preferred sizes of its children
091:             * @return a new Row
092:             */
093:            public static Row growing(int size, boolean largerThanChildren) {
094:                return new Row(size, largerThanChildren);
095:            }
096:
097:            /**
098:             * Construct and return a fixed-size row. The row will not grow when the layout
099:             * is resized, and its size will be computed from the default sizes of its children.
100:             * 
101:             * @return a new Row
102:             */
103:            public static Row fixed() {
104:                return new Row(false);
105:            }
106:
107:            /**
108:             * Construct and return a fixed-size row. The row will always have the given
109:             * width, regardless of the size of the layout or the preferred sizes of its children. 
110:             * 
111:             * @param pixels size of the row
112:             * @return a fixed-size row with the given width (in pixels)
113:             */
114:            public static Row fixed(int pixels) {
115:                return new Row(pixels);
116:            }
117:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.