Java Doc for FormFactory.java in  » Swing-Library » jgoodies-forms » com » jgoodies » forms » factories » 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 » jgoodies forms » com.jgoodies.forms.factories 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jgoodies.forms.factories.FormFactory

FormFactory
final public class FormFactory (Code)
A factory that creates instances of FormLayout for frequently used form layouts. It makes form creation easier and more consistent.

I consider removing the FormLayout factory methods. These seem to be less usefull and may lead to poor layout readability. If you want to use these methods, you may consider copying them to your codebase.

The forms are described by major and minor columns. Major columns consist of a leading label and a set of related components, for example: a label plus textfield, or label plus textfield plus button. The component part of a major column is divided into minor columns as shown in this layout:

 <-    major column 1        ->  <-     major column 2       -> 
 label1 textfield1a textfield1b  label2 textfield2a textfield2b
 label3 textfield3a textfield3b  label4 textfield4
 label5 textfield5               label6 textfield6
 

Many forms use 1, 2, 3 or 4 major columns, which in turn are often split into 1, 2, 3 or 4 minor columns.
author:
   Karsten Lentzsch
version:
   $Revision: 1.3 $
See Also:   com.jgoodies.forms.layout.FormLayout
See Also:   ColumnSpec



Field Summary
final public static  ColumnSpecBUTTON_COLSPEC
     Describes a logical horizontal column for a fixed size button.
final public static  ColumnSpecDEFAULT_COLSPEC
     An unmodifyable ColumnSpec that determines its preferred width by computing the maximum of all column component preferred widths and its minimum width by computing all column component minimum widths.

Useful to let a column shrink from preferred width to minimum width if the container space gets scarce.

final public static  RowSpecDEFAULT_ROWSPEC
     An unmodifyable RowSpec that determines its preferred height by computing the maximum of all column component preferred heights and its minimum height by computing all column component minimum heights.

Useful to let a column shrink from preferred height to minimum height if the container space gets scarce.

final public static  ColumnSpecGLUE_COLSPEC
     An unmodifyable ColumnSpec that has an initial width of 0 pixels and that grows.
final public static  RowSpecGLUE_ROWSPEC
     An unmodifyable RowSpec that has an initial height of 0 pixels and that grows.
final public static  ColumnSpecGROWING_BUTTON_COLSPEC
     Describes a logical horizontal column for a growing button.
final public static  ColumnSpecLABEL_COMPONENT_GAP_COLSPEC
     Describes a logical horizontal gap between a label and an associated component.
final public static  RowSpecLINE_GAP_ROWSPEC
     Describes the logical vertical default gap between two rows in the grid.
final public static  ColumnSpecMIN_COLSPEC
     An unmodifyable ColumnSpec that determines its width by computing the maximum of all column component minimum widths.
final public static  RowSpecMIN_ROWSPEC
     An unmodifyable RowSpec that determines its height by computing the maximum of all column component minimum heights.
final public static  RowSpecNARROW_LINE_GAP_ROWSPEC
     Describes a logical vertical narrow gap between two rows in the grid.
final public static  RowSpecPARAGRAPH_GAP_ROWSPEC
     Describes the logical vertical default gap between two paragraphs in the layout grid.
final public static  ColumnSpecPREF_COLSPEC
     An unmodifyable ColumnSpec that determines its width by computing the maximum of all column component preferred widths.
final public static  RowSpecPREF_ROWSPEC
     An unmodifyable RowSpec that determines its height by computing the maximum of all column component preferred heights.
final public static  ColumnSpecRELATED_GAP_COLSPEC
     Describes a logical horizontal gap between two related components.
final public static  RowSpecRELATED_GAP_ROWSPEC
     Describes a logical vertzical gap between two related components.
final public static  ColumnSpecUNRELATED_GAP_COLSPEC
     Describes a logical horizontal gap between two unrelated components.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.

final public static  RowSpecUNRELATED_GAP_ROWSPEC
     Describes a logical vertical gap between two unrelated components.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.



Method Summary
public static  FormLayoutcreateColumnLayout(int majorColumns, int minorColumns, ColumnSpec labelColumnSpec)
    
public static  FormLayoutcreateColumnLayout(int majorColumns, int minorColumns, ColumnSpec labelColumnSpec, ConstantSize indent, ConstantSize minorColumnGap)
     Creates and returns an instance of FormLayout to build forms with the given number of major columns.
public static  FormLayoutcreateColumnLayout(int majorColumns, int minorColumns, ColumnSpec labelColumnSpec, ColumnSpec componentColumnSpec, ConstantSize indent, ConstantSize majorColumnGap, ConstantSize minorColumnGap)
     Creates and returns an instance of FormLayout to build forms with the given number of major columns.
