com.jgoodies.forms.builder
Class AbstractButtonPanelBuilder
public abstract class AbstractButtonPanelBuilder
The abstract superclass for
ButtonBarBuilder2
.
Provides a cell cursor for traversing
the button bar/stack while components are added. It also offers
convenience methods to append logical columns and rows.
TODO: Mention the ButtonStackBuilder2 subclass as soon as it is available.
protected Component | add(Component component) - Adds a component to the container using the default cell constraints.
|
protected void | appendColumn(ColumnSpec columnSpec) - Appends the given column specification to the builder's layout.
|
protected void | appendGlueColumn() - Appends a glue column.
|
protected void | appendGlueRow() - Appends a glue row.
|
protected void | appendRelatedComponentsGapColumn() - Appends a column that is the default gap for related components.
|
protected void | appendRelatedComponentsGapRow() - Appends a row that is the default gap for related components.
|
protected void | appendRow(RowSpec rowSpec) - Appends the given row specification to the builder's layout.
|
protected void | appendUnrelatedComponentsGapColumn() - Appends a column that is the default gap for unrelated components.
|
protected void | appendUnrelatedComponentsGapRow() - Appends a row that is the default gap for unrelated components.
|
JPanel | getContainer() - Returns the container used to build the form.
|
FormLayout | getLayout() - Returns the instance of
FormLayout used to build this form.
|
JPanel | getPanel() - Returns the panel used to build the form.
|
boolean | isLeftToRight() - Returns whether this builder fills the form left-to-right
or right-to-left.
|
protected void | nextColumn() - Moves to the next column, does the same as #nextColumn(1).
|
protected void | nextRow() - Increases the row by one; does the same as #nextRow(1).
|
void | setBackground(Color background) - Sets the panel's background color.
|
void | setBorder(Border border) - Sets the panel's border.
|
void | setLeftToRight(boolean b) - Sets the form fill direction to left-to-right or right-to-left.
|
void | setOpaque(boolean b) - Sets the panel's opaque state.
|
AbstractButtonPanelBuilder
protected AbstractButtonPanelBuilder(FormLayout layout,
JPanel container)
Constructs a AbstractFormBuilder
for the given FormLayout and layout container.
layout
- the FormLayout
to usecontainer
- the layout container
add
protected final Component add(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.
component
- the component to add
appendColumn
protected final void appendColumn(ColumnSpec columnSpec)
Appends the given column specification to the builder's layout.
columnSpec
- the column specification object to append
appendGlueColumn
protected final void appendGlueColumn()
Appends a glue column.
appendGlueRow
protected final void appendGlueRow()
Appends a glue row.
appendRelatedComponentsGapColumn
protected final void appendRelatedComponentsGapColumn()
Appends a column that is the default gap for related components.
appendRelatedComponentsGapRow
protected final void appendRelatedComponentsGapRow()
Appends a row that is the default gap for related components.
appendRow
protected final void appendRow(RowSpec rowSpec)
Appends the given row specification to the builder's layout.
rowSpec
- the row specification object to append
appendUnrelatedComponentsGapColumn
protected final void appendUnrelatedComponentsGapColumn()
Appends a column that is the default gap for unrelated components.
appendUnrelatedComponentsGapRow
protected final void appendUnrelatedComponentsGapRow()
Appends a row that is the default gap for unrelated components.
getContainer
public final JPanel getContainer()
Returns the container used to build the form.
- the layout container, a {code JPanel}.
getLayout
public final FormLayout getLayout()
Returns the instance of
FormLayout
used to build this form.
getPanel
public final JPanel getPanel()
Returns the panel used to build the form.
- the panel used by this builder to build the form
isLeftToRight
public final boolean isLeftToRight()
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
nextColumn
protected final void nextColumn()
Moves to the next column, does the same as #nextColumn(1).
nextRow
protected final void nextRow()
Increases the row by one; does the same as #nextRow(1).
setBackground
public final void setBackground(Color background)
Sets the panel's background color.
background
- the color to set as new background
JComponent.setBackground(Color)
setBorder
public final void setBorder(Border border)
Sets the panel's border.
border
- the border to set
JComponent.setBorder(Border)
setLeftToRight
public final void setLeftToRight(boolean b)
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.
b
- true indicates left-to-right, false right-to-left
setOpaque
public final void setOpaque(boolean b)
Sets the panel's opaque state.
b
- true for opaque, false for non-opaque
JComponent.setOpaque(boolean)
Copyright © 2002-2008 JGoodies Karsten Lentzsch. All Rights Reserved.