| javax.swing.JPanel org.apache.jorphan.gui.JLabeledChoice
Constructor Summary | |
public | JLabeledChoice() Default constructor, The label and the Text field are left empty. | public | JLabeledChoice(String pLabel, boolean editable) | public | JLabeledChoice(String pLabel, String[] items) Constructs a non-edittable combo-box with the label displaying the passed text. | public | JLabeledChoice(String pLabel, String[] items, boolean editable) Constructs a combo-box with the label displaying the passed text. |
JLabeledChoice | public JLabeledChoice()(Code) | | Default constructor, The label and the Text field are left empty.
|
JLabeledChoice | public JLabeledChoice(String pLabel, boolean editable)(Code) | | |
JLabeledChoice | public JLabeledChoice(String pLabel, String[] items)(Code) | | Constructs a non-edittable combo-box with the label displaying the passed text.
Parameters: pLabel - - the text to display in the label. Parameters: items - - the items to display in the Combo box |
JLabeledChoice | public JLabeledChoice(String pLabel, String[] items, boolean editable)(Code) | | Constructs a combo-box with the label displaying the passed text.
Parameters: pLabel - - the text to display in the label. Parameters: items - - the items to display in the Combo box Parameters: editable - - if true, then Add and Delete buttons are created. |
addChangeListener | public void addChangeListener(ChangeListener pChangeListener)(Code) | | Adds a change listener, that will be notified when the text in the text
field is changed. The ChangeEvent that will be passed to registered
listeners will contain this object as the source, allowing the new text
to be extracted using the
JLabeledChoice.getText() getText method.
Parameters: pChangeListener - The listener to add |
getComponentList | public List getComponentList()(Code) | | |
getLabel | public String getLabel()(Code) | | Returns the text of the label.
The text of the label. |
getSelectedIndex | public int getSelectedIndex()(Code) | | |
getText | public String getText()(Code) | | Returns the text in the Text Field.
The text in the Text Field. Never returns null. |
removeChangeListener | public void removeChangeListener(ChangeListener pChangeListener)(Code) | | Removes a change listener.
Parameters: pChangeListener - The change listener to remove. |
setEditable | public void setEditable(boolean editable)(Code) | | |
setLabel | public void setLabel(String pLabel)(Code) | | Set the text displayed in the label.
Parameters: pLabel - The new label text. |
setSelectedIndex | public void setSelectedIndex(int index)(Code) | | |
setText | public void setText(String pText)(Code) | | Set the text displayed in the Text Field.
Parameters: pText - The new text to display in the text field. |
|
|