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


java.lang.Object
   com.jgoodies.forms.builder.AbstractFormBuilder

All known Subclasses:   com.jgoodies.forms.builder.PanelBuilder,
AbstractFormBuilder
abstract public class AbstractFormBuilder (Code)
An abstract class that minimizes the effort required to implement non-visual builders that use the FormLayout .

Builders hide details of the FormLayout and provide convenience behavior that assists you in constructing a form. This class provides a cell cursor that helps you traverse a form while you add components. Also, it offers several methods to append custom and logical columns and rows.
author:
   Karsten Lentzsch
version:
   $Revision: 1.2 $
See Also:   ButtonBarBuilder
See Also:   ButtonStackBuilder
See Also:   PanelBuilder
See Also:   I15dPanelBuilder
See Also:   DefaultFormBuilder




Constructor Summary
public  AbstractFormBuilder(FormLayout layout, Container container)
     Constructs an instance of AbstractFormBuilder for the given FormLayout and layout container.
public  AbstractFormBuilder(Container container, FormLayout layout)
     Constructs an instance of AbstractFormBuilder for the given container and form layout.

Method Summary
final public  Componentadd(Component component, CellConstraints cellConstraints)
     Adds a component to the panel using the given cell constraints.
final public  Componentadd(Component component, String encodedCellConstraints)
     Adds a component to the panel using the given encoded cell constraints.
final public  Componentadd(Component component)
     Adds a component to the container using the default cell constraints. Note that when building from left to right, this method won't adjust the cell constraints if the column span is larger than 1.
final public  voidappendColumn(ColumnSpec columnSpec)
     Appends the given column specification to the builder's layout.
final public  voidappendColumn(String encodedColumnSpec)
     Appends a column specification to the builder's layout that represents the given string encoding.
final public  voidappendGlueColumn()
     Appends a glue column.
final public  voidappendGlueRow()
     Appends a glue row.
final public  voidappendLabelComponentsGapColumn()
     Appends a column that is the default gap between a label and its associated component.
final public  voidappendParagraphGapRow()
     Appends a row that is the default gap for paragraphs.
final public  voidappendRelatedComponentsGapColumn()
     Appends a column that is the default gap for related components.
final public  voidappendRelatedComponentsGapRow()
     Appends a row that is the default gap for related components.
final public  voidappendRow(RowSpec rowSpec)
     Appends the given row specification to the builder's layout.
final public  voidappendRow(String encodedRowSpec)
     Appends a row specification to the builder's layout that represents the given string encoding.
final public  voidappendUnrelatedComponentsGapColumn()
     Appends a column that is the default gap for unrelated components.
final public  voidappendUnrelatedComponentsGapRow()
     Appends a row that is the default gap for unrelated components.
final protected  CellConstraintscellConstraints()
     Returns the CellConstraints object that is used as a cursor and holds the current column span and row span.
final protected  CellConstraintscreateLeftAdjustedConstraints(int columnSpan)
     Creates and returns a CellConstraints object at the current cursor position that uses the given column span and is adjusted to the left.
final public  intgetColumn()
     Returns the cursor's column.
final public  intgetColumnCount()
     Returns the number of columns in the form.
final protected  intgetColumnIncrementSign()
     Returns the sign (-1 or 1) used to increment the cursor's column when moving to the next column.
final public  ContainergetContainer()
     Returns the container used to build the form.
final public  FormLayoutgetLayout()
     Returns the instance of FormLayout used to build this form.
protected  intgetLeadingColumn()
     Returns the index of the leading column.
final public  intgetRow()
     Returns the cursor's row.
final public  intgetRowCount()
     Returns the number of rows in the form.
final public  booleanisLeftToRight()
     Returns whether this builder fills the form left-to-right or right-to-left.
final public  voidnextColumn()
     Moves to the next column, does the same as #nextColumn(1).
final public  voidnextColumn(int columns)
     Moves to the next column.
final public  voidnextLine()
     Moves to the next line: increases the row and resets the column; does the same as #nextLine(1).
