edu.jhu.cs.oose.elevel.AdvancedEditCard.commands
Class DrawItemCommand

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      extended by com.trolltech.qt.QSignalEmitter
          extended by com.trolltech.qt.QtJambiObject
              extended by com.trolltech.qt.gui.QUndoCommand
                  extended by edu.jhu.cs.oose.elevel.AdvancedEditCard.commands.DrawCommand
                      extended by edu.jhu.cs.oose.elevel.AdvancedEditCard.commands.DrawItemCommand
All Implemented Interfaces:
com.trolltech.qt.QtJambiInterface

public class DrawItemCommand
extends DrawCommand

Author:
Jesse Yates

Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.QtJambiObject
com.trolltech.qt.QtJambiObject.QPrivateConstructor
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QSignalEmitter.AbstractSignal, com.trolltech.qt.QSignalEmitter.PrivateSignal0, com.trolltech.qt.QSignalEmitter.PrivateSignal1<A>, com.trolltech.qt.QSignalEmitter.PrivateSignal2<A,B>, com.trolltech.qt.QSignalEmitter.PrivateSignal3<A,B,C>, com.trolltech.qt.QSignalEmitter.PrivateSignal4<A,B,C,D>, com.trolltech.qt.QSignalEmitter.PrivateSignal5<A,B,C,D,E>, com.trolltech.qt.QSignalEmitter.PrivateSignal6<A,B,C,D,E,F>, com.trolltech.qt.QSignalEmitter.PrivateSignal7<A,B,C,D,E,F,G>, com.trolltech.qt.QSignalEmitter.PrivateSignal8<A,B,C,D,E,F,G,H>, com.trolltech.qt.QSignalEmitter.PrivateSignal9<A,B,C,D,E,F,G,H,I>, com.trolltech.qt.QSignalEmitter.Signal0, com.trolltech.qt.QSignalEmitter.Signal1<A>, com.trolltech.qt.QSignalEmitter.Signal2<A,B>, com.trolltech.qt.QSignalEmitter.Signal3<A,B,C>, com.trolltech.qt.QSignalEmitter.Signal4<A,B,C,D>, com.trolltech.qt.QSignalEmitter.Signal5<A,B,C,D,E>, com.trolltech.qt.QSignalEmitter.Signal6<A,B,C,D,E,F>, com.trolltech.qt.QSignalEmitter.Signal7<A,B,C,D,E,F,G>, com.trolltech.qt.QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, com.trolltech.qt.QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>
 
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal
 
Field Summary
 
Fields inherited from class edu.jhu.cs.oose.elevel.AdvancedEditCard.commands.DrawCommand
canvas, item
 
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
currentSender
 
Constructor Summary
DrawItemCommand(com.trolltech.qt.gui.QGraphicsItemInterface add, com.trolltech.qt.gui.QGraphicsScene scene)
          Impelmentation of the DrawCommand
 
Method Summary
 boolean isValid()
          Determines if this is a valid command
 boolean mergeWith(com.trolltech.qt.gui.QUndoCommand other)
          Determine if this can be merged with another command.
 void redo()
          Redo the command.
 void undo()
          Undo the previous command
 
Methods inherited from class com.trolltech.qt.gui.QUndoCommand
child, childCount, fromNativePointer, id, setText, text
 
Methods inherited from class com.trolltech.qt.QtJambiObject
disableGarbageCollection, dispose, disposed, equals, finalize, nativeId, nativePointer, reassignNativeResources, reenableGarbageCollection, setJavaOwnership, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
__qt_signalInitialization
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawItemCommand

public DrawItemCommand(com.trolltech.qt.gui.QGraphicsItemInterface add,
                       com.trolltech.qt.gui.QGraphicsScene scene)
Impelmentation of the DrawCommand

Parameters:
add - Element to be added
scene - The model to add the element to
Method Detail

undo

public void undo()
Undo the previous command

Overrides:
undo in class com.trolltech.qt.gui.QUndoCommand

redo

public void redo()
Redo the command. Called when added to the stack

Overrides:
redo in class com.trolltech.qt.gui.QUndoCommand

mergeWith

public boolean mergeWith(com.trolltech.qt.gui.QUndoCommand other)
Determine if this can be merged with another command. Currently no merging is instantiated

Overrides:
mergeWith in class com.trolltech.qt.gui.QUndoCommand

isValid

public boolean isValid()
Determines if this is a valid command

Specified by:
isValid in class DrawCommand
Returns:
true if it is a valid command, false otherwise