org.graffiti.plugin.tool
Class AbstractUndoableTool

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by javax.swing.event.MouseInputAdapter
          extended by org.graffiti.plugin.tool.AbstractTool
              extended by org.graffiti.plugin.tool.AbstractUndoableTool
All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, EventListener, MouseInputListener, Tool, SelectionListener, SessionListener, Undoable

public abstract class AbstractUndoableTool
extends AbstractTool
implements Undoable

Superclass for all tools that provide undo information for their actions.

Version:
$Revision: 1005 $

Field Summary
protected  Map<GraphElement,GraphElement> geMap
          The reference for the map between graph elements recreated after undo processing and original graph elements
protected  UndoableEditSupport undoSupport
          This object helps doing undo properly.
 
Fields inherited from class org.graffiti.plugin.tool.AbstractTool
graph, isActive, prefs, selection, session, zoom
 
Constructor Summary
AbstractUndoableTool()
           
 
Method Summary
protected  GraphElement getCurrentGraphElement(GraphElement ge)
          Returne a new graph element reference through the mapping from old ones
 boolean isSelectionListener()
          Specifies if this tool wants to receive selectionChanged events.
 boolean isSessionListener()
          Specifies if this tool wants to receive sessionChanged events.
 void sessionChanged(Session s)
          This method is called when the session changes.
 void sessionDataChanged(Session s)
          Empty method.
 void setUndoSupport(UndoableEditSupport us)
          Sets the undo support object this object uses.
 
Methods inherited from class org.graffiti.plugin.tool.AbstractTool
activate, deactivate, displayAsMarked, displayAsMarked, displayAsMarked, displayAsMarked, getAllMarkedComps, getCompsForElem, getCompsForElems, highlight, isActive, isViewListener, selectionChanged, selectionListChanged, setGraph, setPrefs, unDisplayAsMarked, unDisplayAsMarked, unDisplayAsMarked, unDisplayAsMarked
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
 
Methods inherited from interface java.awt.event.MouseMotionListener
mouseDragged, mouseMoved
 

Field Detail

geMap

protected Map<GraphElement,GraphElement> geMap
The reference for the map between graph elements recreated after undo processing and original graph elements


undoSupport

protected UndoableEditSupport undoSupport
This object helps doing undo properly.

Constructor Detail

AbstractUndoableTool

public AbstractUndoableTool()
Method Detail

isSelectionListener

public boolean isSelectionListener()
Specifies if this tool wants to receive selectionChanged events.

Specified by:
isSelectionListener in interface Tool
Overrides:
isSelectionListener in class AbstractTool
Returns:
DOCUMENT ME!

isSessionListener

public boolean isSessionListener()
Specifies if this tool wants to receive sessionChanged events.

Specified by:
isSessionListener in interface Tool
Overrides:
isSessionListener in class AbstractTool
Returns:
DOCUMENT ME!

setUndoSupport

public void setUndoSupport(UndoableEditSupport us)
Sets the undo support object this object uses.

Specified by:
setUndoSupport in interface Undoable
Parameters:
us - the undo support object this object uses.

sessionChanged

public void sessionChanged(Session s)
Description copied from interface: SessionListener
This method is called when the session changes.

Specified by:
sessionChanged in interface SessionListener
Overrides:
sessionChanged in class AbstractTool
Parameters:
s - the new Session.
See Also:
SessionListener.sessionChanged(Session)

sessionDataChanged

public void sessionDataChanged(Session s)
Empty method.

Specified by:
sessionDataChanged in interface SessionListener
See Also:
SessionListener.sessionDataChanged(Session)

getCurrentGraphElement

protected GraphElement getCurrentGraphElement(GraphElement ge)
Returne a new graph element reference through the mapping from old ones

Parameters:
ge - DOCUMENT ME!
Returns:
DOCUMENT ME!


Generated at 2008-10-16 01:31:27 PM GMT+01:00