edu.umd.cfar.lamp.apploader.undo
Class LalUndoableEditWrapper

java.lang.Object
  extended byjavax.swing.undo.AbstractUndoableEdit
      extended byedu.umd.cfar.lamp.apploader.undo.LalUndoableEditWrapper
All Implemented Interfaces:
java.io.Serializable, javax.swing.undo.UndoableEdit

public class LalUndoableEditWrapper
extends javax.swing.undo.AbstractUndoableEdit

Converts a LabeledUndoableEditinto a Swing undoable.

Author:
davidm@cfar.umd.edu
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
LalUndoableEditWrapper(LabeledUndoableEdit lue, PrefsManager prefs)
          Create a new swing undoable from the given AppLoader undoable and its associated application preferences.
 
Method Summary
 boolean canRedo()
          
 boolean canUndo()
          
 void die()
          
 java.lang.String getPresentationName()
          Get the presentation name for the undoable.
 void redo()
          
 java.lang.String toString()
          Gets the short name (rdfs:label).
 void undo()
          
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LalUndoableEditWrapper

public LalUndoableEditWrapper(LabeledUndoableEdit lue,
                              PrefsManager prefs)
Create a new swing undoable from the given AppLoader undoable and its associated application preferences.

Parameters:
lue - The undoable to wrap
prefs - The preferences to use while generating the swing undoable
Method Detail

getPresentationName

public java.lang.String getPresentationName()
Get the presentation name for the undoable. If it exists, this is the long name. Otherwise, it is the short name (rdfs:label) for the describer, if found. Otherwise, it is the URI of the undoable.

Returns:
the presentation name for the undoable, to show up in menus or lists of events

toString

public java.lang.String toString()
Gets the short name (rdfs:label).

Returns:
the rdfs:label name of the undoable action

canRedo

public boolean canRedo()


canUndo

public boolean canUndo()


die

public void die()


redo

public void redo()
          throws javax.swing.undo.CannotRedoException

Throws:
javax.swing.undo.CannotRedoException

undo

public void undo()
          throws javax.swing.undo.CannotUndoException

Throws:
javax.swing.undo.CannotUndoException