Class SimpleFixedLabelTickGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.core.axis.AbstractTickGenerator
-
- adams.gui.visualization.core.axis.SimpleFixedLabelTickGenerator
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<TickGenerator>
,SizeOfHandler
,FixedLabelTickGenerator
,TickGenerator
,Serializable
public class SimpleFixedLabelTickGenerator extends AbstractTickGenerator implements FixedLabelTickGenerator
A simple tick generator that uses a fixed list of labels.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>
m_FixedLabels
the labels to display.-
Fields inherited from class adams.gui.visualization.core.axis.AbstractTickGenerator
m_Labels, m_Parent, m_Ticks
-
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 SimpleFixedLabelTickGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doGenerate()
Generate the ticks of this axis.List<String>
getLabels()
Returns the list of labels in use.String
globalInfo()
Returns a string describing the object.protected void
initialize()
Initializes the members.void
setLabels(List<String> value)
Sets the list of labels to use.String
valueToDisplayLabel(double value)
Returns the label associated with the value.-
Methods inherited from class adams.gui.visualization.core.axis.AbstractTickGenerator
addLabel, fixLabel, forCommandLine, forName, getGenerators, getParent, getTicks, hasLabel, postGenerate, preGenerate, reset, setParent, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
Methods inherited from interface adams.core.ShallowCopySupporter
shallowCopy, shallowCopy
-
Methods inherited from interface adams.gui.visualization.core.axis.TickGenerator
getParent, getTicks, setParent
-
-
-
-
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
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classAbstractTickGenerator
-
setLabels
public void setLabels(List<String> value)
Sets the list of labels to use.- Specified by:
setLabels
in interfaceFixedLabelTickGenerator
- Parameters:
value
- the labels
-
getLabels
public List<String> getLabels()
Returns the list of labels in use.- Specified by:
getLabels
in interfaceFixedLabelTickGenerator
- Returns:
- the labels
-
doGenerate
protected void doGenerate()
Generate the ticks of this axis.- Specified by:
doGenerate
in classAbstractTickGenerator
-
valueToDisplayLabel
public String valueToDisplayLabel(double value)
Returns the label associated with the value.- Specified by:
valueToDisplayLabel
in interfaceFixedLabelTickGenerator
- Parameters:
value
- the value to get the label for- Returns:
- the label, null if none available
-
-