JHotDraw 7.1

org.jhotdraw.draw.action
Class AbstractViewAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.jhotdraw.draw.action.AbstractViewAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
Direct Known Subclasses:
ZoomAction

public abstract class AbstractViewAction
extends javax.swing.AbstractAction

Abstract super class for actions which act on a DrawingView.

Version:
1.2 2006-04-21 Method setEditor added.
1.1 2006-03-15 Support for enabled state of view added.
1.0 2003-12-01 Created.
Author:
Werner Randelshofer
See Also:
Serialized Form

Field Summary
protected static ResourceBundleUtil labels
           
 
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
AbstractViewAction(DrawingEditor editor)
          Creates a view action which acts on the current view of the editor.
AbstractViewAction(DrawingView view)
          Creates a view action which acts on the specified view.
 
Method Summary
protected  void fireUndoableEditHappened(javax.swing.undo.UndoableEdit edit)
           
protected  Drawing getDrawing()
           
protected  DrawingView getView()
           
protected  void setEditor(DrawingEditor newValue)
           
 void updateEnabledState()
           
protected  void viewChanged()
           
 
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

labels

protected static final ResourceBundleUtil labels
Constructor Detail

AbstractViewAction

public AbstractViewAction(DrawingEditor editor)
Creates a view action which acts on the current view of the editor.


AbstractViewAction

public AbstractViewAction(DrawingView view)
Creates a view action which acts on the specified view.

Method Detail

setEditor

protected void setEditor(DrawingEditor newValue)

getView

protected DrawingView getView()

getDrawing

protected Drawing getDrawing()

fireUndoableEditHappened

protected void fireUndoableEditHappened(javax.swing.undo.UndoableEdit edit)

viewChanged

protected void viewChanged()

updateEnabledState

public void updateEnabledState()

Copyright 1996-2007 (c) JHotDraw.org.
Some rights reserved.