|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ComponentFactory
A factory interface for encapsulating logic to create well-formed, configured GUI controls.
Method Summary | |
---|---|
void |
addConfiguredTab(JTabbedPane tabbedPane,
String labelKey,
JComponent tabComponent)
Adds a tab to the provided tabbed pane, configuring the tab's appearance from information retrieved using the labelKey property. |
void |
configureForEnum(JComboBox comboBox,
Class enumType)
Configure a combo box to be populated with all enums of the specified enumeration type. |
JButton |
createButton(String labelKey)
Create and configure a button with the specified label key. |
JCheckBox |
createCheckBox(String labelKey)
Create a configured checkbox. |
JCheckBox |
createCheckBox(String[] labelKeys)
Create a configured checkbox. |
JComboBox |
createComboBox()
Create a combo box using this component factory. |
JComboBox |
createComboBox(Class enumType)
Create a combo box using this component factory, to be populated by the list of all enums of the specified type, resolved using this factory's enum resolver. |
JFormattedTextField |
createFormattedTextField(JFormattedTextField.AbstractFormatterFactory formatterFactory)
Create a formatted text field using this component factory. |
JLabel |
createLabel(String labelKey)
Create and configure a label with the specified label key. |
JLabel |
createLabel(String[] labelKeys)
Create and configure a label with the specified label key. |
JLabel |
createLabel(String labelKey,
Object[] arguments)
Creates and configure a label with the specified label key and parameterized arguments. |
JLabel |
createLabel(String labelKey,
ValueModel[] argumentValueHolders)
Creates and configure a label with the specified label key and parameterized arguments. |
JComponent |
createLabeledSeparator(String labelKey)
Create and configure an left-aligned label acting as a form dividing separator; that is, a control that displays a label and a separator immediately underneath it. |
JComponent |
createLabeledSeparator(String labelKey,
Alignment alignment)
Create and configure an aligned label acting as a form dividing separator; that is, a control that displays a label and a separator immediately underneath it. |
JLabel |
createLabelFor(String[] labelKeys,
JComponent comp)
Create and configure a label for the provided component. |
JLabel |
createLabelFor(String labelKey,
JComponent comp)
Create and configure a label for the provided component. |
JList |
createList()
Create a list using this component factory. |
JComboBox |
createListValueModelComboBox(ValueModel selectedItemValueModel,
ValueModel selectableItemsListHolder,
String renderedPropertyPath)
Create a combo box using this component factory. |
JMenuItem |
createMenuItem(String labelKey)
Create a configured menu item. |
JPanel |
createPanel()
Creates a panel using this component factory. |
JPanel |
createPanel(LayoutManager layoutManager)
Creates a panel with the supplied LayoutManager using this component factory. |
JPasswordField |
createPasswordField()
Create a standard password field using this component factory. |
JRadioButton |
createRadioButton(String labelKey)
Create a configured radio button. |
JRadioButton |
createRadioButton(String[] labelKeys)
Create a configured radio button. |
JScrollPane |
createScrollPane()
Create a scroll pane using this component factory. |
JScrollPane |
createScrollPane(Component view)
Create a scroll pane using this component factory, with the specified component as the viewport view. |
JScrollPane |
createScrollPane(Component view,
int vsbPolicy,
int hsbPolicy)
Create a scroll pane using this component factory, with the specified component as the viewport view and with the specified vertical and horizontal scrollbar policies. |
JTabbedPane |
createTabbedPane()
Create and return a new tabbed pane. |
JTable |
createTable()
Construct a JTable with a default model. |
JTable |
createTable(TableModel model)
Construct a JTable with the specified table model. |
JTextArea |
createTextArea()
Create a text area using this component factory. |
JTextArea |
createTextArea(int row,
int columns)
Create a text area using this component factory. |
JTextArea |
createTextAreaAsLabel()
Create a text area that looks like a label (but with cut/copy/paste enabled!) using this component factory. |
JTextField |
createTextField()
Create a standard text field using this component factory. |
JComponent |
createTitledBorderFor(String labelKey,
JComponent comp)
Creates a titled border for the specified component. |
JLabel |
createTitleLabel(String labelKey)
Create and configure a title label with the specified label key. |
JToggleButton |
createToggleButton(String labelKey)
Create a configured toggle button. |
JToggleButton |
createToggleButton(String[] labelKeys)
Create a configured toggle button. |
JComponent |
createToolBar()
Construct a JToolBar. |
Method Detail |
---|
JLabel createLabel(String labelKey)
labelKey
- The label message code; may also be the label text if no
message source is configured.
JLabel createLabel(String[] labelKeys)
labelKey
- The label message code; may also be the label text if no
message source is configured.
JLabel createLabel(String labelKey, Object[] arguments)
labelKey
- arguments
-
JLabel createLabel(String labelKey, ValueModel[] argumentValueHolders)
labelKey
- argumentValueHolders
- The value model of the arguments;
JLabel createTitleLabel(String labelKey)
labelKey
- The label message code; may also be the label text if no
message source is configured.
JComponent createTitledBorderFor(String labelKey, JComponent comp)
labelKey
- the title label message code.comp
- the component to attach a titled border to.
JLabel createLabelFor(String labelKey, JComponent comp)
labelKey
- The label message code; may also be the label text if no
message source is configured.comp
- the labeled component
JLabel createLabelFor(String[] labelKeys, JComponent comp)
labelKey
- The label message code; may also be the label text if no
message source is configured.comp
- the labeled component
JButton createButton(String labelKey)
labelKey
- The label message code; may also be the label text if no
message source is configured.
JComponent createLabeledSeparator(String labelKey)
labelKey
- The label message code; may also be the label text if no
message source is configured.
JComponent createLabeledSeparator(String labelKey, Alignment alignment)
labelKey
- The label message code; may also be the label text if no
message source is configured.alignment
- The label's alignment.
JList createList()
JComboBox createComboBox()
JComboBox createListValueModelComboBox(ValueModel selectedItemValueModel, ValueModel selectableItemsListHolder, String renderedPropertyPath)
the
- value model for the list of selectable itemsthe
- property to render each item in the list.
JComboBox createComboBox(Class enumType)
void configureForEnum(JComboBox comboBox, Class enumType)
enumType
- The enumeration type.JMenuItem createMenuItem(String labelKey)
labelKey
- The label message code; may also be the label text if no
message source is configured.
JCheckBox createCheckBox(String labelKey)
labelKey
- The label message code; may also be the label text if no
message source is configured.
JCheckBox createCheckBox(String[] labelKeys)
labelKeys
- The label message codes; may also be the label text if
no message source is configured.
JToggleButton createToggleButton(String labelKey)
labelKey
- The label message code; may also be the label text if no
message source is configured.
JToggleButton createToggleButton(String[] labelKeys)
labelKeys
- The label message codes; may also be the label text if
no message source is configured.
JRadioButton createRadioButton(String labelKey)
labelKey
- The label message code; may also be the label text if no
message source is configured.
JRadioButton createRadioButton(String[] labelKeys)
labelKeys
- The label message codes; may also be the label text if
no message source is configured.
JFormattedTextField createFormattedTextField(JFormattedTextField.AbstractFormatterFactory formatterFactory)
formatterFactory
- AbstractFormatterFactory used for formatting.
JTextField createTextField()
JPasswordField createPasswordField()
JTextArea createTextArea()
JTextArea createTextArea(int row, int columns)
JTextArea createTextAreaAsLabel()
JTabbedPane createTabbedPane()
void addConfiguredTab(JTabbedPane tabbedPane, String labelKey, JComponent tabComponent)
labelKey
property.
The tab title text, icon, mnemonic, and mnemonic index are all
configurable.
tabbedPane
- labelKey
- tabComponent
- JScrollPane createScrollPane()
JScrollPane.JScrollPane()
JScrollPane createScrollPane(Component view)
view
- the component to display in the scrollpane's viewport
JScrollPane.JScrollPane(java.awt.Component)
JScrollPane createScrollPane(Component view, int vsbPolicy, int hsbPolicy)
view
- the component to display in the scrollpane's viewportvsbPolicy
- set the vertical scrollbar policy.hsbPolicy
- set the horizontal scrollbar policy.
JScrollPane.JScrollPane(java.awt.Component, int, int)
JPanel createPanel()
JPanel
JPanel createPanel(LayoutManager layoutManager)
layoutManager
- the LayoutManager that will be used by the returned
panel
JPanel.JPanel(java.awt.LayoutManager)
JTable createTable()
JTable createTable(TableModel model)
model
- TableModel to install into the new table
JComponent createToolBar()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |