org.jfree.ui
Class JTextObserver
java.lang.Object
org.jfree.ui.JTextObserver
- FocusListener
extends java.lang.Object
implements FocusListener
An observer that selects all the text when a field gains the focus.
static void | addTextComponent(JTextComponent t) - Adds this instance as a listener for the specified text component.
|
void | focusGained(FocusEvent e) - Selects all the text when a field gains the focus.
|
void | focusLost(FocusEvent e) - Deselects the text when a field loses the focus.
|
static JTextObserver | getInstance() - Returns the single instance.
|
static void | removeTextComponent(JTextComponent t) - Removes this instance as a listener for the specified text component.
|
addTextComponent
public static void addTextComponent(JTextComponent t)
Adds this instance as a listener for the specified text component.
focusGained
public void focusGained(FocusEvent e)
Selects all the text when a field gains the focus.
focusLost
public void focusLost(FocusEvent e)
Deselects the text when a field loses the focus.
removeTextComponent
public static void removeTextComponent(JTextComponent t)
Removes this instance as a listener for the specified text component.