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 TypeMethodDescriptionvoidfocusGained(FocusEvent evt) Focus gained event.voidfocusLost(FocusEvent evt) Focus lost event.booleanGets status flag.voidsetEnabled(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:
focusGainedin interfaceFocusListener- Parameters:
evt- The event.
-
focusLost
Focus lost event.- Specified by:
focusLostin interfaceFocusListener- Parameters:
evt- The event.
-