final public  voidnextLine(int lines)
     Moves the cursor down several lines: increases the row by the specified number of lines and sets the cursor to the leading column.
final public  voidnextRow()
     Increases the row by one; does the same as #nextRow(1).
final public  voidnextRow(int rows)
     Increases the row by the specified rows.
final public  voidsetAlignment(CellConstraints.Alignment hAlign, CellConstraints.Alignment vAlign)
     Sets the horizontal and vertical alignment.
final public  voidsetBounds(int column, int row, int columnSpan, int rowSpan)
     Sets the cell bounds (location and extent) to the given column, row, column span and row span.
final public  voidsetColumn(int column)
     Sets the cursor to the given column.
final public  voidsetColumnSpan(int columnSpan)
     Sets the cursor's column span.
final public  voidsetExtent(int columnSpan, int rowSpan)
     Sets the cursor's extent to the given column span and row span.
final public  voidsetHAlignment(CellConstraints.Alignment alignment)
     Sets the horizontal alignment.
final public  voidsetLeftToRight(boolean b)
     Sets the form fill direction to left-to-right or right-to-left.
final public  voidsetOrigin(int column, int row)
     Sets the cursor's origin to the given column and row.
final public  voidsetRow(int row)
     Sets the cursor to the given row.
final public  voidsetRowSpan(int rowSpan)
     Sets the cursor's row span.
final public  voidsetVAlignment(CellConstraints.Alignment alignment)
     Sets the vertical alignment.


Constructor Detail
AbstractFormBuilder
public AbstractFormBuilder(FormLayout layout, Container container)(Code)
Constructs an instance of AbstractFormBuilder for the given FormLayout and layout container.
Parameters:
  layout - the FormLayout to use
Parameters:
  container - the layout container
throws:
  NullPointerException - if the layout or container is null



AbstractFormBuilder
public AbstractFormBuilder(Container container, FormLayout layout)(Code)
Constructs an instance of AbstractFormBuilder for the given container and form layout.
Parameters:
  container - the layout container
Parameters:
  layout - the FormLayout to useAbstractFormBuilder.AbstractFormBuilder(FormLayout,Container)




Method Detail
add
final public Component add(Component component, CellConstraints cellConstraints)(Code)
Adds a component to the panel using the given cell constraints.
Parameters:
  component - the component to add
Parameters:
  cellConstraints - the component's cell constraints the added component



add
final public Component add(Component component, String encodedCellConstraints)(Code)
Adds a component to the panel using the given encoded cell constraints.
Parameters:
  component - the component to add
Parameters:
  encodedCellConstraints - the component's encoded cell constraints the added component



add
final public Component add(Component component)(Code)
Adds a component to the container using the default cell constraints. Note that when building from left to right, this method won't adjust the cell constraints if the column span is larger than 1. In this case you should use AbstractFormBuilder.add(Component,CellConstraints) with a cell constraints object created by AbstractFormBuilder.createLeftAdjustedConstraints(int) .
Parameters:
  component - the component to add the added component
See Also:   AbstractFormBuilder.add(Component,CellConstraints)
See Also:   AbstractFormBuilder.createLeftAdjustedConstraints(int)



appendColumn
final public void appendColumn(ColumnSpec columnSpec)(Code)
Appends the given column specification to the builder's layout.
Parameters:
  columnSpec - the column specification object to append
See Also:   AbstractFormBuilder.appendColumn(String)



appendColumn
final public void appendColumn(String encodedColumnSpec)(Code)
Appends a column specification to the builder's layout that represents the given string encoding.
Parameters:
  encodedColumnSpec - the column specification to append in encoded form
See Also:   AbstractFormBuilder.appendColumn(ColumnSpec)



appendGlueColumn
final public void appendGlueColumn()(Code)
Appends a glue column.
See Also:   AbstractFormBuilder.appendLabelComponentsGapColumn()
See Also:   AbstractFormBuilder.appendRelatedComponentsGapColumn()
See Also:   AbstractFormBuilder.appendUnrelatedComponentsGapColumn()



