|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ComponentFactory
An interface that defines the factory methods as used by th
PanelBuilder and its subclasses.
#createLabel(String)
#createTitle(String), an
#createSeparator(String, int) can contain an optiona
mnemonic marker. The mnemonic and mnemonic index are indicate
by a single ampersand (&). For exampl
"&Save", or "Save &as"
To use the ampersand itself duplicate it, for exampl
"Look&&Feel".
DefaultComponentFactory,
PanelBuilder| Method Summary | |
|---|---|
JButton |
createButton(Action action)
Creates and returns a button that is bound to the given Action. |
JLabel |
createHeaderLabel(String markedText)
Creates and returns a label intended for pane headers that use a larger font than the control font and a special foreground color. |
JLabel |
createLabel(String textWithMnemonic)
Creates and returns a label with an optional mnemonic. |
JLabel |
createReadOnlyLabel(String textWithMnemonic)
Creates and returns a label with an optional mnemoni that is intended to label a read-only component. |
JComponent |
createSeparator(String textWithMnemonic,
int alignment)
Creates and returns a labeled separator. |
JLabel |
createTitle(String textWithMnemonic)
Creates and returns a title label that uses the foreground colo and font of a TitledBorder. |
| Method Detail |
|---|
JButton createButton(Action action)
JGButton is bound to some custom Action properties.
action - provides [bound] visual properties for the button
JLabel createLabel(String textWithMnemonic)
textWithMnemonic - the label's text
may contain an ampersand (&) to mark a mnemonic
JLabel createReadOnlyLabel(String textWithMnemonic)
textWithMnemonic - the label's text
may contain an ampersand (&) to mark a mnemonic
JLabel createTitle(String textWithMnemonic)
TitledBorder.
textWithMnemonic - the label's text
may contain an ampersand (&) to mark a mnemonic
JLabel createHeaderLabel(String markedText)
markedText is "&Charge Codes", the tex will be set to "Charge Codes", the mnemonic is 'C', and th mnemonic index is 0.
createTitle(String).
markedText - the label text with optional mnemonic marker
JComponent createSeparator(String textWithMnemonic,
int alignment)
TitledBorder.
textWithMnemonic - the label's text
may contain an ampersand (&) to mark a mnemonicalignment - text alignment, one of SwingConstants.LEFT
SwingConstants.CENTER, SwingConstants.RIGHT
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||