Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1)

E12063-03


oracle.adf.view.faces.bi.component.gantt
Class UndoManager

java.lang.Object
  extended by oracle.adf.view.faces.bi.component.gantt.UndoManager

All Implemented Interfaces:
java.io.Serializable

public class UndoManager
extends java.lang.Object
implements java.io.Serializable

The UndoManager manages a list of UndoableEdits. When an undoable action occurs (user pressed the zoom-in button for example), an UndoableEdit representing the action is registered with the UndoManager. When a user pressed the undo/redo button in the Gantt toolbar/menubar, the UndoManager is responsible for determining what the last/next UndoableEdit should be, so that the appropriate action can be taken to restore the state. Applications can provide their own UndoManager by extending this class and register it on the Gantt instance using the setUndoManager method.

See Also:
Serialized Form

Field Summary
protected  java.util.ArrayList<UndoableEdit> m_edits
           

 

Constructor Summary
UndoManager()
          Constructor to create an instance of UndoManager.

 

Method Summary
 void addEdit(UndoableEdit edit)
          Adds an UndoableEdit to UndoManager.
 boolean canRedo()
          Determines whether redo is possible.
 boolean canUndo()
          Determines whether undo is possible.
 UndoableEdit current()
          Gets the current UndoableEdit
 void discardAllEdits()
          Remove all UndoableEdits.
protected  int getUndoLimits()
          The maximum number of undo(s)/redo(s).
 UndoableEdit redo()
          Performs an redo action.
 UndoableEdit undo()
          Performs an undo action.

 

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

 

Field Detail

m_edits

protected java.util.ArrayList<UndoableEdit> m_edits

Constructor Detail

UndoManager

public UndoManager()
Constructor to create an instance of UndoManager.

Method Detail

getUndoLimits

protected int getUndoLimits()
The maximum number of undo(s)/redo(s).
Returns:
the maximum number of undo(s)/redo(s).

canUndo

public boolean canUndo()
Determines whether undo is possible.
Returns:
true if undo is possible, false otherwise.

canRedo

public boolean canRedo()
Determines whether redo is possible.
Returns:
true if redo is possible, false otherwise.

addEdit

public void addEdit(UndoableEdit edit)
Adds an UndoableEdit to UndoManager.
Parameters:
edit - the UndoableEdit to register with the UndoManager.

undo

public UndoableEdit undo()
Performs an undo action.
Returns:
the last UndoableEdit. null if no action needs to be taken.

redo

public UndoableEdit redo()
Performs an redo action.
Returns:
the next UndoableEdit. null if no action needs to be taken.

discardAllEdits

public void discardAllEdits()
Remove all UndoableEdits.

current

public UndoableEdit current()
Gets the current UndoableEdit

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1)

E12063-03


Copyright © 1997, 2009, Oracle. All rights reserved.