com.japisoft.framework.dialog.actions
Class AbstractDialogAction
java.lang.Object
javax.swing.AbstractAction
com.japisoft.framework.dialog.actions.AbstractDialogAction
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, DialogAction, java.util.EventListener, java.io.Serializable
- Direct Known Subclasses:
- CancelAction, DialogActionProxy, OKAction, StopAction, StoringLocationAction
- public abstract class AbstractDialogAction
- extends javax.swing.AbstractAction
- implements DialogAction
- Version:
- 1.0
- Author:
- (c) 2004 JAPISoft / http://www.japisoft.com
- See Also:
- Serialized Form
| 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 |
| 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 javax.swing.Action |
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
AbstractDialogAction
public AbstractDialogAction(int id)
- Create a new action with this id
- Parameters:
id -
AbstractDialogAction
public AbstractDialogAction(int id,
boolean bundleMode)
- Parameters:
id - a new action idbundleMode - decide to reset the label and name with a property file
prepareStaticValues
protected void prepareStaticValues()
- Called once for setting label, tooltip ...
prepareBundleValues
protected void prepareBundleValues()
- Called once for reading properties from bundle
getBundledName
protected java.lang.String getBundledName()
- Returns:
- the name of the bundle for internationalization
getLabel
protected java.lang.String getLabel(java.lang.String name,
java.lang.String def)
- Returns:
- a label from the resource bundle or the default one
getActionId
public int getActionId()
- Specified by:
getActionId in interface DialogAction
- Returns:
- an unique action ID
setActionDelegate
public void setActionDelegate(java.awt.event.ActionListener delegate)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
setForDialogFooter
public void setForDialogFooter(boolean forFooter)
- This is a property for not adding the action inside the dialog footer
isForDialogFooter
public boolean isForDialogFooter()
- Specified by:
isForDialogFooter in interface DialogAction
- Returns:
true if the action is for the footer.
isSpecial
public boolean isSpecial()
- Specified by:
isSpecial in interface DialogAction
- Returns:
true if this is a specific action that must appear on the left part
setSpecial
public void setSpecial(boolean specialMode)
- Update the action status. If
true, the action will be on the left part of the footer