com.evanmclean.evlib.tablelayout
Class TableLayoutConstraintFactory

java.lang.Object
  extended by com.evanmclean.evlib.tablelayout.TableLayoutConstraintFactory

public class TableLayoutConstraintFactory
extends Object

Utility to make it easy to create TableLayoutConstraint objects for the TableLayout layout manager. See summary for an example of typical usage.

Author:
Evan McLean McLean Computer Services (see the overview for copyright and licensing.)

Nested Class Summary
 class TableLayoutConstraintFactory.Builder
          This is the builder that actually performs the assembly of constraints.
 
Field Summary
 int cols
          The number of columns in this layout (0 for unspecified).
 int rows
          The number of rows in this layout (0 for unspecified).
 
Constructor Summary
TableLayoutConstraintFactory()
          Create a factory with no specified number of columns and rows.
TableLayoutConstraintFactory(int cols, int rows)
          Create a factory with the specified number of columns and rows.
TableLayoutConstraintFactory(info.clearthought.layout.TableLayout layout)
          Create a factory with the number of columns and rows as defined in the specified layout.
 
Method Summary
 TableLayoutConstraintFactory.Builder build()
          Create a builder initially set at column 0, row 0, width of 1, height of 1, and full alignment both horizontally and vertically.
 TableLayoutConstraintFactory.Builder build(int col, int row)
          Create a builder initially width the specified column and row position, width of 1, height of 1, and full alignment both horizontally and vertically.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cols

public final int cols
The number of columns in this layout (0 for unspecified).


rows

public final int rows
The number of rows in this layout (0 for unspecified).

Constructor Detail

TableLayoutConstraintFactory

public TableLayoutConstraintFactory()
Create a factory with no specified number of columns and rows.


TableLayoutConstraintFactory

public TableLayoutConstraintFactory(int cols,
                                    int rows)
Create a factory with the specified number of columns and rows.

Parameters:
cols -
rows -

TableLayoutConstraintFactory

public TableLayoutConstraintFactory(info.clearthought.layout.TableLayout layout)
Create a factory with the number of columns and rows as defined in the specified layout.

Parameters:
layout -
Method Detail

build

public TableLayoutConstraintFactory.Builder build()
Create a builder initially set at column 0, row 0, width of 1, height of 1, and full alignment both horizontally and vertically.

Returns:
The new builder.

build

public TableLayoutConstraintFactory.Builder build(int col,
                                                  int row)
Create a builder initially width the specified column and row position, width of 1, height of 1, and full alignment both horizontally and vertically.

Parameters:
col -
row -
Returns:
The new builder.