org.nuiton.jaxx.action
Class MyAbstractAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.nuiton.jaxx.action.MyAbstractAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public abstract class MyAbstractAction
extends AbstractAction

Action de base à utiliser pour encapsuler toutes les actions du système.

Ces actions seront chargées par des ActionProvider et des ActionFactory.

Author:
chemit
See Also:
Serialized Form

Field Summary
protected  MyAbstractAction delegate
           
protected  ActionEvent e
           
protected static org.apache.commons.logging.Log log
           
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
protected MyAbstractAction(MyAbstractAction delegate)
           
protected MyAbstractAction(String name)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void addPropertyChangeListener(PropertyChangeListener listener)
           
protected  boolean beforeAction(ActionEvent evt)
           
protected  void clear()
           
protected  Object clone()
           
 void disposeUI()
           
protected  void doAction(ActionEvent evt)
           
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
           
protected  String getActionName()
           
 MyAbstractAction getDelegate()
           
 String getI18nToolTipText()
           
 Object[] getKeys()
           
protected  String getName()
           
protected abstract  String getPrefix()
           
 PropertyChangeListener[] getPropertyChangeListeners()
           
protected  JComponent getUIObject(String name, JAXXObject container)
           
 Object getValue(String key)
           
 boolean hasDelegate()
           
 boolean isEnabled()
           
 void putValue(String key, Object newValue)
           
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 void setEnabled(boolean newValue)
           
protected  void setStatus(String status)
           
protected  void showError(Exception e)
           
 String toString()
           
 void updateUI()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

e

protected ActionEvent e

delegate

protected MyAbstractAction delegate
Constructor Detail

MyAbstractAction

protected MyAbstractAction(String name)

MyAbstractAction

protected MyAbstractAction(MyAbstractAction delegate)
Method Detail

getPrefix

protected abstract String getPrefix()

actionPerformed

public void actionPerformed(ActionEvent e)

getI18nToolTipText

public String getI18nToolTipText()

updateUI

public void updateUI()

disposeUI

public void disposeUI()

getDelegate

public MyAbstractAction getDelegate()

hasDelegate

public boolean hasDelegate()

getName

protected String getName()

getActionName

protected String getActionName()

setStatus

protected void setStatus(String status)

beforeAction

protected boolean beforeAction(ActionEvent evt)
                        throws Exception
Throws:
Exception

doAction

protected void doAction(ActionEvent evt)
                 throws Exception
Throws:
Exception

getUIObject

protected JComponent getUIObject(String name,
                                 JAXXObject container)

clear

protected void clear()

showError

protected void showError(Exception e)

getValue

public Object getValue(String key)
Specified by:
getValue in interface Action
Overrides:
getValue in class AbstractAction

putValue

public void putValue(String key,
                     Object newValue)
Specified by:
putValue in interface Action
Overrides:
putValue in class AbstractAction

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface Action
Overrides:
isEnabled in class AbstractAction

setEnabled

public void setEnabled(boolean newValue)
Specified by:
setEnabled in interface Action
Overrides:
setEnabled in class AbstractAction

getKeys

public Object[] getKeys()
Overrides:
getKeys in class AbstractAction

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Overrides:
firePropertyChange in class AbstractAction

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface Action
Overrides:
addPropertyChangeListener in class AbstractAction

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface Action
Overrides:
removePropertyChangeListener in class AbstractAction

getPropertyChangeListeners

public PropertyChangeListener[] getPropertyChangeListeners()
Overrides:
getPropertyChangeListeners in class AbstractAction

clone

protected Object clone()
                throws CloneNotSupportedException
Overrides:
clone in class AbstractAction
Throws:
CloneNotSupportedException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2010 CodeLutin. All Rights Reserved.