Cytoscape 3.0.1 API

org.cytoscape.work.undo
Class AbstractCyEdit

java.lang.Object
  extended by org.cytoscape.work.undo.AbstractCyEdit
Direct Known Subclasses:
LayoutEdit

public abstract class AbstractCyEdit
extends Object

A small class used to create new undoable edits. All you have to do is implement the undo() and redo() methods.
Cytoscape's undo scheme is much simpler than Swing's and we may in the future add additional functionality to this class to support more advanced features. If we do, we will make sure that the features are fully backwards compatible.


Cytoscape Backwards Compatibility (Abstract Class): This class is abstract and meant to be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.

Constructor Summary
AbstractCyEdit(String presentationName)
          Constructor.
 
Method Summary
 String getPresentationName()
          Returns a human-readable description of this edit that will be used in logs and other descriptions of the edit.
 String getRedoPresentationName()
          Returns a human-readable description of this edit that will be used in redo menu items.
 String getUndoPresentationName()
          Returns a human-readable description of this edit that will be used in undo menu items.
abstract  void redo()
          The method that performs the redo.
abstract  void undo()
          The method that performs the undo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCyEdit

public AbstractCyEdit(String presentationName)
Constructor.

Parameters:
presentationName - A short, human-readable description of this edit that will be used in logs and in menu item titles.
Method Detail

getPresentationName

public final String getPresentationName()
Returns a human-readable description of this edit that will be used in logs and other descriptions of the edit.

Returns:
a human-readable description of this edit that will be used in logs and other descriptions of the edit.

getRedoPresentationName

public final String getRedoPresentationName()
Returns a human-readable description of this edit that will be used in redo menu items.

Returns:
a human-readable description of this edit that will be used in redo menu items.

getUndoPresentationName

public final String getUndoPresentationName()
Returns a human-readable description of this edit that will be used in undo menu items.

Returns:
a human-readable description of this edit that will be used in undo menu items.

undo

public abstract void undo()
The method that performs the undo.


redo

public abstract void redo()
The method that performs the redo.


Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.