|
||||||||||
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.forms.builder.AbstractI15dPanelBuilder
com.jgoodies.uif.builder.I15dPanelBuilder2
public class I15dPanelBuilder2
A general purpose panel builder that uses the FormLayout
to lay out JPanel
s. In addition to its superclass
PanelBuilder
this class provides convenience behavior to map
resource keys to their associated internationalized (i15d) strings
when adding labels, titles and titled separators.
The localized texts used in methods #addI15dLabel
and #addI15dTitle
can contain an optional mnemonic marker.
The mnemonic and mnemonic index are indicated by a single ampersand
(&). For example "&Save", or
"Save &as". To use the ampersand itself,
duplicate it, for example "Look&&Feel".
Note: This class has been temporarily extended to add support for automatically associating added focusable components with a previously added label that has a mnemonic. This support will be moved to the Forms library core in the Forms 1.3.
ResourceMap
Constructor Summary | |
---|---|
I15dPanelBuilder2(com.jgoodies.forms.layout.FormLayout layout,
ResourceMap resourceMap)
Constructs a I15dPanelBuilder2 for the given
layout and resource bundle. |
|
I15dPanelBuilder2(com.jgoodies.forms.layout.FormLayout layout,
ResourceMap resourceMap,
JPanel panel)
Constructs a I15dPanelBuilder2
for the given FormLayout, resource bundle, 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. |
protected String |
getI15dString(String resourceKey)
Looks up and returns the internationalized (i15d) string for the given resource key from the ResourceMap . |
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. |
Methods inherited from class com.jgoodies.forms.builder.AbstractI15dPanelBuilder |
---|
addI15dLabel, addI15dLabel, addI15dLabel, addI15dSeparator, addI15dSeparator, addI15dTitle, addI15dTitle, isDebugToolTipsEnabled, setDebugToolTipsEnabled |
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 I15dPanelBuilder2(com.jgoodies.forms.layout.FormLayout layout, ResourceMap resourceMap)
I15dPanelBuilder2
for the given
layout and resource bundle. Uses an instance of JPanel
as layout container.
layout
- the FormLayout
used to layout the containerresourceMap
- the ResourceMap
used to look up i15d strings
NullPointerException
- if resourceMap is nullpublic I15dPanelBuilder2(com.jgoodies.forms.layout.FormLayout layout, ResourceMap resourceMap, JPanel panel)
I15dPanelBuilder2
for the given FormLayout, resource bundle, and layout container.
layout
- the FormLayout
used to layout the containerresourceMap
- the ResourceMap
used to look up i15d stringspanel
- the layout container
NullPointerException
- if resourceMap is nullMethod Detail |
---|
public boolean isLabelForFeatureEnabled()
PanelBuilder2.getLabelForFeatureEnabledDefault()
.
It is globally disabled by default.
public void setLabelForFeatureEnabled(boolean b)
PanelBuilder2.getLabelForFeatureEnabledDefault()
.
It is globally disabled by default.
b
- true for enabled, false for disabledprotected String getI15dString(String resourceKey)
ResourceMap
.
getI15dString
in class com.jgoodies.forms.builder.AbstractI15dPanelBuilder
resourceKey
- the key to look for in the resource map
public 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 |