org.devaki.nextobjects.util
Class NORedoLog

java.lang.Object
  extended byorg.devaki.nextobjects.util.NORedoLog

public class NORedoLog
extends java.lang.Object

This class is in charge of most of the Undo/Redo stuff. The model was inspired from the gimp dual stack system. There is a redo stack and an undo stack. Undoing activate the redo stack while doing something activate the undo stack.

Author:
: efloretnt@devaki.org

Nested Class Summary
(package private)  class NORedoLog.NORedoItem
          This class represent a singe item to be redoed. an action item which is made of :
 
Field Summary
static int ACTION_CREATE
          Actions Create
static int ACTION_DELETE
          Actions Delete
static int ACTION_MOVE
          Actions Move
static int ACTION_RESIZE
          Actions Resize
static int LOG_REDOLOG
          Log Type Descriptor for redo stack
static int LOG_UNDOLOG
          Log Type descriptorfor the undo stack
static int REDOLOG_SIZE
          Log Size
 
Constructor Summary
NORedoLog()
          Dummy constructor.
 
Method Summary
 void clear()
          Description of the Method
 void log(int pAction, BaseObject pTarget, int pX, int pY)
          Log all possible action coming from ModelMan.java
 void redo()
          An redo call switch the current stack and call each of the action executers for the last action of the redo stack
 void undo()
          An undo call switch the current stack and call each of the action executers for the last action of the undo stack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_DELETE

public static final int ACTION_DELETE
Actions Delete

See Also:
Constant Field Values

ACTION_MOVE

public static final int ACTION_MOVE
Actions Move

See Also:
Constant Field Values

ACTION_RESIZE

public static final int ACTION_RESIZE
Actions Resize

See Also:
Constant Field Values

ACTION_CREATE

public static final int ACTION_CREATE
Actions Create

See Also:
Constant Field Values

LOG_UNDOLOG

public static final int LOG_UNDOLOG
Log Type descriptorfor the undo stack

See Also:
Constant Field Values

LOG_REDOLOG

public static final int LOG_REDOLOG
Log Type Descriptor for redo stack

See Also:
Constant Field Values

REDOLOG_SIZE

public static final int REDOLOG_SIZE
Log Size

See Also:
Constant Field Values
Constructor Detail

NORedoLog

public NORedoLog()
Dummy constructor. Should never be used.

Method Detail

clear

public void clear()
Description of the Method


log

public void log(int pAction,
                BaseObject pTarget,
                int pX,
                int pY)
Log all possible action coming from ModelMan.java

Parameters:
pAction - flag describing the action
pTarget - the object
pX - optional X coordinate parameter
pY - optional Y coordinate parameter

undo

public void undo()
An undo call switch the current stack and call each of the action executers for the last action of the undo stack


redo

public void redo()
An redo call switch the current stack and call each of the action executers for the last action of the redo stack



Copyright © 2002-2004 devaki.org. All Rights Reserved.