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_FixedLabelsthe 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 voiddoGenerate()Generate the ticks of this axis.List<String>getLabels()Returns the list of labels in use.StringglobalInfo()Returns a string describing the object.protected voidinitialize()Initializes the members.voidsetLabels(List<String> value)Sets the list of labels to use.StringvalueToDisplayLabel(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:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classAbstractTickGenerator
-
setLabels
public void setLabels(List<String> value)
Sets the list of labels to use.- Specified by:
setLabelsin interfaceFixedLabelTickGenerator- Parameters:
value- the labels
-
getLabels
public List<String> getLabels()
Returns the list of labels in use.- Specified by:
getLabelsin interfaceFixedLabelTickGenerator- Returns:
- the labels
-
doGenerate
protected void doGenerate()
Generate the ticks of this axis.- Specified by:
doGeneratein classAbstractTickGenerator
-
valueToDisplayLabel
public String valueToDisplayLabel(double value)
Returns the label associated with the value.- Specified by:
valueToDisplayLabelin interfaceFixedLabelTickGenerator- Parameters:
value- the value to get the label for- Returns:
- the label, null if none available
-
-