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

## com.mxgraph.util
Class mxUndoableEdit

    java.lang.Object
      com.mxgraph.util.mxUndoableEdit

    public class mxUndoableEdit

extends Object

Implements a 2-dimensional rectangle with double precision coordinates.

Nested Class Summary
`static interface` | `mxUndoableEdit.mxUndoableChange` Defines the requirements for an undoable change.

Field Summary
`protected List<mxUndoableEdit.mxUndoableChange>` | `changes` Holds the list of changes that make up this undoable edit.
`protected boolean` | `redone` Specifies the state of the undoable edit.
`protected boolean` | `significant` Specifies this undoable edit is significant.
`protected Object` | `source` Holds the source of the undoable edit.
`protected boolean` | `undone` Specifies the state of the undoable edit.

Constructor Summary
`mxUndoableEdit(Object source)` Constructs a new undoable edit for the given source.
`mxUndoableEdit(Object source, boolean significant)` Constructs a new undoable edit for the given source.

Method Summary
`void` | `add(mxUndoableEdit.mxUndoableChange change)` Adds the specified change to this edit.
`void` | `die()` Hook to free resources after the edit has been removed from the command history.
`void` | `dispatch()` Hook to notify any listeners of the changes after an undo or redo has been carried out.
`List<mxUndoableEdit.mxUndoableChange>` | `getChanges()`
`Object` | `getSource()`
`boolean` | `isEmpty()` Returns true if the this edit contains no changes.
`boolean` | `isRedone()`
`boolean` | `isSignificant()`
`boolean` | `isUndone()`
`void` | `redo()`
`void` | `undo()`

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

Field Detail

### source

    protected Object source

  Holds the source of the undoable edit.

### changes

    protected List<mxUndoableEdit.mxUndoableChange> changes

  Holds the list of changes that make up this undoable edit.

### significant

    protected boolean significant

  Specifies this undoable edit is significant. Default is true.

### undone

    protected boolean undone

  Specifies the state of the undoable edit.

### redone

    protected boolean redone

  Specifies the state of the undoable edit.

Constructor Detail

### mxUndoableEdit

    public mxUndoableEdit(Object source)

  Constructs a new undoable edit for the given source.

### mxUndoableEdit

    public mxUndoableEdit(Object source,
                          boolean significant)

  Constructs a new undoable edit for the given source.

Method Detail

### dispatch

    public void dispatch()

  Hook to notify any listeners of the changes after an undo or redo has been carried out. This implementation is empty.

### die

    public void die()

  Hook to free resources after the edit has been removed from the command history. This implementation is empty.

### getSource

    public Object getSource()

  Returns:
    the source

### getChanges

    public List<mxUndoableEdit.mxUndoableChange> getChanges()

  Returns:
    the changes

### isSignificant

    public boolean isSignificant()

  Returns:
    the significant

### isUndone

    public boolean isUndone()

  Returns:
    the undone

### isRedone

    public boolean isRedone()

  Returns:
    the redone

### isEmpty

    public boolean isEmpty()

  Returns true if the this edit contains no changes.

### add

    public void add(mxUndoableEdit.mxUndoableChange change)

  Adds the specified change to this edit. The change is an object that is expected to either have an undo and redo, or an execute function.

### undo

    public void undo()

### redo

    public void redo()

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

Copyright (c) 2010 Gaudenz Alder. All rights reserved.