org.opensourcephysics.tools
Class LauncherUndo.NavEdit
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
org.opensourcephysics.tools.LauncherUndo.NavEdit
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.undo.UndoableEdit
- Enclosing class:
- LauncherUndo
protected class LauncherUndo.NavEdit
- extends javax.swing.undo.AbstractUndoableEdit
A class to undo/redo a hyperlink or user navigation action.
- See Also:
- Serialized Form
Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
RedoName, UndoName |
Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
addEdit, canRedo, canUndo, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LauncherUndo.NavEdit
public LauncherUndo.NavEdit(java.lang.Object[] oldState,
java.lang.Object[] newState)
- Constructor. State arrays are [0] String filename (may be null), [1]
String nodepath, [2] Integer pagenumber, [3] URL url (may be null)
- Parameters:
oldState
- the prevous state (undo)newState
- the new state (redo)
LauncherUndo.NavEdit
public LauncherUndo.NavEdit(LaunchNode prev,
LaunchNode node)
- Constructor.
- Parameters:
prev
- the prevous node (undo)node
- the new node (redo)
undo
public void undo()
throws javax.swing.undo.CannotUndoException
- Specified by:
undo
in interface javax.swing.undo.UndoableEdit
- Overrides:
undo
in class javax.swing.undo.AbstractUndoableEdit
- Throws:
javax.swing.undo.CannotUndoException
redo
public void redo()
throws javax.swing.undo.CannotUndoException
- Specified by:
redo
in interface javax.swing.undo.UndoableEdit
- Overrides:
redo
in class javax.swing.undo.AbstractUndoableEdit
- Throws:
javax.swing.undo.CannotUndoException
getPresentationName
public java.lang.String getPresentationName()
- Specified by:
getPresentationName
in interface javax.swing.undo.UndoableEdit
- Overrides:
getPresentationName
in class javax.swing.undo.AbstractUndoableEdit