com.bbn.openmap.gui.menu
Class UndoMenuItemStackTrigger

java.lang.Object
  extended by com.bbn.openmap.gui.menu.UndoMenuItemStackTrigger
All Implemented Interfaces:
UndoStackTrigger, java.awt.event.ActionListener, java.util.EventListener

public class UndoMenuItemStackTrigger
extends java.lang.Object
implements UndoStackTrigger, java.awt.event.ActionListener

UndoMenuItemStackTrigger holds a couple of menu items that can trigger an UndoStack.

Author:
dietrick

Field Summary
protected  java.util.List<java.awt.event.ActionListener> listeners
           
protected  java.lang.String nothingToRedoString
           
protected  java.lang.String nothingToUndoString
           
protected  java.lang.String redoString
           
protected  java.lang.String undoString
           
 
Constructor Summary
UndoMenuItemStackTrigger()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void addActionListener(java.awt.event.ActionListener al)
          Add an ActionListener for events that trigger events to shift the undo/redo stack.
 javax.swing.JMenuItem getRedoMenuItem()
           
 javax.swing.JMenuItem getUndoMenuItem()
           
 void removeActionListener(java.awt.event.ActionListener al)
          Remove an ActionListener that receives events that trigger events to shift the undo/redo stack.
 void updateUndoStackStatus(UndoEvent undoEvent, UndoEvent redoEvent)
          To receive a status to let the trigger know if any projections in the forward or backward stacks exist, possibly to disable any gui widgets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

protected final java.util.List<java.awt.event.ActionListener> listeners

nothingToUndoString

protected java.lang.String nothingToUndoString

nothingToRedoString

protected java.lang.String nothingToRedoString

undoString

protected java.lang.String undoString

redoString

protected java.lang.String redoString
Constructor Detail

UndoMenuItemStackTrigger

public UndoMenuItemStackTrigger()
Method Detail

addActionListener

public void addActionListener(java.awt.event.ActionListener al)
Description copied from interface: UndoStackTrigger
Add an ActionListener for events that trigger events to shift the undo/redo stack.

Specified by:
addActionListener in interface UndoStackTrigger

removeActionListener

public void removeActionListener(java.awt.event.ActionListener al)
Description copied from interface: UndoStackTrigger
Remove an ActionListener that receives events that trigger events to shift the undo/redo stack.

Specified by:
removeActionListener in interface UndoStackTrigger

updateUndoStackStatus

public void updateUndoStackStatus(UndoEvent undoEvent,
                                  UndoEvent redoEvent)
Description copied from interface: UndoStackTrigger
To receive a status to let the trigger know if any projections in the forward or backward stacks exist, possibly to disable any gui widgets.

Specified by:
updateUndoStackStatus in interface UndoStackTrigger
Parameters:
undoEvent - there is at least one event to undo.
redoEvent - there is at least one event to redo.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getUndoMenuItem

public javax.swing.JMenuItem getUndoMenuItem()
Returns:
the undoMI

getRedoMenuItem

public javax.swing.JMenuItem getRedoMenuItem()
Returns:
the redoMI


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