Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph v5.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jgraph.graph
Class GraphUndoManager

    java.lang.Object
      |
      +--javax.swing.undo.AbstractUndoableEdit
            |
            +--javax.swing.undo.CompoundEdit
                  |
                  +--javax.swing.undo.UndoManager
                        |
                        +--org.jgraph.graph.GraphUndoManager

All Implemented Interfaces:
  EventListener, Serializable, UndoableEdit, UndoableEditListener

public class GraphUndoManager
extends UndoManager

An UndoManager that may be shared among multiple GraphLayoutCache's.

See Also:
  Serialized Form

Field Summary

Fields inherited from class javax.swing.undo.CompoundEdit
`edits`

Fields inherited from class javax.swing.undo.AbstractUndoableEdit
`RedoName, UndoName`

Constructor Summary
`GraphUndoManager()`

Method Summary
`boolean` | `canRedo(Object source)` Overridden to preserve usual semantics: returns true if a redo operation would be successful now for the given view, false otherwise
`boolean` | `canUndo(Object source)` Overridden to preserve usual semantics: returns true if an undo operation would be successful now for the given view, false otherwise
`protected UndoableEdit` | `editToBeRedone(Object source)`
`protected UndoableEdit` | `editToBeUndone(Object source)`
`protected UndoableEdit` | `nextEditToBeRedone(UndoableEdit current)` Returns the the next significant edit wrt.
`protected UndoableEdit` | `nextEditToBeUndone(UndoableEdit current)` Returns the the next significant edit wrt.
`void` | `redo(Object source)` If this `UndoManager` is `inProgress`, redoes the last significant `UndoableEdit` with respect to source or after, and all insignificant edits up to it.
`void` | `undo(Object source)` If this UndoManager is inProgress, undo the last significant UndoableEdit wrt.

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`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### GraphUndoManager

    public GraphUndoManager()

Method Detail

### canUndo

    public boolean canUndo(Object source)

  Overridden to preserve usual semantics: returns true if an undo operation would be successful now for the given view, false otherwise

### canRedo

    public boolean canRedo(Object source)

  Overridden to preserve usual semantics: returns true if a redo operation would be successful now for the given view, false otherwise

### undo

    public void undo(Object source)

  If this UndoManager is inProgress, undo the last significant UndoableEdit wrt. to source, and all insignificant edits back to it. Updates indexOfNextAdd accordingly.

  If not inProgress, indexOfNextAdd is ignored and super's routine is called.

  See Also:
    `UndoManager.undo()`

### editToBeUndone

    protected UndoableEdit editToBeUndone(Object source)

### nextEditToBeUndone

    protected UndoableEdit nextEditToBeUndone(UndoableEdit current)

  Returns the the next significant edit wrt. to current to be undone if undo is called. May return null.

### redo

    public void redo(Object source)

  If this `UndoManager` is `inProgress`, redoes the last significant `UndoableEdit` with respect to source or after, and all insignificant edits up to it. Updates `indexOfNextAdd` accordingly.

  If not `inProgress`, `indexOfNextAdd` is ignored and super's routine is called.

### editToBeRedone

    protected UndoableEdit editToBeRedone(Object source)

### nextEditToBeRedone

    protected UndoableEdit nextEditToBeRedone(UndoableEdit current)

  Returns the the next significant edit wrt. to current to be redone if redo is called. May return null.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph v5.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) 2003-2004 Gaudenz Alder. All rights reserved.