public static  ColumnSpeccreateGapColumnSpec(ConstantSize gapSize)
     Creates and returns a ColumnSpec that represents a gap with the specified ConstantSize .
public static  RowSpeccreateGapRowSpec(ConstantSize gapSize)
     Creates and returns a RowSpec that represents a gap with the specified ConstantSize .

Field Detail
BUTTON_COLSPEC
final public static ColumnSpec BUTTON_COLSPEC(Code)
Describes a logical horizontal column for a fixed size button. This spec honors the current layout style's default button minimum width.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.
See Also:   FormFactory.GROWING_BUTTON_COLSPEC
See Also:   




DEFAULT_COLSPEC
final public static ColumnSpec DEFAULT_COLSPEC(Code)
An unmodifyable ColumnSpec that determines its preferred width by computing the maximum of all column component preferred widths and its minimum width by computing all column component minimum widths.

Useful to let a column shrink from preferred width to minimum width if the container space gets scarce.
See Also:   FormFactory.MIN_COLSPEC
See Also:   FormFactory.PREF_COLSPEC




DEFAULT_ROWSPEC
final public static RowSpec DEFAULT_ROWSPEC(Code)
An unmodifyable RowSpec that determines its preferred height by computing the maximum of all column component preferred heights and its minimum height by computing all column component minimum heights.

Useful to let a column shrink from preferred height to minimum height if the container space gets scarce.
See Also:   FormFactory.MIN_COLSPEC
See Also:   FormFactory.PREF_COLSPEC




GLUE_COLSPEC
final public static ColumnSpec GLUE_COLSPEC(Code)
An unmodifyable ColumnSpec that has an initial width of 0 pixels and that grows. Useful to describe glue columns that fill the space between other columns.
See Also:   FormFactory.GLUE_ROWSPEC



GLUE_ROWSPEC
final public static RowSpec GLUE_ROWSPEC(Code)
An unmodifyable RowSpec that has an initial height of 0 pixels and that grows. Useful to describe glue rows that fill the space between other rows.
See Also:   FormFactory.GLUE_COLSPEC



GROWING_BUTTON_COLSPEC
final public static ColumnSpec GROWING_BUTTON_COLSPEC(Code)
Describes a logical horizontal column for a growing button. This spec does not use the layout style's default button minimum width.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.
See Also:   FormFactory.BUTTON_COLSPEC
See Also:   




LABEL_COMPONENT_GAP_COLSPEC
final public static ColumnSpec LABEL_COMPONENT_GAP_COLSPEC(Code)
Describes a logical horizontal gap between a label and an associated component. Useful for builders that automatically fill a grid with labels and components.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.
since:
   1.0.3




LINE_GAP_ROWSPEC
final public static RowSpec LINE_GAP_ROWSPEC(Code)
Describes the logical vertical default gap between two rows in the grid. A little bit larger than the narrow line gap.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.
See Also:   FormFactory.NARROW_LINE_GAP_ROWSPEC
See Also:   
See Also:   FormFactory.PARAGRAPH_GAP_ROWSPEC




MIN_COLSPEC
final public static ColumnSpec MIN_COLSPEC(Code)
An unmodifyable ColumnSpec that determines its width by computing the maximum of all column component minimum widths.
See Also:   FormFactory.PREF_COLSPEC
See Also:   FormFactory.DEFAULT_COLSPEC



MIN_ROWSPEC
final public static RowSpec MIN_ROWSPEC(Code)
An unmodifyable RowSpec that determines its height by computing the maximum of all column component minimum heights.
See Also:   FormFactory.PREF_ROWSPEC
See Also:   FormFactory.DEFAULT_ROWSPEC



NARROW_LINE_GAP_ROWSPEC
final public static RowSpec NARROW_LINE_GAP_ROWSPEC(Code)
Describes a logical vertical narrow gap between two rows in the grid. Useful if the vertical space is scarce or if an individual vertical gap shall be small than the default line gap.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.
See Also:   FormFactory.LINE_GAP_ROWSPEC
See Also:   
See Also:   FormFactory.PARAGRAPH_GAP_ROWSPEC




PARAGRAPH_GAP_ROWSPEC
final public static RowSpec PARAGRAPH_GAP_ROWSPEC(Code)
Describes the logical vertical default gap between two paragraphs in the layout grid. This gap is larger than the default line gap.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.
See Also:   FormFactory.NARROW_LINE_GAP_ROWSPEC
See Also:   
See Also:   FormFactory.LINE_GAP_ROWSPEC
See Also:   




