org.tigris.swidgets
Class AbstractButtonAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.tigris.swidgets.AbstractButtonAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, ButtonAction, java.lang.Cloneable, java.util.EventListener, java.io.Serializable

public abstract class AbstractButtonAction
extends javax.swing.AbstractAction
implements ButtonAction

See Also:
Serialized Form

Field Summary
static int DOUBLE_CLICK
          Possible ways in which a user can lock a button: DOUBLE_CLICK
static int NONE
          Possible ways in which a user can lock a button: NONE
 
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
AbstractButtonAction(java.lang.String name, javax.swing.Icon icon)
          Creates a new instance of AbstractButtonAction
AbstractButtonAction(java.lang.String name, javax.swing.Icon icon, boolean isModal)
          Creates a new instance of AbstractButtonAction
AbstractButtonAction(java.lang.String name, javax.swing.Icon icon, boolean isModal, int theLockMethod)
          Creates a new instance of AbstractButtonAction
 
Method Summary
 int getLockMethod()
           
 boolean isModal()
           
 void setLockMethod(int theLockMethod)
           
 void setModal(boolean isModal)
           
 
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
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Field Detail

NONE

public static final int NONE
Possible ways in which a user can lock a button: NONE

See Also:
Constant Field Values

DOUBLE_CLICK

public static final int DOUBLE_CLICK
Possible ways in which a user can lock a button: DOUBLE_CLICK

See Also:
Constant Field Values
Constructor Detail

AbstractButtonAction

public AbstractButtonAction(java.lang.String name,
                            javax.swing.Icon icon)
Creates a new instance of AbstractButtonAction

Parameters:
name - the name of the action
icon - the icon for the action

AbstractButtonAction

public AbstractButtonAction(java.lang.String name,
                            javax.swing.Icon icon,
                            boolean isModal)
Creates a new instance of AbstractButtonAction

Parameters:
name - the name of the action
icon - the icon of the action
isModal - modal = the user is obliged to answer this action before doing anything else

AbstractButtonAction

public AbstractButtonAction(java.lang.String name,
                            javax.swing.Icon icon,
                            boolean isModal,
                            int theLockMethod)
Creates a new instance of AbstractButtonAction

Parameters:
name - the name of the action
icon - the icon of the action
isModal - modal = the user is obliged to answer this action before doing anything else
theLockMethod - purpose: action buttons can remain depressed so that they can be used multiple times
Method Detail

setModal

public void setModal(boolean isModal)
Specified by:
setModal in interface ButtonAction
Parameters:
isModal - the modal of the action
See Also:
org.argouml.swingext.ButtonAction#setModal(boolean)

isModal

public boolean isModal()
Specified by:
isModal in interface ButtonAction
Returns:
true if the action is modal
See Also:
org.argouml.swingext.ButtonAction#isModal()

setLockMethod

public void setLockMethod(int theLockMethod)
Specified by:
setLockMethod in interface ButtonAction
Parameters:
theLockMethod - purpose: action buttons can remain depressed so that they can be used multiple times
See Also:
org.argouml.swingext.ButtonAction#setLockMethod(int)

getLockMethod

public int getLockMethod()
Specified by:
getLockMethod in interface ButtonAction
Returns:
the int lockMethod
See Also:
org.argouml.swingext.ButtonAction#getLockMethod()