org.xnap.gui.action
Class EraseAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.xnap.gui.action.EraseAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class EraseAction
extends javax.swing.AbstractAction

Erases the text of a JTextField.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
EraseAction()
          Constructs an erase action, that has no text field set.
EraseAction(javax.swing.JTextField jtf)
          Constructs an erase action, that has its text field set to jtf.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Erases the text field.
 void setTextField(javax.swing.JTextField newValue)
          Sets the text field to newValue.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EraseAction

public EraseAction(javax.swing.JTextField jtf)
Constructs an erase action, that has its text field set to jtf.

Parameters:
jtf - the text field to erase

EraseAction

public EraseAction()
Constructs an erase action, that has no text field set. Use setTextField to set a text field.

Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Erases the text field.


setTextField

public void setTextField(javax.swing.JTextField newValue)
Sets the text field to newValue.



Copyright © 2001-2005 XNap Team. All Rights Reserved.