PREF_COLSPEC
final public static ColumnSpec PREF_COLSPEC(Code)
An unmodifyable ColumnSpec that determines its width by computing the maximum of all column component preferred widths.
See Also:   FormFactory.MIN_COLSPEC
See Also:   FormFactory.DEFAULT_COLSPEC



PREF_ROWSPEC
final public static RowSpec PREF_ROWSPEC(Code)
An unmodifyable RowSpec that determines its height by computing the maximum of all column component preferred heights.
See Also:   FormFactory.MIN_ROWSPEC
See Also:   FormFactory.DEFAULT_ROWSPEC



RELATED_GAP_COLSPEC
final public static ColumnSpec RELATED_GAP_COLSPEC(Code)
Describes a logical horizontal gap between two related components. For example the OK and Cancel buttons are considered related.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.
See Also:   FormFactory.UNRELATED_GAP_COLSPEC
See Also:   




RELATED_GAP_ROWSPEC
final public static RowSpec RELATED_GAP_ROWSPEC(Code)
Describes a logical vertzical gap between two related components. For example the OK and Cancel buttons are considered related.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.
See Also:   FormFactory.UNRELATED_GAP_ROWSPEC
See Also:   




UNRELATED_GAP_COLSPEC
final public static ColumnSpec UNRELATED_GAP_COLSPEC(Code)
Describes a logical horizontal gap between two unrelated components.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.
See Also:   FormFactory.RELATED_GAP_COLSPEC
See Also:   




UNRELATED_GAP_ROWSPEC
final public static RowSpec UNRELATED_GAP_ROWSPEC(Code)
Describes a logical vertical gap between two unrelated components.

Note: In a future version this constant will likely be moved to a class LogicalSize or StyledSize.
See Also:   FormFactory.RELATED_GAP_ROWSPEC
See Also:   






Method Detail
createColumnLayout
public static FormLayout createColumnLayout(int majorColumns, int minorColumns, ColumnSpec labelColumnSpec)(Code)
Creates and returns an instance of FormLayout to build forms with the specified number of major and minor columns.

The layout will use default values for all gaps.

This method will be removed from version 1.2.
Parameters:
  majorColumns - the number of used major columns
Parameters:
  minorColumns - the number of used minor columns
Parameters:
  labelColumnSpec - specifies the label columns a prepared FormLayout




createColumnLayout
public static FormLayout createColumnLayout(int majorColumns, int minorColumns, ColumnSpec labelColumnSpec, ConstantSize indent, ConstantSize minorColumnGap)(Code)
Creates and returns an instance of FormLayout to build forms with the given number of major columns. Major columns consists of a label and a component section, where each component section is divided into the given number of minor columns.

The layout will use the specified gaps to separate major columns, and the label and component section.

This method will be removed from version 1.2.
Parameters:
  majorColumns - the number of major columns
Parameters:
  minorColumns - the number of minor columns
Parameters:
  labelColumnSpec - specifies the label columns
Parameters:
  indent - an optional ConstantSize that describes the width of the leading indent column
Parameters:
  minorColumnGap - a ConstantSize that describesthe gap between minor columns a prepared FormLayout




createColumnLayout
public static FormLayout createColumnLayout(int majorColumns, int minorColumns, ColumnSpec labelColumnSpec, ColumnSpec componentColumnSpec, ConstantSize indent, ConstantSize majorColumnGap, ConstantSize minorColumnGap)(Code)
Creates and returns an instance of FormLayout to build forms with the given number of major columns. Major columns consists of a label and a component section, where each component section is divided into the given number of minor columns.

The layout will use the specified gaps to separate major columns, minor columns, and the label and component section.

This method will be removed from version 1.2.
Parameters:
  majorColumns - the number of major columns
Parameters:
  minorColumns - the number of minor columns
Parameters:
  labelColumnSpec - specifies the label columns
Parameters:
  componentColumnSpec - specifies the label columns
Parameters:
  indent - an optional ConstantSize that describes the width of the leading indent column
Parameters:
  majorColumnGap - a ConstantSize that describesthe gap between major columns
Parameters:
  minorColumnGap - a ConstantSize that describesthe gap between minor columns a prepared FormLayout




createGapColumnSpec
public static ColumnSpec createGapColumnSpec(ConstantSize gapSize)(Code)
Creates and returns a ColumnSpec that represents a gap with the specified ConstantSize .
Parameters:
  gapSize - a ConstantSize that specifies the gap a ColumnSpec that describes a horizontal gap



createGapRowSpec
public static RowSpec createGapRowSpec(ConstantSize gapSize)(Code)
Creates and returns a RowSpec that represents a gap with the specified ConstantSize .
Parameters:
  gapSize - a ConstantSize that specifies the gap a RowSpec that describes a vertical gap



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.