Package adams.flow.processor
Class AbstractActorListingProcessor
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.processor.AbstractActorProcessor
-
- adams.flow.processor.AbstractListingProcessor
-
- adams.flow.processor.AbstractActorListingProcessor
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<ActorProcessor>
,SizeOfHandler
,ActorProcessor
,ActorProcessorWithFlowPanelContext
,GraphicalOutputProducingProcessor
,ListingProcessor
,Serializable
,Comparable<ActorProcessor>
- Direct Known Subclasses:
AbstractListNameUsage
,FindText
,ListActorUsage
,ListClassUsage
public abstract class AbstractActorListingProcessor extends AbstractListingProcessor implements ActorProcessorWithFlowPanelContext
Ancestor for processors that list full actor names and allow jumping to them.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected FlowPanel
m_Context
the context.protected Actor
m_Current
the current actor being processed.-
Fields inherited from class adams.flow.processor.AbstractListingProcessor
m_List
-
Fields inherited from class adams.flow.processor.AbstractActorProcessor
m_Errors
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractActorListingProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
createLocation(OptionHandler owner, Object obj, OptionTraversalPath path)
Creates a location string used in the list.protected Actor
findEnclosingActor(OptionHandler owner, OptionTraversalPath path)
Tries to locate the enclosing actor.protected Actor
findEnclosingActor(OptionHandler owner, OptionTraversalPath path, int index)
Tries to locate the enclosing actor.FlowPanel
getContext()
Returns the FlowPanel context.Component
getGraphicalOutput()
Returns the graphical output that was generated.protected boolean
isSortedList()
Returns whether the list should be sorted.protected boolean
isUniqueList()
Returns whether the list should not contain any duplicates.protected String
objectToString(AbstractOption option, Object obj, OptionTraversalPath path)
Returns the string representation of the object that is added to the list.protected void
processActor(Actor actor)
Performs the actual processing.void
setContext(FlowPanel value)
Sets the FlowPanel context.-
Methods inherited from class adams.flow.processor.AbstractListingProcessor
finalizeList, generatesMultipleItems, getDefaultSize, getHeader, getList, hasGraphicalOutput, initializeList, isValid, objectToStrings, process
-
Methods inherited from class adams.flow.processor.AbstractActorProcessor
addError, addError, checkData, compareTo, equals, getErrors, hasErrors, initialize, process, reset, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.processor.ActorProcessor
compareTo, getErrors, hasErrors, process, shallowCopy, shallowCopy
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.flow.processor.GraphicalOutputProducingProcessor
getTitle
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
setContext
public void setContext(FlowPanel value)
Sets the FlowPanel context.- Specified by:
setContext
in interfaceActorProcessorWithFlowPanelContext
- Parameters:
value
- the context, null if none
-
getContext
public FlowPanel getContext()
Returns the FlowPanel context.- Specified by:
getContext
in interfaceActorProcessorWithFlowPanelContext
- Returns:
- the context, null if not set
-
findEnclosingActor
protected Actor findEnclosingActor(OptionHandler owner, OptionTraversalPath path, int index)
Tries to locate the enclosing actor.- Parameters:
owner
- the option handlerpath
- the traversal path so far- Returns:
- the actor, null if failed to locate
-
findEnclosingActor
protected Actor findEnclosingActor(OptionHandler owner, OptionTraversalPath path)
Tries to locate the enclosing actor.- Parameters:
owner
- the option handlerpath
- the traversal path so far- Returns:
- the actor, null if failed to locate
-
createLocation
protected String createLocation(OptionHandler owner, Object obj, OptionTraversalPath path)
Creates a location string used in the list.- Parameters:
owner
- the option handlerobj
- the object where the name was located- Returns:
- the generated location string
-
objectToString
protected String objectToString(AbstractOption option, Object obj, OptionTraversalPath path)
Returns the string representation of the object that is added to the list.- Overrides:
objectToString
in classAbstractListingProcessor
- Parameters:
option
- the current optionobj
- the object to turn into a stringpath
- the traversal path of properties- Returns:
- the string representation, null if to ignore the item
-
processActor
protected void processActor(Actor actor)
Performs the actual processing.- Overrides:
processActor
in classAbstractListingProcessor
- Parameters:
actor
- the actor to process (is a copy of original for processors implementing ModifyingProcessor)- See Also:
ModifyingProcessor
-
isSortedList
protected boolean isSortedList()
Returns whether the list should be sorted.- Specified by:
isSortedList
in classAbstractListingProcessor
- Returns:
- true if the list should get sorted
-
isUniqueList
protected boolean isUniqueList()
Returns whether the list should not contain any duplicates.- Specified by:
isUniqueList
in classAbstractListingProcessor
- Returns:
- true if the list contains no duplicates
-
getGraphicalOutput
public Component getGraphicalOutput()
Returns the graphical output that was generated.- Specified by:
getGraphicalOutput
in interfaceGraphicalOutputProducingProcessor
- Overrides:
getGraphicalOutput
in classAbstractListingProcessor
- Returns:
- the graphical output
-
-