appendGlueRow
final public void appendGlueRow()(Code)
Appends a glue row.
See Also:   AbstractFormBuilder.appendRelatedComponentsGapRow()
See Also:   AbstractFormBuilder.appendUnrelatedComponentsGapRow()
See Also:   AbstractFormBuilder.appendParagraphGapRow()



appendLabelComponentsGapColumn
final public void appendLabelComponentsGapColumn()(Code)
Appends a column that is the default gap between a label and its associated component.
since:
   1.0.3
See Also:   AbstractFormBuilder.appendGlueColumn()
See Also:   AbstractFormBuilder.appendRelatedComponentsGapColumn()
See Also:   AbstractFormBuilder.appendUnrelatedComponentsGapColumn()



appendParagraphGapRow
final public void appendParagraphGapRow()(Code)
Appends a row that is the default gap for paragraphs.
since:
   1.0.3
See Also:   AbstractFormBuilder.appendGlueRow()
See Also:   AbstractFormBuilder.appendRelatedComponentsGapRow()
See Also:   AbstractFormBuilder.appendUnrelatedComponentsGapRow()



appendRelatedComponentsGapColumn
final public void appendRelatedComponentsGapColumn()(Code)
Appends a column that is the default gap for related components.
See Also:   AbstractFormBuilder.appendGlueColumn()
See Also:   AbstractFormBuilder.appendLabelComponentsGapColumn()
See Also:   AbstractFormBuilder.appendUnrelatedComponentsGapColumn()



appendRelatedComponentsGapRow
final public void appendRelatedComponentsGapRow()(Code)
Appends a row that is the default gap for related components.
See Also:   AbstractFormBuilder.appendGlueRow()
See Also:   AbstractFormBuilder.appendUnrelatedComponentsGapRow()
See Also:   AbstractFormBuilder.appendParagraphGapRow()



appendRow
final public void appendRow(RowSpec rowSpec)(Code)
Appends the given row specification to the builder's layout.
Parameters:
  rowSpec - the row specification object to append
See Also:   AbstractFormBuilder.appendRow(String)



appendRow
final public void appendRow(String encodedRowSpec)(Code)
Appends a row specification to the builder's layout that represents the given string encoding.
Parameters:
  encodedRowSpec - the row specification to append in encoded form
See Also:   AbstractFormBuilder.appendRow(RowSpec)



appendUnrelatedComponentsGapColumn
final public void appendUnrelatedComponentsGapColumn()(Code)
Appends a column that is the default gap for unrelated components.
See Also:   AbstractFormBuilder.appendGlueColumn()
See Also:   AbstractFormBuilder.appendLabelComponentsGapColumn()
See Also:   AbstractFormBuilder.appendRelatedComponentsGapColumn()



appendUnrelatedComponentsGapRow
final public void appendUnrelatedComponentsGapRow()(Code)
Appends a row that is the default gap for unrelated components.
See Also:   AbstractFormBuilder.appendGlueRow()
See Also:   AbstractFormBuilder.appendRelatedComponentsGapRow()
See Also:   AbstractFormBuilder.appendParagraphGapRow()



cellConstraints
final protected CellConstraints cellConstraints()(Code)
Returns the CellConstraints object that is used as a cursor and holds the current column span and row span. the builder's current CellConstraints object



createLeftAdjustedConstraints
final protected CellConstraints createLeftAdjustedConstraints(int columnSpan)(Code)
Creates and returns a CellConstraints object at the current cursor position that uses the given column span and is adjusted to the left. Useful when building from right to left.
Parameters:
  columnSpan - the column span to be used in the constraints CellConstraints adjusted to the left hand side



getColumn
final public int getColumn()(Code)
Returns the cursor's column. the cursor's column



getColumnCount
final public int getColumnCount()(Code)
Returns the number of columns in the form. the number of columns



getColumnIncrementSign
final protected int getColumnIncrementSign()(Code)
Returns the sign (-1 or 1) used to increment the cursor's column when moving to the next column. -1 for right-to-left, 1 for left-to-right



getContainer
final public Container getContainer()(Code)
Returns the container used to build the form. the layout container



