| java.lang.Object com.jgoodies.forms.factories.DefaultComponentFactory
DefaultComponentFactory | public class DefaultComponentFactory implements ComponentFactory(Code) | | A singleton implementaton of the
ComponentFactory interface that
creates UI components as required by the
com.jgoodies.forms.builder.PanelBuilder .
The texts used in methods #createLabel(String) and
#createTitle(String) 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".
author: Karsten Lentzsch version: $Revision: 1.2 $ |
createLabel | public JLabel createLabel(String textWithMnemonic)(Code) | | Creates and returns a label with an optional mnemonic.
createLabel("Name"); // No mnemonic
createLabel("N&ame"); // Mnemonic is 'a'
createLabel("Save &as"); // Mnemonic is the second 'a'
createLabel("Look&&Feel"); // No mnemonic, text is Look&Feel
Parameters: textWithMnemonic - the label's text - may contain a mnemonic an label with optional mnemonic |
createSeparator | public JComponent createSeparator(String text)(Code) | | Creates and returns a labeled separator with the label in the left-hand
side. Useful to separate paragraphs in a panel; often a better choice
than a TitledBorder .
Parameters: text - the title's text a title label with separator on the side |
createSeparator | public JComponent createSeparator(String text, int alignment)(Code) | | Creates and returns a labeled separator. Useful to separate paragraphs in
a panel, which is often a better choice than a TitledBorder .
Parameters: text - the title's text Parameters: alignment - text alignment: left, center, right a separator with title label |
createTitle | public JLabel createTitle(String textWithMnemonic)(Code) | | Creates and returns a label that uses the foreground color and font of a
TitledBorder .
createTitle("Name"); // No mnemonic
createTitle("N&ame"); // Mnemonic is 'a'
createTitle("Save &as"); // Mnemonic is the second 'a'
createTitle("Look&&Feel"); // No mnemonic, text is Look&Feel
Parameters: textWithMnemonic - the title's text - may contain a mnemonic an emphasized title label |
getInstance | public static DefaultComponentFactory getInstance()(Code) | | Returns the sole instance of this factory class.
the sole instance of this factory class |
|
|