|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.forms.builder.AbstractBuilder
com.jgoodies.forms.builder.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.
Field Summary | |
---|---|
protected static java.lang.String |
NARROW_KEY
The client property key used to indicate that a button shall get narrow margins on the left and right hand side. |
Fields inherited from class com.jgoodies.forms.builder.AbstractBuilder |
---|
currentCellConstraints |
Constructor Summary | |
---|---|
protected |
AbstractButtonPanelBuilder(FormLayout layout,
javax.swing.JPanel container)
Constructs an AbstractButtonPanelBuilder for the given FormLayout and layout container. |
Method Summary | |
---|---|
protected java.awt.Component |
add(java.awt.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. |
protected javax.swing.JButton |
createButton(javax.swing.Action action)
Creates and returns a button that is bound to the given Action. |
protected int |
getColumn()
|
javax.swing.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(java.awt.Color background)
Sets the panel's background color. |
void |
setBorder(javax.swing.border.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. |
Methods inherited from class com.jgoodies.forms.builder.AbstractBuilder |
---|
createComponentFactory, getColumnCount, getComponentFactory, getContainer, getDefaultComponentFactory, getLayout, getRowCount, setComponentFactory, setDefaultComponentFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String NARROW_KEY
This optional setting will be honored by all JGoodies Look&Feel implementations. The Mac Aqua l&f uses narrow margins only. Other look&feel implementations will likely ignore this key and so may render a wider button margin.
Constructor Detail |
---|
protected AbstractButtonPanelBuilder(FormLayout layout, javax.swing.JPanel container)
layout
- the FormLayout to usecontainer
- the layout container
java.lang.NullPointerException
- if layout
or container
is null
Method Detail |
---|
public final javax.swing.JPanel getPanel()
public final void setBackground(java.awt.Color background)
background
- the color to set as new backgroundJComponent.setBackground(Color)
public final void setBorder(javax.swing.border.Border border)
border
- the border to setJComponent.setBorder(Border)
public final void setOpaque(boolean b)
b
- true for opaque, false for non-opaqueJComponent.setOpaque(boolean)
public final boolean isLeftToRight()
componentOrientation
property.
setLeftToRight(boolean)
,
ComponentOrientation
public final void setLeftToRight(boolean b)
componentOrientation
property.
b
- true indicates left-to-right, false right-to-leftisLeftToRight()
,
ComponentOrientation
protected final void nextColumn()
protected int getColumn()
protected final void nextRow()
protected final void appendColumn(ColumnSpec columnSpec)
columnSpec
- the column specification object to appendprotected final void appendGlueColumn()
appendRelatedComponentsGapColumn()
,
appendUnrelatedComponentsGapColumn()
protected final void appendRelatedComponentsGapColumn()
appendGlueColumn()
,
appendUnrelatedComponentsGapColumn()
protected final void appendUnrelatedComponentsGapColumn()
appendGlueColumn()
,
appendRelatedComponentsGapColumn()
protected final void appendRow(RowSpec rowSpec)
rowSpec
- the row specification object to appendprotected final void appendGlueRow()
appendRelatedComponentsGapRow()
,
appendUnrelatedComponentsGapRow()
protected final void appendRelatedComponentsGapRow()
appendGlueRow()
,
appendUnrelatedComponentsGapRow()
protected final void appendUnrelatedComponentsGapRow()
appendGlueRow()
,
appendRelatedComponentsGapRow()
protected final java.awt.Component add(java.awt.Component component)
component
- the component to add
protected javax.swing.JButton createButton(javax.swing.Action action)
JGButton
configures
the accessible name and accessible description from Actions
that provide these information.
This default implementation delegates the button creation to this
builder's component factory, if it is an an instance of ComponentFactory
(that provides ComponentFactory2.createButton(Action)
).
Otherwise a JButton is created.
action
- provides bound visual properties for the button
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |