|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel org.apache.jorphan.gui.JLabeledTextArea
public class JLabeledTextArea
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JLabeledTextArea()
Default constructor, The label and the Text field are left empty. |
|
JLabeledTextArea(String label)
Constructs a new component with the label displaying the passed text. |
|
JLabeledTextArea(String pLabel,
Document docModel)
Constructs a new component with the label displaying the passed text. |
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener pChangeListener)
Adds a change listener, that will be notified when the text in the text field is changed. |
void |
focusGained(FocusEvent pFocusEvent)
Catch what the value was when focus was gained. |
void |
focusLost(FocusEvent pFocusEvent)
Callback method when the focus to the Text Field component is lost. |
List<JComponent> |
getComponentList()
Get the label JLabel followed by the text field @link JTextArea . |
String |
getLabel()
Returns the text of the label. |
String |
getText()
Returns the text in the Text Field. |
String[] |
getTextLines()
|
String |
getToolTipText()
Returns the tooltip string that has been set with setToolTipText |
void |
removeChangeListener(ChangeListener pChangeListener)
Removes a change listener. |
void |
setDocumentModel(Document docModel)
|
void |
setEnabled(boolean enable)
|
void |
setLabel(String pLabel)
Set the text displayed in the label. |
void |
setText(String pText)
Set the text displayed in the Text Field. |
void |
setToolTipText(String text)
Registers the text to display in a tool tip. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JLabeledTextArea()
public JLabeledTextArea(String label)
label
- The text to display in the label.public JLabeledTextArea(String pLabel, Document docModel)
pLabel
- The text to display in the label.docModel
- the document for the text areaMethod Detail |
---|
public List<JComponent> getComponentList()
JLabel
followed by the text field @link JTextArea
.
getComponentList
in interface JLabeledField
public void setDocumentModel(Document docModel)
public void focusLost(FocusEvent pFocusEvent)
focusLost
in interface FocusListener
pFocusEvent
- The focus event that occured.public void focusGained(FocusEvent pFocusEvent)
focusGained
in interface FocusListener
public void setLabel(String pLabel)
setLabel
in interface JLabeledField
pLabel
- The new label text.public void setText(String pText)
setText
in interface JLabeledField
pText
- The new text to display in the text field.public String getText()
getText
in interface JLabeledField
public String getLabel()
public void setEnabled(boolean enable)
setEnabled
in class JComponent
public void setToolTipText(String text)
setToolTipText
in class JComponent
text
- the string to display; if the text is null,
the tool tip is turned off for this componentpublic String getToolTipText()
getToolTipText
in class JComponent
public void addChangeListener(ChangeListener pChangeListener)
getText
method.
addChangeListener
in interface JLabeledField
pChangeListener
- The listener to addpublic void removeChangeListener(ChangeListener pChangeListener)
pChangeListener
- The change listener to remove.public String[] getTextLines()
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |