org.astrogrid.desktop.modules.adqlEditor.commands
Class EditSingletonTextCommand

java.lang.Object
  extended by javax.swing.undo.AbstractUndoableEdit
      extended by org.astrogrid.desktop.modules.adqlEditor.commands.AbstractCommand
          extended by org.astrogrid.desktop.modules.adqlEditor.commands.EditSingletonTextCommand
All Implemented Interfaces:
Serializable, UndoableEdit, CommandExec, CommandInfo

public class EditSingletonTextCommand
extends AbstractCommand

Author:
jl99@star.le.ac.uk TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.astrogrid.desktop.modules.adqlEditor.commands.CommandExec
CommandExec.Result
 
Field Summary
private static org.apache.commons.logging.Log log
           
private  String newValue
           
private  String oldValue
           
 
Fields inherited from class org.astrogrid.desktop.modules.adqlEditor.commands.AbstractCommand
adqlTree, childElement, childToken, childType, maxOccurs, minOccurs, parentToken, parentType, undoManager
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Fields inherited from interface org.astrogrid.desktop.modules.adqlEditor.commands.CommandExec
ERROR, FAILED, OK, WARNING
 
Constructor Summary
EditSingletonTextCommand(AdqlTree adqlTree, UndoManager undoManager, AdqlNode target)
           
 
Method Summary
private  CommandExec.Result _execute(String srcValue)
           
 void die()
           
 CommandExec.Result execute()
           
 String[] getEnumeratedValues()
           
 String getNewValue()
           
 String getOldValue()
           
 String getPresentationName()
           
 void redo()
           
 void setNewValue(String value)
           
 void setOldValue(String oldValue)
           
 void setSelectedValue(String value)
           
 String toString()
           
 void undo()
           
 
Methods inherited from class org.astrogrid.desktop.modules.adqlEditor.commands.AbstractCommand
addToEditStore, exchangeInEditStore, exchangeInEditStore, getChildDisplayName, getChildElement, getChildElementName, getChildEntry, getChildIndex, getChildMaxOccurs, getChildMinOccurs, getChildObject, getChildToken, getChildType, getFromEditStore, getMessages, getParentDisplayName, getParentElementName, getParentEntry, getParentObject, getParentToken, getParentType, isChildCascadeable, isChildColumnLinked, isChildDisallowed, isChildDrivenByEnumeratedAttribute, isChildDrivenByEnumeratedElement, isChildEnabled, isChildHeldInArray, isChildInPatternContext, isChildMandatorySingleton, isChildOptionalSingleton, isChildSupportedType, isChildTableLinked, isInitializedStatusGood, isInsertableIntoArray, isParentSuitablePasteTargetFor, setMessages
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

oldValue

private String oldValue

newValue

private String newValue
Constructor Detail

EditSingletonTextCommand

public EditSingletonTextCommand(AdqlTree adqlTree,
                                UndoManager undoManager,
                                AdqlNode target)
Parameters:
target -
source -
Method Detail

getEnumeratedValues

public String[] getEnumeratedValues()

setNewValue

public void setNewValue(String value)

setSelectedValue

public void setSelectedValue(String value)

execute

public CommandExec.Result execute()
Specified by:
execute in interface CommandExec
Overrides:
execute in class AbstractCommand

_execute

private CommandExec.Result _execute(String srcValue)

die

public void die()
Specified by:
die in interface UndoableEdit
Overrides:
die in class AbstractUndoableEdit

redo

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

undo

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

getPresentationName

public String getPresentationName()
Specified by:
getPresentationName in interface UndoableEdit
Overrides:
getPresentationName in class AbstractUndoableEdit

getOldValue

public String getOldValue()
Returns:
the oldValue

setOldValue

public void setOldValue(String oldValue)
Parameters:
oldValue - the oldValue to set

getNewValue

public String getNewValue()
Returns:
the newValue

toString

public String toString()
Overrides:
toString in class AbstractCommand


Copyright © 2002-2010 AstroGrid. All Rights Reserved.