Package org.opensourcephysics.tools
Class LauncherUndo
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
javax.swing.undo.UndoManager
org.opensourcephysics.tools.LauncherUndo
- All Implemented Interfaces:
Serializable
,EventListener
,UndoableEditListener
,UndoableEdit
This provides undo support for Launcher.
- Author:
- Douglas Brown
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
A class to undo/redo a node link, open file or new tabset action.protected class
A class to undo/redo a hyperlink or user navigation action. -
Field Summary
Fields inherited from class javax.swing.undo.CompoundEdit
edits
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if pending edit is a link edit.String[]
Gets the current launcher state.void
setLauncher
(Launcher launcher) Sets the launcher.Methods inherited from class javax.swing.undo.UndoManager
addEdit, canRedo, canUndo, canUndoOrRedo, discardAllEdits, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redo, redoTo, setLimit, toString, trimEdits, trimForLimit, undo, undoableEditHappened, undoOrRedo, undoTo
Methods inherited from class javax.swing.undo.CompoundEdit
die, getPresentationName, isInProgress, isSignificant, lastEdit
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
-
Constructor Details
-
LauncherUndo
Constructor.- Parameters:
launcher
- the Launcher to undo/redo
-
-
Method Details
-
setLauncher
Sets the launcher.- Parameters:
launcher
- the Launcher to undo/redo
-
canReload
public boolean canReload()Returns true if pending edit is a link edit.- Returns:
- true if pending edit is a link edit
-
getLauncherState
Gets the current launcher state. Returns null if launcher is empty or if the current filename does not refer to an existing file.- Returns:
- String array [0] = file name [1] = selected node path
-