com.bbn.openmap.event
Class UndoStackSupport

java.lang.Object
  extended by com.bbn.openmap.event.UndoStackSupport
All Implemented Interfaces:
java.io.Serializable

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

This is a utility class that can be used by beans that need support for notifying gui components that undo/redo actions are available. Use an instance of this class as a member field of your bean and delegate work to it. Used by the UndoStack.

See Also:
Serialized Form

Field Summary
static java.util.logging.Logger logger
           
 
Constructor Summary
UndoStackSupport()
          Construct a ProjectionStackSupport.
 
Method Summary
 void add(UndoStackTrigger pt)
          Add a ProjectionStackTrigger.
 void fireStackStatus(UndoEvent undoEvent, UndoEvent redoEvent)
          Send a status to all registered triggers.
 java.util.ArrayList<UndoStackTrigger> getTriggers()
          Return a cloned list of Triggers.
 void remove(UndoStackTrigger pt)
          Remove a ProjectionStackTrigger.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static java.util.logging.Logger logger
Constructor Detail

UndoStackSupport

public UndoStackSupport()
Construct a ProjectionStackSupport.

Method Detail

add

public void add(UndoStackTrigger pt)
Add a ProjectionStackTrigger.

Parameters:
pt - ProjectionStackTrigger

remove

public void remove(UndoStackTrigger pt)
Remove a ProjectionStackTrigger.

Parameters:
pt - ProjectionStackTrigger

getTriggers

public java.util.ArrayList<UndoStackTrigger> getTriggers()
Return a cloned list of Triggers.

Returns:
Vector of triggers, null if none have been added.

size

public int size()

fireStackStatus

public void fireStackStatus(UndoEvent undoEvent,
                            UndoEvent redoEvent)
Send a status to all registered triggers.

Parameters:
undoEvent - the next event for undo, so the GUI can be updated with what will happen on undo.
redoEvent - the next event for redo, so the GUI can be updated with what will happen on redo.


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details