org.progeeks.util.swing
Class CompositeContextAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.progeeks.util.swing.AbstractContextAction
          extended by org.progeeks.util.swing.CompositeContextAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, ViewContextAware

public class CompositeContextAction
extends AbstractContextAction

Defines an action the decorates another action and delegates processing to a pre-action and a post-action. By default, all action methods will pass through to the wrapped main action. Specific subclasses may override this behavior.

Version:
$Revision: 1.5 $
Author:
Paul Speed
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
CompositeContextAction()
           
CompositeContextAction(javax.swing.Action main)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 java.lang.Object clone()
          Only usable for subclasses that implement Cloneable.
 javax.swing.Action getMainAction()
           
 javax.swing.Action getPostprocessAction()
           
 javax.swing.Action getPreprocessAction()
           
 java.lang.Object getValue(java.lang.String key)
           
 boolean isEnabled()
           
 void putValue(java.lang.String key, java.lang.Object value)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void setEnabled(boolean b)
           
 void setMainAction(javax.swing.Action main)
           
 void setPostprocessAction(javax.swing.Action post)
           
 void setPreprocessAction(javax.swing.Action pre)
           
 void setViewContext(ViewContext context)
          Sets the view context for this action list and any of its children that are also context-aware.
 
Methods inherited from class org.progeeks.util.swing.AbstractContextAction
findViewContext, getViewContext
 
Methods inherited from class javax.swing.AbstractAction
firePropertyChange, getKeys, getPropertyChangeListeners
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeContextAction

public CompositeContextAction()

CompositeContextAction

public CompositeContextAction(javax.swing.Action main)
Method Detail

setMainAction

public void setMainAction(javax.swing.Action main)

getMainAction

public javax.swing.Action getMainAction()

setPreprocessAction

public void setPreprocessAction(javax.swing.Action pre)

getPreprocessAction

public javax.swing.Action getPreprocessAction()

setPostprocessAction

public void setPostprocessAction(javax.swing.Action post)

getPostprocessAction

public javax.swing.Action getPostprocessAction()

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from class: AbstractContextAction
Only usable for subclasses that implement Cloneable.

Overrides:
clone in class AbstractContextAction
Throws:
java.lang.CloneNotSupportedException

setViewContext

public void setViewContext(ViewContext context)
Sets the view context for this action list and any of its children that are also context-aware.

Specified by:
setViewContext in interface ViewContextAware
Overrides:
setViewContext in class AbstractContextAction

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
addPropertyChangeListener in interface javax.swing.Action
Overrides:
addPropertyChangeListener in class javax.swing.AbstractAction

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Specified by:
removePropertyChangeListener in interface javax.swing.Action
Overrides:
removePropertyChangeListener in class javax.swing.AbstractAction

getValue

public java.lang.Object getValue(java.lang.String key)
Specified by:
getValue in interface javax.swing.Action
Overrides:
getValue in class javax.swing.AbstractAction

isEnabled

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

setEnabled

public void setEnabled(boolean b)
Specified by:
setEnabled in interface javax.swing.Action
Overrides:
setEnabled in class javax.swing.AbstractAction

putValue

public void putValue(java.lang.String key,
                     java.lang.Object value)
Specified by:
putValue in interface javax.swing.Action
Overrides:
putValue in class javax.swing.AbstractAction

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)


Copyright © 2002-2003 Paul Speed. All Rights Reserved.