Package gr.zeus.ui.typesafe
Class SelectAllTextOnFocus
java.lang.Object
gr.zeus.ui.typesafe.SelectAllTextOnFocus
- All Implemented Interfaces:
FocusListener
,EventListener
This class is a simple FocusListener that when enabled performs a selectAll()
to any JTextComponent.
- Since:
- 1.20
- Author:
- Gregory Kotsaftis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
focusGained
(FocusEvent evt) Focus gained event.void
focusLost
(FocusEvent evt) Focus lost event.boolean
Gets status flag.void
setEnabled
(boolean f) Sets status flag.
-
Constructor Details
-
SelectAllTextOnFocus
public SelectAllTextOnFocus()Constructor.
-
-
Method Details
-
isEnabled
public boolean isEnabled()Gets status flag.- Returns:
- true/false.
-
setEnabled
public void setEnabled(boolean f) Sets status flag.- Parameters:
f
- true/false.
-
focusGained
Focus gained event.- Specified by:
focusGained
in interfaceFocusListener
- Parameters:
evt
- The event.
-
focusLost
Focus lost event.- Specified by:
focusLost
in interfaceFocusListener
- Parameters:
evt
- The event.
-