| java.lang.Object jimm.datavision.gui.EditFieldLayout
EditFieldLayout | public class EditFieldLayout (Code) | | Lays out a bunch of label/edit widget pairs. Optionally creates
the edit widget for you. This is not a layout manager per se.
Calling any of the add * methods creates label/edit
widget pairs. Calling getPanel returns a panel containing
the labels and edit widgets, arranged for your pleasure.
author: Jim Menard, jimm@io.com |
Inner Class :static class Row | |
Method Summary | |
public Component | add(String label, Component c) Adds the label/component pair to the layout and returns the component. | public JButton | addButton(String label) Creates a button and adds it to the right-hand side, under the fields. | public JCheckBox | addCheckBox(String label) Creates a check box and adds it and the label. | public JCheckBox | addCheckBox(String label, int key) Creates a check box and adds it and the label. | public JComboBox | addComboBox(String label, Object[] items) Creates a combo box and adds it and the label. | public JComboBox | addComboBox(String label, Object[] items, boolean editable) Creates a combo box and adds it and the label. | public JLabel | addLabel(String label, String text) Creates two labels and adds them. | public JPasswordField | addPasswordField(String label) Creates a password field and adds it and the label. | public JPasswordField | addPasswordField(String label, int columns) Creates a password field and adds it and the label. | public JPasswordField | addPasswordField(String label, String password) Creates a password field and adds it and the label. | public JPasswordField | addPasswordField(String label, String password, int columns) Creates a password field and adds it and the label. | public JTextArea | addTextArea(String label) Creates a text area and adds it and the label. | public JTextArea | addTextArea(String label, int rows, int cols) Creates a text area and adds it and the label. | public JTextArea | addTextArea(String label, String text) Creates a text area and adds it and the label. | public JTextArea | addTextArea(String label, String text, int rows, int cols) Creates a text area and adds it and the label. | public JTextField | addTextField(String label) Creates a text field and adds it and the label. | public JTextField | addTextField(String label, int columns) Creates a text field and adds it and the label. | public JTextField | addTextField(String label, String text) Creates a text field and adds it and the label. | public JTextField | addTextField(String label, String text, int columns) Creates a text field and adds it and the label. | protected void | buildPanel() Builds the panel. | public JPanel | getPanel() Returns the panel containing all the labels and edit widgets. | public void | setBorder(int allSides) Creates an empty border the same size on all sides. | public void | setBorder(int top, int left, int bottom, int right) Creates an empty border on all sides. | public void | skipRow() Creates an empty row. |
EditFieldLayout | public EditFieldLayout()(Code) | | |
add | public Component add(String label, Component c)(Code) | | Adds the label/component pair to the layout and returns the component.
If label does not end with a colon, one will be added.
label may be null , in which case no label is
displayed.
All the other add* methods call this one.
Parameters: label - a possibly null label string Parameters: c - a GUI component the component |
addButton | public JButton addButton(String label)(Code) | | Creates a button and adds it to the right-hand side, under the fields.
Parameters: label - a button label the new button |
addCheckBox | public JCheckBox addCheckBox(String label)(Code) | | Creates a check box and adds it and the label.
Parameters: label - a possibly null label string the new check box |
addCheckBox | public JCheckBox addCheckBox(String label, int key)(Code) | | Creates a check box and adds it and the label.
Parameters: label - a possibly null label string Parameters: key - the mnemonic key (a KeyEvent constant) the new check box |
addComboBox | public JComboBox addComboBox(String label, Object[] items)(Code) | | Creates a combo box and adds it and the label.
Parameters: label - a possibly null label string Parameters: items - an array of objects the new combo box |
addComboBox | public JComboBox addComboBox(String label, Object[] items, boolean editable)(Code) | | Creates a combo box and adds it and the label.
Parameters: label - a possibly null label string Parameters: items - an array of objects Parameters: editable - if true , the combo box will allow customvalue entry by the user the new combo box |
addLabel | public JLabel addLabel(String label, String text)(Code) | | Creates two labels and adds them.
Parameters: label - a possibly null label string Parameters: text - text for the right-hand label the new right-hand label |
addPasswordField | public JPasswordField addPasswordField(String label)(Code) | | Creates a password field and adds it and the label.
Parameters: label - a possibly null label string the new password field |
addPasswordField | public JPasswordField addPasswordField(String label, int columns)(Code) | | Creates a password field and adds it and the label.
Parameters: label - a possibly null label string Parameters: columns - the password field's size the new password field |
addPasswordField | public JPasswordField addPasswordField(String label, String password)(Code) | | Creates a password field and adds it and the label.
Parameters: label - a possibly null label string Parameters: password - the initial password text the new password field |
addPasswordField | public JPasswordField addPasswordField(String label, String password, int columns)(Code) | | Creates a password field and adds it and the label.
Parameters: label - a possibly null label string Parameters: password - the initial password text Parameters: columns - the password field's size the new password field |
addTextArea | public JTextArea addTextArea(String label)(Code) | | Creates a text area and adds it and the label.
Parameters: label - a possibly null label string the new text area |
addTextArea | public JTextArea addTextArea(String label, int rows, int cols)(Code) | | Creates a text area and adds it and the label.
Parameters: label - a possibly null label string Parameters: rows - the text field's height Parameters: cols - the text field's width the new text area |
addTextArea | public JTextArea addTextArea(String label, String text)(Code) | | Creates a text area and adds it and the label.
Parameters: label - a possibly null label string Parameters: text - the text field's initial text the new text area |
addTextArea | public JTextArea addTextArea(String label, String text, int rows, int cols)(Code) | | Creates a text area and adds it and the label.
Parameters: label - a possibly null label string Parameters: text - the text field's initial text Parameters: rows - the text field's height Parameters: cols - the text field's width the new text area |
addTextField | public JTextField addTextField(String label)(Code) | | Creates a text field and adds it and the label.
Parameters: label - a possibly null label string the new text field |
addTextField | public JTextField addTextField(String label, int columns)(Code) | | Creates a text field and adds it and the label.
Parameters: label - a possibly null label string Parameters: columns - the text field's size the new text field |
addTextField | public JTextField addTextField(String label, String text)(Code) | | Creates a text field and adds it and the label.
Parameters: label - a possibly null label string Parameters: text - the text field's initial text the new text field |
addTextField | public JTextField addTextField(String label, String text, int columns)(Code) | | Creates a text field and adds it and the label.
Parameters: label - a possibly null label string Parameters: text - the text field's initial text Parameters: columns - the text field's size the new text field |
buildPanel | protected void buildPanel()(Code) | | Builds the panel.
|
getPanel | public JPanel getPanel()(Code) | | Returns the panel containing all the labels and edit widgets. Lazily
instantiates the panel.
the panel containing all the labels and edit widgets |
setBorder | public void setBorder(int allSides)(Code) | | Creates an empty border the same size on all sides.
Parameters: allSides - the width of the border |
setBorder | public void setBorder(int top, int left, int bottom, int right)(Code) | | Creates an empty border on all sides.
Parameters: top - top border size Parameters: left - left border size Parameters: bottom - bottom border size Parameters: right - right border size |
skipRow | public void skipRow()(Code) | | Creates an empty row.
|
|
|