net.sf.doolin.gui.edit
Class DefaultGUIEditManager

java.lang.Object
  extended by net.sf.doolin.gui.edit.DefaultGUIEditManager
All Implemented Interfaces:
GUIEditManager

public class DefaultGUIEditManager
extends Object
implements GUIEditManager

Default implementation for the GUIEditManager. It maintains a dual list of done and undone tasks.

Author:
Damien Coraboeuf

Constructor Summary
DefaultGUIEditManager()
           
 
Method Summary
 void addEdit(GUIEdit record)
          Adds a new task.
 boolean canRedo()
          Checks if some tasks are available for doing again.
 boolean canUndo()
          Checks if some tasks are available for undoing.
 void clear()
          Clears all tasks
protected  void fireUpdated()
          Publishes to the bus that the state of tasks has changed
 String getRedoDisplayName()
          Gets the display name for the action that can be redone.
 String getUndoDisplayName()
          Gets the display name for the action that can be undone.
 void redo()
          Redoes the next available task (if possible).
 void undo()
          Undoes the next available task (if possible).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultGUIEditManager

public DefaultGUIEditManager()
Method Detail

addEdit

public void addEdit(GUIEdit record)
Description copied from interface: GUIEditManager
Adds a new task.

Specified by:
addEdit in interface GUIEditManager
Parameters:
record - Task to record

canRedo

public boolean canRedo()
Description copied from interface: GUIEditManager
Checks if some tasks are available for doing again.

Specified by:
canRedo in interface GUIEditManager
Returns:
true if some tasks are available for doing again.

canUndo

public boolean canUndo()
Description copied from interface: GUIEditManager
Checks if some tasks are available for undoing.

Specified by:
canUndo in interface GUIEditManager
Returns:
true if some tasks are available for undoing.

getUndoDisplayName

public String getUndoDisplayName()
Description copied from interface: GUIEditManager
Gets the display name for the action that can be undone.

Specified by:
getUndoDisplayName in interface GUIEditManager
Returns:
Display name

getRedoDisplayName

public String getRedoDisplayName()
Description copied from interface: GUIEditManager
Gets the display name for the action that can be redone.

Specified by:
getRedoDisplayName in interface GUIEditManager
Returns:
Display name

undo

public void undo()
Description copied from interface: GUIEditManager
Undoes the next available task (if possible).

Specified by:
undo in interface GUIEditManager

redo

public void redo()
Description copied from interface: GUIEditManager
Redoes the next available task (if possible).

Specified by:
redo in interface GUIEditManager

clear

public void clear()
Description copied from interface: GUIEditManager
Clears all tasks

Specified by:
clear in interface GUIEditManager

fireUpdated

protected void fireUpdated()
Publishes to the bus that the state of tasks has changed

See Also:
GUIEditManagerUpdateMessage


Copyright © 2011. All Rights Reserved.