|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.forms.builder.AbstractFormBuilder
com.jgoodies.forms.builder.PanelBuilder
com.jgoodies.uif.builder.PanelBuilder2
public class PanelBuilder2
Adds a feature to its superclass PanelBuilder that labels with a mnemonic are associated with the next added focusable component. This feature shall be moved to the PanelBuilder.
Note: This class has been temporarily added to the UIF. The support for automatically associating added focusable components with a previously added label that has a mnemonic will be moved to the Forms library core in the Forms 1.3.
Constructor Summary | |
---|---|
PanelBuilder2(com.jgoodies.forms.layout.FormLayout layout)
Constructs a PanelBuilder2 for the given
layout. |
|
PanelBuilder2(com.jgoodies.forms.layout.FormLayout layout,
JPanel panel)
Constructs a PanelBuilder2 for the given
FormLayout and layout container. |
Method Summary | |
---|---|
Component |
add(Component component,
com.jgoodies.forms.layout.CellConstraints cellConstraints)
Adds a component to the panel using the given cell constraints. |
static boolean |
getLabelForFeatureEnabledDefault()
Returns the global default for the enablement of the setLabelFor feature. |
protected boolean |
isLabelForApplicable(Component component)
Checks and answers whether the given component shall be set as component for a previously added label with mnemonic using JLabel.setLabelFor(Component) . |
boolean |
isLabelForFeatureEnabled()
Returns whether the setLabelFor feature is enabled for this PanelBuilder. |
void |
setLabelForFeatureEnabled(boolean b)
Enables or disables the setLabelFor feature for this PanelBuilder. |
static void |
setLabelForFeatureEnabledDefault(boolean b)
Sets the default value for the setLabelFor feature enablement. |
Methods inherited from class com.jgoodies.forms.builder.PanelBuilder |
---|
add, addLabel, addLabel, addLabel, addLabel, addSeparator, addSeparator, addSeparator, addSeparator, addTitle, addTitle, addTitle, getComponentFactory, getPanel, setBackground, setBorder, setComponentFactory, setDefaultDialogBorder, setOpaque |
Methods inherited from class com.jgoodies.forms.builder.AbstractFormBuilder |
---|
add, add, appendColumn, appendColumn, appendGlueColumn, appendGlueRow, appendLabelComponentsGapColumn, appendParagraphGapRow, appendRelatedComponentsGapColumn, appendRelatedComponentsGapRow, appendRow, appendRow, appendUnrelatedComponentsGapColumn, appendUnrelatedComponentsGapRow, cellConstraints, createLeftAdjustedConstraints, getColumn, getColumnCount, getColumnIncrementSign, getContainer, getLayout, getLeadingColumn, getRow, getRowCount, isLeftToRight, nextColumn, nextColumn, nextLine, nextLine, nextRow, nextRow, setAlignment, setBounds, setColumn, setColumnSpan, setExtent, setHAlignment, setLeftToRight, setOrigin, setRow, setRowSpan, setVAlignment |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PanelBuilder2(com.jgoodies.forms.layout.FormLayout layout)
PanelBuilder2
for the given
layout. Uses an instance of JPanel
as layout container
with the given layout as layout manager.
layout
- the FormLayout to usepublic PanelBuilder2(com.jgoodies.forms.layout.FormLayout layout, JPanel panel)
PanelBuilder2
for the given
FormLayout and layout container.
layout
- the FormLayout to usepanel
- the layout container to build onMethod Detail |
---|
public static boolean getLabelForFeatureEnabledDefault()
setLabelForFeatureEnabled(boolean)
.
The feature is globally disabled by default.
public static void setLabelForFeatureEnabledDefault(boolean b)
setLabelForFeatureEnabled(boolean)
.
The default value is used to set the initial PanelBuilder
setting for this feature.
The feature is globally disabled by default.
b
- true for globally enabled, false for globally disabledpublic boolean isLabelForFeatureEnabled()
getLabelForFeatureEnabledDefault()
. It is globally disabled
by default.
public void setLabelForFeatureEnabled(boolean b)
getLabelForFeatureEnabledDefault()
. It is globally disabled
by default.
b
- true for enabled, false for disabledpublic Component add(Component component, com.jgoodies.forms.layout.CellConstraints cellConstraints)
TODO: Consider to clear the most recently added mnemonic label if another label is added - even if the latter has no mnemonic set.
add
in class com.jgoodies.forms.builder.AbstractFormBuilder
component
- the component to addcellConstraints
- the component's cell constraints
isLabelForFeatureEnabled()
,
isLabelForApplicable(Component)
protected boolean isLabelForApplicable(Component component)
JLabel.setLabelFor(Component)
.
This default implementation just checks whether the component is
focusable. Subclasses may override.
component
- the component to be checked
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |