Package adams.flow.standalone
Class AbstractMultiView.ViewWrapper
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.core.AbstractActor
-
- adams.flow.core.AbstractDisplay
-
- adams.flow.standalone.AbstractMultiView.ViewWrapper
-
- All Implemented Interfaces:
AdditionalInformationHandler
,CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,ShallowCopySupporter<Actor>
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,TextSupporter
,VariablesInspectionHandler
,VariableChangeListener
,Actor
,DataPlotUpdaterSupporter
,DisplayTypeSupporter
,ErrorHandler
,Flushable
,InputConsumer
,ComponentSupplier
,TextSupplier
,Serializable
,Comparable
- Enclosing class:
- AbstractMultiView
public static class AbstractMultiView.ViewWrapper extends AbstractDisplay implements InputConsumer, ComponentSupplier, TextSupplier, Flushable, DataPlotUpdaterSupporter
A wrapper for the actual actors.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractDisplay
m_Wrapped
the actor to wrap.-
Fields inherited from class adams.flow.core.AbstractDisplay
BACKUP_INPUT, m_CreateFrame, m_DisplayType, m_Frame, m_Height, m_InputToken, m_KeepOpen, m_Panel, m_ShortTitle, m_Updating, m_Width, m_X, m_Y
-
Fields inherited from class adams.flow.core.AbstractActor
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_LoggingPrefix, m_Name, m_Parent, m_ScopeHandler, m_Self, m_Silent, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from interface adams.flow.core.Actor
FILE_EXTENSION, FILE_EXTENSION_GZ
-
-
Constructor Summary
Constructors Constructor Description ViewWrapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]
accepts()
Returns the class that the consumer accepts.void
cleanUp()
Cleans up after the execution has finished.void
clearPanel()
Clears the panel.void
defineOptions()
Adds options to the internal list of options.protected String
doExecute()
Executes the flow item.void
flushExecution()
Stops the processing of tokens without stopping the flow.String
getCustomSupplyTextMenuItemCaption()
Returns the text for the menu item.ExtensionFileFilter
getCustomTextFileFilter()
Returns a custom file filter for the file chooser.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.Actor
getWrapped()
Returns the wrapped actor.String
globalInfo()
Returns a string describing the object.protected Runnable
newDisplayRunnable()
Returns a runnable that displays frame, etc.protected BasePanel
newPanel()
Creates the panel to display in the dialog.void
setVariables(Variables value)
Updates the Variables instance in use, if different from current one.void
setWrapped(Actor value)
Sets the actor to wrap.JComponent
supplyComponent()
Supplies the component.String
supplyText()
Supplies the text.void
updatePlot()
Updates the data container panel regardless, notifying the listeners.String
wrappedTipText()
Returns the tip text for this property.void
wrapUp()
Cleans up after the execution has finished.-
Methods inherited from class adams.flow.core.AbstractDisplay
backupState, cleanUpGUI, cleanUpGUIKeepOpen, closeFrame, createFrame, createTitle, currentInput, deregisterInWrapUp, deregisterWindow, deregisterWithEditor, displayTypeTipText, doCreateFrame, getCreateFrame, getDefaultDisplayType, getDefaultHeight, getDefaultShortTitle, getDefaultWidth, getDefaultX, getDefaultY, getDisplayType, getFrame, getFrameDefaultCloseOperation, getHeight, getKeepOpen, getPanel, getShortTitle, getWidth, getX, getY, hasInput, heightTipText, initialize, input, postCreateFrame, preCreateFrame, registerWindow, registerWithEditor, reset, restoreState, setCreateFrame, setDisplayType, setHeight, setKeepOpen, setShortTitle, setWidth, setX, setY, shortTitleTipText, stopExecution, widthTipText, xTipText, yTipText
-
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, canInspectOptions, canPerformSetUpCheck, compareTo, configureLogger, destroy, equals, execute, finalUpdateVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, handleException, hasErrorHandler, hasStopMessage, index, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, performVariableChecks, postExecute, preExecute, pruneBackup, pruneBackup, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setUp, shallowCopy, shallowCopy, silentTipText, sizeOf, skipTipText, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.core.Actor
compareTo, destroy, equals, execute, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setUp, shallowCopy, shallowCopy, sizeOf, stopExecution, stopExecution, toCommandLine, variableChanged
-
Methods inherited from interface adams.core.AdditionalInformationHandler
getAdditionalInformation
-
Methods inherited from interface adams.flow.core.InputConsumer
currentInput, hasInput, input
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager
-
Methods inherited from interface adams.core.VariablesInspectionHandler
canInspectOptions
-
-
-
-
Field Detail
-
m_Wrapped
protected AbstractDisplay m_Wrapped
the actor to wrap.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractDisplay
-
setWrapped
public void setWrapped(Actor value)
Sets the actor to wrap.- Parameters:
value
- the actor to wrap
-
getWrapped
public Actor getWrapped()
Returns the wrapped actor.- Returns:
- the wrapped actor
-
wrappedTipText
public String wrappedTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceActor
- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractDisplay
- Returns:
- null if no info available, otherwise short string
-
accepts
public Class[] accepts()
Returns the class that the consumer accepts.- Specified by:
accepts
in interfaceInputConsumer
- Returns:
- the Class of objects that can be processed
-
setVariables
public void setVariables(Variables value)
Updates the Variables instance in use, if different from current one.
Updates them_Wrapped
actor as well.- Specified by:
setVariables
in interfaceActor
- Overrides:
setVariables
in classAbstractActor
- Parameters:
value
- the instance to use- See Also:
AbstractActor.forceVariables(Variables)
-
doExecute
protected String doExecute()
Executes the flow item.- Overrides:
doExecute
in classAbstractDisplay
- Returns:
- null if everything is fine, otherwise error message
-
flushExecution
public void flushExecution()
Stops the processing of tokens without stopping the flow.- Specified by:
flushExecution
in interfaceFlushable
-
wrapUp
public void wrapUp()
Cleans up after the execution has finished.- Specified by:
wrapUp
in interfaceActor
- Overrides:
wrapUp
in classAbstractDisplay
-
cleanUp
public void cleanUp()
Cleans up after the execution has finished. Also removes graphical components.- Specified by:
cleanUp
in interfaceActor
- Specified by:
cleanUp
in interfaceCleanUpHandler
- Overrides:
cleanUp
in classAbstractDisplay
-
clearPanel
public void clearPanel()
Clears the panel.- Specified by:
clearPanel
in classAbstractDisplay
-
getCustomSupplyTextMenuItemCaption
public String getCustomSupplyTextMenuItemCaption()
Returns the text for the menu item.- Specified by:
getCustomSupplyTextMenuItemCaption
in interfaceTextSupplier
- Returns:
- the menu item text, null for default
-
getCustomTextFileFilter
public ExtensionFileFilter getCustomTextFileFilter()
Returns a custom file filter for the file chooser.- Specified by:
getCustomTextFileFilter
in interfaceTextSupplier
- Returns:
- the file filter, null if to use default one
-
supplyText
public String supplyText()
Supplies the text. May get called even if actor hasn't been executed yet.- Specified by:
supplyText
in interfaceTextSupplier
- Specified by:
supplyText
in interfaceTextSupporter
- Returns:
- the text, null if none available
-
supplyComponent
public JComponent supplyComponent()
Supplies the component. May get called even before actor has been executed.- Specified by:
supplyComponent
in interfaceComponentSupplier
- Returns:
- the component, null if none available
-
newPanel
protected BasePanel newPanel()
Creates the panel to display in the dialog.- Specified by:
newPanel
in classAbstractDisplay
- Returns:
- null, m_Panel gets generated in execute
-
newDisplayRunnable
protected Runnable newDisplayRunnable()
Returns a runnable that displays frame, etc. Must call notifyAll() on the m_Self object and set m_Updating to false.- Specified by:
newDisplayRunnable
in classAbstractDisplay
- Returns:
- null, as not necessary
- See Also:
AbstractDisplay.m_Updating
-
updatePlot
public void updatePlot()
Updates the data container panel regardless, notifying the listeners.- Specified by:
updatePlot
in interfaceDataPlotUpdaterSupporter
-
-