org.progeeks.util.swing
Class AbstractContextAction

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

public abstract class AbstractContextAction
extends javax.swing.AbstractAction
implements ViewContextAware

AbstractAction subclass providing ViewContextAware support.

Version:
$Revision: 1.6 $
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
AbstractContextAction()
           
AbstractContextAction(java.lang.String name)
           
AbstractContextAction(java.lang.String name, javax.swing.Icon icon)
           
 
Method Summary
protected  java.lang.Object clone()
          Only usable for subclasses that implement Cloneable.
protected  ViewContext findViewContext(java.lang.Class type)
          Convenience method for finding a context within the current context hierarchy.
 ViewContext getViewContext()
          Returns the view context for this object.
 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 javax.swing.AbstractAction
addPropertyChangeListener, 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
 

Constructor Detail

AbstractContextAction

public AbstractContextAction()

AbstractContextAction

public AbstractContextAction(java.lang.String name)

AbstractContextAction

public AbstractContextAction(java.lang.String name,
                             javax.swing.Icon icon)
Method Detail

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

getViewContext

public ViewContext getViewContext()
Returns the view context for this object.

Specified by:
getViewContext in interface ViewContextAware

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Only usable for subclasses that implement Cloneable.

Overrides:
clone in class javax.swing.AbstractAction
Throws:
java.lang.CloneNotSupportedException

findViewContext

protected ViewContext findViewContext(java.lang.Class type)
Convenience method for finding a context within the current context hierarchy.



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