com.threerings.tudey.tools
Class EntryEdit

java.lang.Object
  extended by javax.swing.undo.AbstractUndoableEdit
      extended by com.threerings.tudey.tools.EntryEdit
All Implemented Interfaces:
Serializable, UndoableEdit

public class EntryEdit
extends AbstractUndoableEdit

Represents an edit to the scene's entries (and paint).

See Also:
Serialized Form

Constructor Summary
EntryEdit(TudeySceneModel scene, int id, int layer, Rectangle region, TudeySceneModel.Paint paint)
          Creates and applies a new paint edit.
EntryEdit(TudeySceneModel scene, int id, int layer, TudeySceneModel.Entry[] add, TudeySceneModel.Entry[] update, Object[] remove)
          Creates and applies a new entry edit.
 
Method Summary
 boolean addEdit(UndoableEdit edit)
           
 void redo()
           
 void undo()
           
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntryEdit

public EntryEdit(TudeySceneModel scene,
                 int id,
                 int layer,
                 TudeySceneModel.Entry[] add,
                 TudeySceneModel.Entry[] update,
                 Object[] remove)
Creates and applies a new entry edit.


EntryEdit

public EntryEdit(TudeySceneModel scene,
                 int id,
                 int layer,
                 Rectangle region,
                 TudeySceneModel.Paint paint)
Creates and applies a new paint edit.

Method Detail

addEdit

public boolean addEdit(UndoableEdit edit)
Specified by:
addEdit in interface UndoableEdit
Overrides:
addEdit in class AbstractUndoableEdit

undo

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

redo

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


Copyright © 2011. All Rights Reserved.