cz.cuni.jagrlib.gui
Class ActionsUndo

java.lang.Object
  extended by cz.cuni.jagrlib.gui.ActionsUndo

public class ActionsUndo
extends java.lang.Object

Undo / Redo object.

See Also:
ActionsUndo.java

Field Summary
 boolean dont
          Flag for permition to adding new actions.
 
Constructor Summary
ActionsUndo()
           
 
Method Summary
 void addActionListener(java.awt.event.ActionListener l)
          Adds the specified action listener to receive action events from this object.
 void clear()
          Delete all actions from list.
 boolean changed()
          Test, if composition was changed.
 boolean isOnEnd()
          Tests, if list is at the end.
 boolean isOnStart()
          Tests, if list is at the beginning.
protected  void processActionEvent(java.awt.event.ActionEvent e)
          Processes action events occurring on this object by dispatching them to any registered ActionListener objects.
 void redo()
          Returns last undoed action.
 void registry(ActionsUndoReg _action)
          Registry action to list.
 void registryPerformed(ActionsUndoReg _action)
          Filter change.
 void removeActionListener(java.awt.event.ActionListener l)
          Removes the specified action listener so that it no longer receives action events from this object.
 void undo()
          Returns last action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dont

public boolean dont
Flag for permition to adding new actions.

Constructor Detail

ActionsUndo

public ActionsUndo()
Method Detail

isOnStart

public boolean isOnStart()
Tests, if list is at the beginning.

Returns:
true or false

isOnEnd

public boolean isOnEnd()
Tests, if list is at the end.

Returns:
true or false

clear

public void clear()
Delete all actions from list.


changed

public boolean changed()
Test, if composition was changed.

Returns:
true or false

registry

public void registry(ActionsUndoReg _action)
Registry action to list.

Parameters:
_action - Akce

undo

public void undo()
Returns last action.


redo

public void redo()
Returns last undoed action.


registryPerformed

public void registryPerformed(ActionsUndoReg _action)
Filter change.


addActionListener

public void addActionListener(java.awt.event.ActionListener l)
Adds the specified action listener to receive action events from this object. Action events occur when any action is registred. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the action listener
See Also:
removeActionListener(java.awt.event.ActionListener), ActionListener

removeActionListener

public void removeActionListener(java.awt.event.ActionListener l)
Removes the specified action listener so that it no longer receives action events from this object. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the action listener
See Also:
addActionListener(java.awt.event.ActionListener), ActionListener

processActionEvent

protected void processActionEvent(java.awt.event.ActionEvent e)
Processes action events occurring on this object by dispatching them to any registered ActionListener objects.

This method is not called unless action events are enabled for this object. Action events are enabled when one of the following occurs:

Note that if the event parameter is null the behavior is unspecified and may result in an exception.

Parameters:
e - the action event
See Also:
ActionListener, Component.enableEvents(long)