Holger's
Java API

com.antelmann.util.gui
Class SelectAllOnFocusGain

java.lang.Object
  extended by java.awt.event.FocusAdapter
      extended by com.antelmann.util.gui.SelectAllOnFocusGain
All Implemented Interfaces:
FocusListener, EventListener

public class SelectAllOnFocusGain
extends FocusAdapter

a general focus listener that will select all text on focus gain if the source of the focus event is a JTextComponent

Since:
06/19/06
Author:
Holger Antelmann
See Also:
JTextComponent, ComboBoxEditor.getEditorComponent()

Constructor Summary
SelectAllOnFocusGain()
           
 
Method Summary
static void apply(JTextComponent... comp)
          convenience method
 void focusGained(FocusEvent ev)
           
 
Methods inherited from class java.awt.event.FocusAdapter
focusLost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectAllOnFocusGain

public SelectAllOnFocusGain()
Method Detail

focusGained

public void focusGained(FocusEvent ev)
Specified by:
focusGained in interface FocusListener
Overrides:
focusGained in class FocusAdapter

apply

public static void apply(JTextComponent... comp)
convenience method



(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads