| |
|
| javax.swing.JPanel org.apache.jorphan.gui.JLabeledTextArea
JLabeledTextArea | public class JLabeledTextArea extends JPanel implements JLabeledField,FocusListener(Code) | | A Helper component that wraps a JTextField with a label into a JPanel (this).
This component also has an efficient event handling mechanism for handling
the text changing in the Text Field. The registered change listeners are only
called when the text has changed.
|
Constructor Summary | |
public | JLabeledTextArea() Default constructor, The label and the Text field are left empty. | public | JLabeledTextArea(String label) Constructs a new component with the label displaying the passed text. | public | JLabeledTextArea(String pLabel, Document docModel) Constructs a new component with the label displaying the passed text. |
JLabeledTextArea | public JLabeledTextArea()(Code) | | Default constructor, The label and the Text field are left empty.
|
JLabeledTextArea | public JLabeledTextArea(String label)(Code) | | Constructs a new component with the label displaying the passed text.
Parameters: label - The text to display in the label. |
JLabeledTextArea | public JLabeledTextArea(String pLabel, Document docModel)(Code) | | Constructs a new component with the label displaying the passed text.
Parameters: pLabel - The text to display in the label. Parameters: docModel - the document for the text area |
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
JLabeledTextArea.getText() getText method.
Parameters: pChangeListener - The listener to add |
focusGained | public void focusGained(FocusEvent pFocusEvent)(Code) | | Catch what the value was when focus was gained.
|
focusLost | public void focusLost(FocusEvent pFocusEvent)(Code) | | Callback method when the focus to the Text Field component is lost.
Parameters: pFocusEvent - The focus event that occured. |
getComponentList | public List getComponentList()(Code) | | |
getLabel | public String getLabel()(Code) | | Returns the text of the label.
The text of the label. |
getText | public String getText()(Code) | | Returns the text in the Text Field.
The text in the Text Field. |
removeChangeListener | public void removeChangeListener(ChangeListener pChangeListener)(Code) | | Removes a change listener.
Parameters: pChangeListener - The change listener to remove. |
setEnabled | public void setEnabled(boolean enable)(Code) | | |
setLabel | public void setLabel(String pLabel)(Code) | | Set the text displayed in the label.
Parameters: pLabel - The new label text. |
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. |
|
|
|