JHotDraw 6.0b1

org.jhotdraw.standard
Class CutCommand.UndoActivity

java.lang.Object
  extended by org.jhotdraw.util.UndoableAdapter
      extended by org.jhotdraw.standard.CutCommand.UndoActivity
All Implemented Interfaces:
Undoable
Enclosing class:
CutCommand

public static class CutCommand.UndoActivity
extends UndoableAdapter


Constructor Summary
CutCommand.UndoActivity(FigureTransferCommand newCommand)
          Constructor for UndoActivity.
 
Method Summary
 FigureEnumeration getSelectedFigures()
          Returns the selection of figures to perform the command on.
 int getSelectedFiguresCount()
          Returns the size of the selection.
 boolean redo()
          Redo the activity
 void release()
          Releases all resources related to an undoable activity
protected  void rememberSelectedFigures(FigureEnumeration toBeRemembered)
          Preserve a copy of the enumeration in a private list.
 void setSelectedFigures(FigureEnumeration newSelectedFigures)
          Preserve the selection of figures the moment the command was executed.
 boolean undo()
          Undo the activity
 
Methods inherited from class org.jhotdraw.util.UndoableAdapter
duplicateAffectedFigures, getAffectedFigures, getAffectedFiguresCount, getAffectedFiguresReversed, getDrawingView, isRedoable, isUndoable, rememberFigures, setAffectedFigures, setDrawingView, setRedoable, setUndoable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CutCommand.UndoActivity

public CutCommand.UndoActivity(FigureTransferCommand newCommand)
Constructor for UndoActivity.

Parameters:
newCommand -
Method Detail

undo

public boolean undo()
Description copied from class: UndoableAdapter
Undo the activity

Specified by:
undo in interface Undoable
Overrides:
undo in class UndoableAdapter
Returns:
true if the activity could be undone, false otherwise
See Also:
Undoable.undo()

redo

public boolean redo()
Description copied from class: UndoableAdapter
Redo the activity

Specified by:
redo in interface Undoable
Overrides:
redo in class UndoableAdapter
Returns:
true if the activity could be redone, false otherwise
See Also:
Undoable.redo()

setSelectedFigures

public void setSelectedFigures(FigureEnumeration newSelectedFigures)
Preserve the selection of figures the moment the command was executed.

Parameters:
newSelectedFigures -

rememberSelectedFigures

protected void rememberSelectedFigures(FigureEnumeration toBeRemembered)
Preserve a copy of the enumeration in a private list.

Parameters:
toBeRemembered -

getSelectedFigures

public FigureEnumeration getSelectedFigures()
Returns the selection of figures to perform the command on.

Returns:

getSelectedFiguresCount

public int getSelectedFiguresCount()
Returns the size of the selection.

Returns:

release

public void release()
Description copied from class: UndoableAdapter
Releases all resources related to an undoable activity

Specified by:
release in interface Undoable
Overrides:
release in class UndoableAdapter
See Also:
UndoableAdapter.release()

JHotDraw 6.0b1