Package adams.flow.template
Class FileProcessingWithProgressBar
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.template.AbstractActorTemplate
-
- adams.flow.template.FileProcessingWithProgressBar
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<AbstractActorTemplate>,SizeOfHandler,Serializable
public class FileProcessingWithProgressBar extends AbstractActorTemplate
Generates a Trigger with a FileSystemSearch which updates a progress bar.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-name <java.lang.String> (property: name) The new name for the actor; leave empty to use current. default:
-select-subset <boolean> (property: selectSubset) If enabled, the user can select a subset of the files. default: false
-max-variable <adams.core.VariableName> (property: maxVariable) The name of the variable to use for storing the number of files (= maximum ). default: max
-count-variable <adams.core.VariableName> (property: countVariable) The name of the variable to use for storing the progress count. default: count
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected VariableNamem_CountVariablethe variable to store the current progress in.protected VariableNamem_MaxVariablethe variable to store the # of files.protected booleanm_SelectSubsetwhether to let the user select a subset.static StringPROGRESSBAR_NAME-
Fields inherited from class adams.flow.template.AbstractActorTemplate
m_Name
-
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 FileProcessingWithProgressBar()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcountVariableTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected ActordoGenerate()Generates the actor.VariableNamegetCountVariable()Returns the variable name to use for storing the progress count.VariableNamegetMaxVariable()Returns the variable name to use for storing the number of files (= maximum).booleangetSelectSubset()Returns whether to let the user select a subset.StringglobalInfo()Returns a string describing the object.booleanisInteractive()Whether the flow generated is an interactive one.StringmaxVariableTipText()Returns the tip text for this property.StringselectSubsetTipText()Returns the tip text for this property.voidsetCountVariable(VariableName value)Sets the variable name to use for storing the progress count.voidsetMaxVariable(VariableName value)Sets the variable name to use for storing the number of files (= maximum).voidsetSelectSubset(boolean value)Sets whether to let the user select a subset.-
Methods inherited from class adams.flow.template.AbstractActorTemplate
compareTo, equals, forCommandLine, forName, generate, getBaselineCorrections, getDefaultName, getName, nameTipText, postGenerate, preGenerate, setName, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, 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.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
PROGRESSBAR_NAME
public static final String PROGRESSBAR_NAME
- See Also:
- Constant Field Values
-
m_SelectSubset
protected boolean m_SelectSubset
whether to let the user select a subset.
-
m_MaxVariable
protected VariableName m_MaxVariable
the variable to store the # of files.
-
m_CountVariable
protected VariableName m_CountVariable
the variable to store the current progress in.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractActorTemplate
-
setSelectSubset
public void setSelectSubset(boolean value)
Sets whether to let the user select a subset.- Parameters:
value- true if user can select
-
getSelectSubset
public boolean getSelectSubset()
Returns whether to let the user select a subset.- Returns:
- true if user can select
-
selectSubsetTipText
public String selectSubsetTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMaxVariable
public void setMaxVariable(VariableName value)
Sets the variable name to use for storing the number of files (= maximum).- Parameters:
value- the variable name
-
getMaxVariable
public VariableName getMaxVariable()
Returns the variable name to use for storing the number of files (= maximum).- Returns:
- the variable name
-
maxVariableTipText
public String maxVariableTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setCountVariable
public void setCountVariable(VariableName value)
Sets the variable name to use for storing the progress count.- Parameters:
value- the variable name
-
getCountVariable
public VariableName getCountVariable()
Returns the variable name to use for storing the progress count.- Returns:
- the variable name
-
countVariableTipText
public String countVariableTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
isInteractive
public boolean isInteractive()
Whether the flow generated is an interactive one.- Specified by:
isInteractivein classAbstractActorTemplate- Returns:
- true if interactive
-
doGenerate
protected Actor doGenerate()
Generates the actor.- Specified by:
doGeneratein classAbstractActorTemplate- Returns:
- the generated acto
-
-