Package org.cytoscape.work.undo
Class AbstractCyEdit
- java.lang.Object
-
- 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.Module:
work-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>work-api</artifactId> </dependency>
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
Constructors Constructor Description AbstractCyEdit(String presentationName)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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.
-
-