com.levigo.util.swing.componentdecorator
Class SelectAllOnFocusGain
java.lang.Object
com.levigo.util.swing.componentdecorator.SelectAllOnFocusGain
public class SelectAllOnFocusGain
- extends Object
A decorator to make a JTextComponent
select all of its text upon
gaining focus. This is fairly efficient and very cheap, even if a large
number of components are decorated.
- Author:
- hennejg
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
decorate
public static SelectAllOnFocusGain decorate(JTextComponent comp)
- Install SelectTextOnFocusGain behaviour on a component.
- Parameters:
comp
- the component to decorate.
- Returns:
- a handle to uninstall the behaviour again.
undecorate
public void undecorate()
- Undecorate the component.