Modelers

org.topcased.modeler.commands
Class GEFtoEMFCommandStackWrapper

java.lang.Object
  extended by org.topcased.modeler.commands.GEFtoEMFCommandStackWrapper
All Implemented Interfaces:
CommandStack

public final class GEFtoEMFCommandStackWrapper
extends java.lang.Object
implements CommandStack

Wrapper that adapts a GEF Command Stack to an EMF Command Stack. Creation : 21 fev. 2006


Constructor Summary
GEFtoEMFCommandStackWrapper(org.eclipse.gef.commands.CommandStack commandStack)
          Constructor
 
Method Summary
 void addCommandStackListener(CommandStackListener listener)
           
 boolean canRedo()
           
 boolean canUndo()
           
 void execute(Command command)
           
 void flush()
           
 Command getMostRecentCommand()
           
 Command getRedoCommand()
           
 Command getUndoCommand()
           
 void redo()
           
 void removeCommandStackListener(CommandStackListener listener)
           
 void undo()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GEFtoEMFCommandStackWrapper

public GEFtoEMFCommandStackWrapper(org.eclipse.gef.commands.CommandStack commandStack)
Constructor

Parameters:
commandStack - the CommandStack to wrap
Method Detail

execute

public void execute(Command command)
Specified by:
execute in interface CommandStack
See Also:
CommandStack.execute(org.eclipse.emf.common.command.Command)

canUndo

public boolean canUndo()
Specified by:
canUndo in interface CommandStack
See Also:
CommandStack.canUndo()

undo

public void undo()
Specified by:
undo in interface CommandStack
See Also:
CommandStack.undo()

canRedo

public boolean canRedo()
Specified by:
canRedo in interface CommandStack
See Also:
CommandStack.canRedo()

getUndoCommand

public Command getUndoCommand()
Specified by:
getUndoCommand in interface CommandStack
See Also:
CommandStack.getUndoCommand()

getRedoCommand

public Command getRedoCommand()
Specified by:
getRedoCommand in interface CommandStack
See Also:
CommandStack.getRedoCommand()

getMostRecentCommand

public Command getMostRecentCommand()
Specified by:
getMostRecentCommand in interface CommandStack
See Also:
CommandStack.getMostRecentCommand()

redo

public void redo()
Specified by:
redo in interface CommandStack
See Also:
CommandStack.redo()

flush

public void flush()
Specified by:
flush in interface CommandStack
See Also:
CommandStack.flush()

addCommandStackListener

public void addCommandStackListener(CommandStackListener listener)
Specified by:
addCommandStackListener in interface CommandStack
See Also:
CommandStack.addCommandStackListener(org.eclipse.emf.common.command.CommandStackListener)

removeCommandStackListener

public void removeCommandStackListener(CommandStackListener listener)
Specified by:
removeCommandStackListener in interface CommandStack
See Also:
CommandStack.removeCommandStackListener(org.eclipse.emf.common.command.CommandStackListener)

Modelers

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.