Class VariableRenamed
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.flow.tree.postprocessor.AbstractEditPostProcessor
-
- adams.gui.flow.tree.postprocessor.VariableRenamed
-
- All Implemented Interfaces:
LoggingSupporter
,SizeOfHandler
,Serializable
public class VariableRenamed extends AbstractEditPostProcessor
Updates all references of the variable that was renamed.
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description VariableRenamed()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
applies(Actor parent, Actor oldActor, Actor newActor)
Checks whether this post processor scheme applies to the current situation.protected boolean
doPostProcess(Tree tree, Actor parent, Actor oldActor, Actor newActor)
Post-processes the tree.protected VariableName
getVariableName(Actor actor)
Extracts the variable name (the option) from the actor.String
globalInfo()
Returns a string describing the object.-
Methods inherited from class adams.gui.flow.tree.postprocessor.AbstractEditPostProcessor
apply, getPostProcessors, postProcess
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Returns:
- a description suitable for displaying in the gui
-
getVariableName
protected VariableName getVariableName(Actor actor)
Extracts the variable name (the option) from the actor.- Parameters:
actor
- the actor to get the variable name from- Returns:
- the variable name, null if none found
-
applies
public boolean applies(Actor parent, Actor oldActor, Actor newActor)
Checks whether this post processor scheme applies to the current situation.- Specified by:
applies
in classAbstractEditPostProcessor
- Parameters:
oldActor
- the old actornewActor
- the new, updated actorparent
- the parent actor- Returns:
- true if this post processor applies to the situation
-
doPostProcess
protected boolean doPostProcess(Tree tree, Actor parent, Actor oldActor, Actor newActor)
Post-processes the tree.- Specified by:
doPostProcess
in classAbstractEditPostProcessor
- Parameters:
tree
- the tree to post-processparent
- the parent actoroldActor
- the old actornewActor
- the new, updated actor- Returns:
- true if tree got modified
-
-