Class DefaultFlow
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.jfreechart.dataset.AbstractDatasetGenerator<org.jfree.data.flow.DefaultFlowDataset<String>>
-
- adams.gui.visualization.jfreechart.dataset.DefaultFlow
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Serializable
public class DefaultFlow extends AbstractDatasetGenerator<org.jfree.data.flow.DefaultFlowDataset<String>>
GeneratesDefaultFlowDataset
.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SpreadSheetColumnIndex
m_Flow
the column with the flow/weight.protected SpreadSheetColumnIndex
m_Source
the column with the source.protected SpreadSheetColumnIndex
m_Stage
the column with the optional stage.protected SpreadSheetColumnIndex
m_Target
the column with the target.-
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 DefaultFlow()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
check(SpreadSheet data)
Hook method for checks before generating the dataset.void
defineOptions()
Adds options to the internal list of options.protected org.jfree.data.flow.DefaultFlowDataset<String>
doAddSeries(org.jfree.data.general.Dataset dataset, SpreadSheet data)
Performs the actual addition of the series to the dataset.protected org.jfree.data.flow.DefaultFlowDataset<String>
doGenerate(SpreadSheet data)
Performs the actual generation of the dataset.String
flowTipText()
Returns the tip text for this property.Class<? extends org.jfree.data.general.Dataset>
generates()
Returns the class of dataset that it generates.SpreadSheetColumnIndex
getFlow()
Returns the flow/weight column.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.SpreadSheetColumnIndex
getSource()
Returns the source column.SpreadSheetColumnIndex
getStage()
Returns the stage column.SpreadSheetColumnIndex
getTarget()
Returns the target column.String
globalInfo()
Returns a string describing the object.void
setFlow(SpreadSheetColumnIndex value)
Sets the flow/weight column.void
setSource(SpreadSheetColumnIndex value)
Sets the source column.void
setStage(SpreadSheetColumnIndex value)
Sets the stage column.void
setTarget(SpreadSheetColumnIndex value)
Sets the target column.String
sourceTipText()
Returns the tip text for this property.String
stageTipText()
Returns the tip text for this property.String
targetTipText()
Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.jfreechart.dataset.AbstractDatasetGenerator
addSeries, checkAddSeries, generate
-
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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Stage
protected SpreadSheetColumnIndex m_Stage
the column with the optional stage.
-
m_Source
protected SpreadSheetColumnIndex m_Source
the column with the source.
-
m_Target
protected SpreadSheetColumnIndex m_Target
the column with the target.
-
m_Flow
protected SpreadSheetColumnIndex m_Flow
the column with the flow/weight.
-
-
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 classAbstractOptionHandler
-
setStage
public void setStage(SpreadSheetColumnIndex value)
Sets the stage column.- Parameters:
value
- the column
-
getStage
public SpreadSheetColumnIndex getStage()
Returns the stage column.- Returns:
- the column
-
stageTipText
public String stageTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSource
public void setSource(SpreadSheetColumnIndex value)
Sets the source column.- Parameters:
value
- the column
-
getSource
public SpreadSheetColumnIndex getSource()
Returns the source column.- Returns:
- the column
-
sourceTipText
public String sourceTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTarget
public void setTarget(SpreadSheetColumnIndex value)
Sets the target column.- Parameters:
value
- the column
-
getTarget
public SpreadSheetColumnIndex getTarget()
Returns the target column.- Returns:
- the column
-
targetTipText
public String targetTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFlow
public void setFlow(SpreadSheetColumnIndex value)
Sets the flow/weight column.- Parameters:
value
- the column
-
getFlow
public SpreadSheetColumnIndex getFlow()
Returns the flow/weight column.- Returns:
- the column
-
flowTipText
public String flowTipText()
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 interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractDatasetGenerator<org.jfree.data.flow.DefaultFlowDataset<String>>
- Returns:
- null if no info available, otherwise short string
-
generates
public Class<? extends org.jfree.data.general.Dataset> generates()
Returns the class of dataset that it generates.- Specified by:
generates
in classAbstractDatasetGenerator<org.jfree.data.flow.DefaultFlowDataset<String>>
- Returns:
- the dataset class
-
check
protected String check(SpreadSheet data)
Hook method for checks before generating the dataset.- Overrides:
check
in classAbstractDatasetGenerator<org.jfree.data.flow.DefaultFlowDataset<String>>
- Parameters:
data
- the data to use- Returns:
- null if checks passed, otherwise error message
-
doGenerate
protected org.jfree.data.flow.DefaultFlowDataset<String> doGenerate(SpreadSheet data)
Performs the actual generation of the dataset.- Specified by:
doGenerate
in classAbstractDatasetGenerator<org.jfree.data.flow.DefaultFlowDataset<String>>
- Parameters:
data
- the data to use- Returns:
- the dataset
-
doAddSeries
protected org.jfree.data.flow.DefaultFlowDataset<String> doAddSeries(org.jfree.data.general.Dataset dataset, SpreadSheet data)
Performs the actual addition of the series to the dataset.- Specified by:
doAddSeries
in classAbstractDatasetGenerator<org.jfree.data.flow.DefaultFlowDataset<String>>
- Parameters:
dataset
- the dataset to add the series todata
- the data to use- Returns:
- the updated dataset
-
-