Class SelectAllOnFocusGainedDecorator
- java.lang.Object
-
- java.awt.event.FocusAdapter
-
- org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator
-
- All Implemented Interfaces:
java.awt.event.FocusListener
,java.util.EventListener
public class SelectAllOnFocusGainedDecorator extends java.awt.event.FocusAdapter
A helper class that selects all text as soon as aJTextComponent
receives focus.
-
-
Constructor Summary
Constructors Constructor Description SelectAllOnFocusGainedDecorator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
decorate(javax.swing.text.JTextComponent tc)
Add the listener to a given text component.void
focusGained(java.awt.event.FocusEvent e)
-
-
-
Constructor Detail
-
SelectAllOnFocusGainedDecorator
public SelectAllOnFocusGainedDecorator()
-
-
Method Detail
-
decorate
public static void decorate(javax.swing.text.JTextComponent tc)
Add the listener to a given text component.- Parameters:
tc
- The text component.
-
focusGained
public void focusGained(java.awt.event.FocusEvent e)
- Specified by:
focusGained
in interfacejava.awt.event.FocusListener
- Overrides:
focusGained
in classjava.awt.event.FocusAdapter
-
-