tnt.gui
Class TnTImp.MoveResizeKeyEdit

java.lang.Object
  extended by javax.swing.undo.AbstractUndoableEdit
      extended by tnt.gui.TnTImp.MoveResizeKeyEdit
All Implemented Interfaces:
java.io.Serializable, javax.swing.undo.UndoableEdit
Enclosing class:
TnTImp

 class TnTImp.MoveResizeKeyEdit
extends javax.swing.undo.AbstractUndoableEdit

This class encapsulates an undoable key relocation or resize. The boolean flags MOVE and RESIZE are used to classify this edit accordingly. Note that moving the resize handle above or to the left of the top-leftmost point, will change the x- and y-coordinate values.


Field Summary
static boolean MOVE
           
static boolean RESIZE
           
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
TnTImp.MoveResizeKeyEdit(KeyButton key, java.awt.geom.Rectangle2D oldBounds, java.awt.geom.Rectangle2D newBounds, boolean flag)
           
 
Method Summary
 boolean canRedo()
           
 boolean canUndo()
           
 java.lang.String getPresentationName()
           
 void redo()
           
 void undo()
           
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MOVE

public static final boolean MOVE
See Also:
Constant Field Values

RESIZE

public static final boolean RESIZE
See Also:
Constant Field Values
Constructor Detail

TnTImp.MoveResizeKeyEdit

public TnTImp.MoveResizeKeyEdit(KeyButton key,
                                java.awt.geom.Rectangle2D oldBounds,
                                java.awt.geom.Rectangle2D newBounds,
                                boolean flag)
Method Detail

undo

public void undo()
          throws javax.swing.undo.CannotUndoException
Specified by:
undo in interface javax.swing.undo.UndoableEdit
Overrides:
undo in class javax.swing.undo.AbstractUndoableEdit
Throws:
javax.swing.undo.CannotUndoException

redo

public void redo()
          throws javax.swing.undo.CannotRedoException
Specified by:
redo in interface javax.swing.undo.UndoableEdit
Overrides:
redo in class javax.swing.undo.AbstractUndoableEdit
Throws:
javax.swing.undo.CannotRedoException

canUndo

public boolean canUndo()
Specified by:
canUndo in interface javax.swing.undo.UndoableEdit
Overrides:
canUndo in class javax.swing.undo.AbstractUndoableEdit

canRedo

public boolean canRedo()
Specified by:
canRedo in interface javax.swing.undo.UndoableEdit
Overrides:
canRedo in class javax.swing.undo.AbstractUndoableEdit

getPresentationName

public java.lang.String getPresentationName()
Specified by:
getPresentationName in interface javax.swing.undo.UndoableEdit
Overrides:
getPresentationName in class javax.swing.undo.AbstractUndoableEdit