Package adams.gui.visualization.core
Class AxisPanelOptions
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.core.AxisPanelOptions
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,PlotPanelAxisOptions,Serializable
- Direct Known Subclasses:
AbstractTimeseriesXAxisPanelOptions,AbstractTimeseriesYAxisPanelOptions
public class AxisPanelOptions extends AbstractOptionHandler implements PlotPanelAxisOptions
Encapsulates options for an axis in a plot.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-label <java.lang.String> (property: label) The label of the axis. default:
-type <ABSOLUTE|PERCENTAGE|LOG10_ABSOLUTE|LOG10_PERCENTAGE|LOG_ABSOLUTE|LOG_PERCENTAGE|DATE|TIME|DATETIME> (property: type) The type of the axis. default: ABSOLUTE
-hide-grid-lines <boolean> (property: showGridLines) If enabled, grid lines are plotted as well. default: true
-tick-generator <adams.gui.visualization.core.axis.TickGenerator> (property: tickGenerator) Algorithm for generating the tick positions. default: adams.gui.visualization.core.axis.FancyTickGenerator
-nth-value <int> (property: nthValueToShow) The count of ticks a value is shown, i.e., '3' means every third tick: 1, 4, 7, ... default: 5 minimum: 0
-length-ticks <int> (property: lengthTicks) The length in pixels of the ticks to display. default: 4 minimum: 1
-width <int> (property: width) The width/height of the axis (>= 5). default: 20 minimum: 5
-top-margin <double> (property: topMargin) The factor for an extra margin on the top/left (eg 0.05 = 5%). default: 0.0 minimum: 0.0
-bottom-margin <double> (property: bottomMargin) The factor for an extra margin on the bottom/right (eg 0.05 = 5%). default: 0.0 minimum: 0.0
-custom-format <adams.data.DecimalFormatString> (property: customFormat) The custom format for displaying the tick labels on the axis. default:
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected doublem_BottomMarginthe bottom margin.protected DecimalFormatStringm_CustomFormatthe custom number/date format.protected Stringm_Labelthe label of the axis.protected intm_LengthTicksthe length in pixles of ticks to use.protected intm_NthValueToShowevery nth value to display.protected booleanm_ShowGridLineswhether to show gridlines or not.protected TickGeneratorm_TickGeneratorthe tick generator to use.protected doublem_TopMarginthe top margin.protected Typem_Typethe type of the axis.protected intm_Widththe width of the axis (for HORIZONTAL axes, this is the height, of course).-
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 AxisPanelOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbottomMarginTipText()Returns the tip text for this property.voidconfigure(PlotPanel plot, Axis axis)Applies the options to the specified axis.StringcustomFormatTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.doublegetBottomMargin()Returns the currently set bottom margin factor (>= 0.0).DecimalFormatStringgetCustomFormat()Returns the custom format for the tick labels.StringgetLabel()Returns the label of the axis.intgetLengthTicks()Returns the length of ticks currently displayed.intgetNthValueToShow()Returns the count of ticks a value is shown, i.e., "3" means every third tick: 1, 4, 7, ...booleangetShowGridLines()Returns whether to plot grid lines as well.TickGeneratorgetTickGenerator()Returns the current tick generator in use.doublegetTopMargin()Returns the currently set top margin factor (>= 0.0).TypegetType()Returns the type of the axis.intgetWidth()Returns the current width of the axis.StringglobalInfo()Returns a string describing the object.StringlabelTipText()Returns the tip text for this property.StringlengthTicksTipText()Returns the tip text for this property.StringnthValueToShowTipText()Returns the tip text for this property.voidsetBottomMargin(double value)Sets the bottom margin factor (>= 0.0).voidsetCustomFormat(DecimalFormatString value)Sets the custom format for the tick labels.voidsetLabel(String value)Sets label of the axis.voidsetLengthTicks(int value)Sets the length of ticks to display along the axis.voidsetNthValueToShow(int value)Sets the count of ticks a value is shown, i.e., "3" means every third tick: 1, 4, 7, ...voidsetShowGridLines(boolean value)Sets whether to plot grid lines as well.voidsetTickGenerator(TickGenerator value)Sets tick generator to use.voidsetTopMargin(double value)Sets the top margin factor (>= 0.0).voidsetType(Type value)Sets type of the axis.voidsetWidth(int value)Sets the width of the axis (this is height for HORIZONTAL axes, of course), at least 5 pixel.StringshowGridLinesTipText()Returns the tip text for this property.StringtickGeneratorTipText()Returns the tip text for this property.StringtopMarginTipText()Returns the tip text for this property.StringtypeTipText()Returns the tip text for this property.StringwidthTipText()Returns the tip text for this property.-
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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Label
protected String m_Label
the label of the axis.
-
m_Type
protected Type m_Type
the type of the axis.
-
m_ShowGridLines
protected boolean m_ShowGridLines
whether to show gridlines or not.
-
m_TickGenerator
protected TickGenerator m_TickGenerator
the tick generator to use.
-
m_NthValueToShow
protected int m_NthValueToShow
every nth value to display.
-
m_LengthTicks
protected int m_LengthTicks
the length in pixles of ticks to use.
-
m_CustomFormat
protected DecimalFormatString m_CustomFormat
the custom number/date format.
-
m_TopMargin
protected double m_TopMargin
the top margin.
-
m_BottomMargin
protected double m_BottomMargin
the bottom margin.
-
m_Width
protected int m_Width
the width of the axis (for HORIZONTAL axes, this is the height, of course).
-
-
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 classAbstractOptionHandler
-
setLabel
public void setLabel(String value)
Sets label of the axis.- Parameters:
value- the label
-
getLabel
public String getLabel()
Returns the label of the axis.- Returns:
- the label
-
labelTipText
public String labelTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setType
public void setType(Type value)
Sets type of the axis.- Parameters:
value- the type
-
getType
public Type getType()
Returns the type of the axis.- Returns:
- the type
-
typeTipText
public String typeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setShowGridLines
public void setShowGridLines(boolean value)
Sets whether to plot grid lines as well.- Parameters:
value- if true grid lines will be plotted
-
getShowGridLines
public boolean getShowGridLines()
Returns whether to plot grid lines as well.- Returns:
- true if grid lines are plotted
-
showGridLinesTipText
public String showGridLinesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTickGenerator
public void setTickGenerator(TickGenerator value)
Sets tick generator to use.- Parameters:
value- the tick generator
-
getTickGenerator
public TickGenerator getTickGenerator()
Returns the current tick generator in use.- Returns:
- the tick generator
-
tickGeneratorTipText
public String tickGeneratorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setNthValueToShow
public void setNthValueToShow(int value)
Sets the count of ticks a value is shown, i.e., "3" means every third tick: 1, 4, 7, ...- Parameters:
value- the count
-
getNthValueToShow
public int getNthValueToShow()
Returns the count of ticks a value is shown, i.e., "3" means every third tick: 1, 4, 7, ...- Returns:
- the count
-
nthValueToShowTipText
public String nthValueToShowTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setLengthTicks
public void setLengthTicks(int value)
Sets the length of ticks to display along the axis.- Parameters:
value- the length of ticks (in pixels)
-
getLengthTicks
public int getLengthTicks()
Returns the length of ticks currently displayed.- Returns:
- the length of ticks (in pixles)
-
lengthTicksTipText
public String lengthTicksTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTopMargin
public void setTopMargin(double value)
Sets the top margin factor (>= 0.0).- Parameters:
value- the top margin
-
getTopMargin
public double getTopMargin()
Returns the currently set top margin factor (>= 0.0).- Returns:
- the top margin
-
topMarginTipText
public String topMarginTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setBottomMargin
public void setBottomMargin(double value)
Sets the bottom margin factor (>= 0.0).- Parameters:
value- the bottom margin
-
getBottomMargin
public double getBottomMargin()
Returns the currently set bottom margin factor (>= 0.0).- Returns:
- the bottom margin
-
bottomMarginTipText
public String bottomMarginTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setWidth
public void setWidth(int value)
Sets the width of the axis (this is height for HORIZONTAL axes, of course), at least 5 pixel.- Parameters:
value- the new width
-
getWidth
public int getWidth()
Returns the current width of the axis.- Returns:
- the width
-
widthTipText
public String widthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setCustomFormat
public void setCustomFormat(DecimalFormatString value)
Sets the custom format for the tick labels.- Parameters:
value- the custom format
-
getCustomFormat
public DecimalFormatString getCustomFormat()
Returns the custom format for the tick labels.- Returns:
- the custom format
-
customFormatTipText
public String customFormatTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
configure
public void configure(PlotPanel plot, Axis axis)
Applies the options to the specified axis.- Specified by:
configurein interfacePlotPanelAxisOptions- Parameters:
plot- the plot panel to update an axis foraxis- the axis to configure
-
-