getLayout
final public FormLayout getLayout()(Code)
Returns the instance of FormLayout used to build this form. the FormLayout



getLeadingColumn
protected int getLeadingColumn()(Code)
Returns the index of the leading column.

Subclasses may override this method, for example, if the form has a leading gap column that should not be filled with components. the leading column




getRow
final public int getRow()(Code)
Returns the cursor's row. the cursor's row



getRowCount
final public int getRowCount()(Code)
Returns the number of rows in the form. the number of rows



isLeftToRight
final public boolean isLeftToRight()(Code)
Returns whether this builder fills the form left-to-right or right-to-left. The initial value of this property is set during the builder construction from the layout container's componentOrientation property. true indicates left-to-right, false indicates right-to-left
See Also:   AbstractFormBuilder.setLeftToRight(boolean)
See Also:   ComponentOrientation



nextColumn
final public void nextColumn()(Code)
Moves to the next column, does the same as #nextColumn(1).



nextColumn
final public void nextColumn(int columns)(Code)
Moves to the next column.
Parameters:
  columns - number of columns to move



nextLine
final public void nextLine()(Code)
Moves to the next line: increases the row and resets the column; does the same as #nextLine(1).



nextLine
final public void nextLine(int lines)(Code)
Moves the cursor down several lines: increases the row by the specified number of lines and sets the cursor to the leading column.
Parameters:
  lines - number of rows to move



nextRow
final public void nextRow()(Code)
Increases the row by one; does the same as #nextRow(1).



nextRow
final public void nextRow(int rows)(Code)
Increases the row by the specified rows.
Parameters:
  rows - number of rows to move



setAlignment
final public void setAlignment(CellConstraints.Alignment hAlign, CellConstraints.Alignment vAlign)(Code)
Sets the horizontal and vertical alignment.
Parameters:
  hAlign - the new horizontal alignment
Parameters:
  vAlign - the new vertical alignment



setBounds
final public void setBounds(int column, int row, int columnSpan, int rowSpan)(Code)
Sets the cell bounds (location and extent) to the given column, row, column span and row span.
Parameters:
  column - the new column index (grid x)
Parameters:
  row - the new row index (grid y)
Parameters:
  columnSpan - the new column span (grid width)
Parameters:
  rowSpan - the new row span (grid height)



setColumn
final public void setColumn(int column)(Code)
Sets the cursor to the given column.
Parameters:
  column - the cursor's new column index



setColumnSpan
final public void setColumnSpan(int columnSpan)(Code)
Sets the cursor's column span.
Parameters:
  columnSpan - the cursor's new column span (grid width)



setExtent
final public void setExtent(int columnSpan, int rowSpan)(Code)
Sets the cursor's extent to the given column span and row span.
Parameters:
  columnSpan - the new column span (grid width)
Parameters:
  rowSpan - the new row span (grid height)



setHAlignment
final public void setHAlignment(CellConstraints.Alignment alignment)(Code)
Sets the horizontal alignment.
Parameters:
  alignment - the new horizontal alignment



setLeftToRight
final public void setLeftToRight(boolean b)(Code)
Sets the form fill direction to left-to-right or right-to-left. The initial value of this property is set during the builder construction from the layout container's componentOrientation property.
Parameters:
  b - true indicates left-to-right, false right-to-left
See Also:   AbstractFormBuilder.isLeftToRight()
See Also:   ComponentOrientation



setOrigin
final public void setOrigin(int column, int row)(Code)
Sets the cursor's origin to the given column and row.
Parameters:
  column - the new column index
Parameters:
  row - the new row index



setRow
final public void setRow(int row)(Code)
Sets the cursor to the given row.
Parameters:
  row - the cursor's new row index



setRowSpan
final public void setRowSpan(int rowSpan)(Code)
Sets the cursor's row span.
Parameters:
  rowSpan - the cursor's new row span (grid height)



setVAlignment
final public void setVAlignment(CellConstraints.Alignment alignment)(Code)
Sets the vertical alignment.
Parameters:
  alignment - the new vertical alignment



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.