Class JTextObserver
java.lang.Object
org.jfree.ui.JTextObserver
- All Implemented Interfaces:
FocusListener, EventListener
An observer that selects all the text when a field gains the focus.
- Author:
- Thomas Morgner
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdds this instance as a listener for the specified text component.voidSelects all the text when a field gains the focus.voidDeselects the text when a field loses the focus.static JTextObserverReturns the single instance.static voidRemoves this instance as a listener for the specified text component.
-
Method Details
-
getInstance
Returns the single instance.- Returns:
- The single instance.
-
focusGained
Selects all the text when a field gains the focus.- Specified by:
focusGainedin interfaceFocusListener- Parameters:
e- the focus event.
-
focusLost
Deselects the text when a field loses the focus.- Specified by:
focusLostin interfaceFocusListener- Parameters:
e- the event.
-
addTextComponent
Adds this instance as a listener for the specified text component.- Parameters:
t- the text component.
-
removeTextComponent
Removes this instance as a listener for the specified text component.- Parameters:
t- the text component.
-