Package org.cytoscape.work.undo
Class AbstractCyEdit
java.lang.Object
org.cytoscape.work.undo.AbstractCyEdit
- Direct Known Subclasses:
LayoutEdit
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'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.
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>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal String
Returns a human-readable description of this edit that will be used in logs and other descriptions of the edit.final String
Returns a human-readable description of this edit that will be used in redo menu items.final String
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 Details
-
AbstractCyEdit
Constructor.- Parameters:
presentationName
- A short, human-readable description of this edit that will be used in logs and in menu item titles.
-
-
Method Details
-
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
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
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.
-