Class AbstractXYChartGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.xchart.chart.AbstractChartGenerator<C,D>
-
- adams.gui.visualization.xchart.chart.AbstractChartGeneratorWithAxisLabels<org.knowm.xchart.XYChart,XYDataset>
-
- adams.gui.visualization.xchart.chart.AbstractXYChartGenerator
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,ColorProviderHandler,Serializable
- Direct Known Subclasses:
ScatterPlotChart,XYLineChart
public abstract class AbstractXYChartGenerator extends AbstractChartGeneratorWithAxisLabels<org.knowm.xchart.XYChart,XYDataset> implements ColorProviderHandler
Ancestor for XY charts.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Colorm_BackgroundColorthe background color.protected ColorProviderm_ColorProviderthe color provider for generating the colors (if more than one series).protected Colorm_DiagonalColorthe color for the diagonal plot.protected intm_MarkerSizethe marker size.protected Colorm_ZoomSelectionColorthe zoom selection color.-
Fields inherited from class adams.gui.visualization.xchart.chart.AbstractChartGeneratorWithAxisLabels
m_LabelX, m_LabelY
-
Fields inherited from class adams.gui.visualization.xchart.chart.AbstractChartGenerator
m_Legend, m_LegendPosition, m_Title
-
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 AbstractXYChartGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddData(org.knowm.xchart.XYChart chart, Datasets<XYDataset> data)Adds the data to the chart.StringbackgroundColorTipText()Returns the tip text for this property.protected org.knowm.xchart.XYChartbuildChart()Builds the chart.StringcolorProviderTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.StringdiagonalColorTipText()Returns the tip text for this property.ColorgetBackgroundColor()Returns the background color for the plot.ColorProvidergetColorProvider()Returns the color provider to use for XY charts.ColorgetDiagonalColor()Returns the color for the diagonal (ie second data series if present) of XY charts.intgetMarkerSize()Returns the marker size.ColorgetZoomSelectionColor()Returns the color for the zoom selection.StringmarkerSizeTipText()Returns the tip text for this property.voidsetBackgroundColor(Color value)Sets the background color for the plot.voidsetColorProvider(ColorProvider value)Sets the color provider to use for XY charts.voidsetDiagonalColor(Color value)Sets the color for the diagonal (ie second data series if present) of XY charts.voidsetMarkerSize(int value)Sets the marker size.voidsetZoomSelectionColor(Color value)Sets the color for the zoom selection.protected voidstyleChart(org.knowm.xchart.XYChart chart, Datasets<XYDataset> data)Applies styling to the chart.StringzoomSelectionColorTipText()Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.xchart.chart.AbstractChartGeneratorWithAxisLabels
getLabelX, getLabelY, getQuickInfo, labelXTipText, labelYTipText, setLabelX, setLabelY
-
Methods inherited from class adams.gui.visualization.xchart.chart.AbstractChartGenerator
check, doGenerate, generate, getLegend, getLegendPosition, getTitle, legendPositionTipText, legendTipText, postGenerate, setLegend, setLegendPosition, setTitle, titleTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, 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_MarkerSize
protected int m_MarkerSize
the marker size.
-
m_BackgroundColor
protected Color m_BackgroundColor
the background color.
-
m_ColorProvider
protected ColorProvider m_ColorProvider
the color provider for generating the colors (if more than one series).
-
m_DiagonalColor
protected Color m_DiagonalColor
the color for the diagonal plot.
-
m_ZoomSelectionColor
protected Color m_ZoomSelectionColor
the zoom selection color.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractChartGeneratorWithAxisLabels<org.knowm.xchart.XYChart,XYDataset>
-
setMarkerSize
public void setMarkerSize(int value)
Sets the marker size.- Parameters:
value- the size
-
getMarkerSize
public int getMarkerSize()
Returns the marker size.- Returns:
- the size
-
markerSizeTipText
public String markerSizeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setBackgroundColor
public void setBackgroundColor(Color value)
Sets the background color for the plot.- Parameters:
value- the color
-
getBackgroundColor
public Color getBackgroundColor()
Returns the background color for the plot.- Returns:
- the color
-
backgroundColorTipText
public String backgroundColorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColorProvider
public void setColorProvider(ColorProvider value)
Sets the color provider to use for XY charts.- Specified by:
setColorProviderin interfaceColorProviderHandler- Parameters:
value- the color provider
-
getColorProvider
public ColorProvider getColorProvider()
Returns the color provider to use for XY charts.- Specified by:
getColorProviderin interfaceColorProviderHandler- Returns:
- the color provider
-
colorProviderTipText
public String colorProviderTipText()
Returns the tip text for this property.- Specified by:
colorProviderTipTextin interfaceColorProviderHandler- Returns:
- tip text for this property suitable for displaying in the gui
-
setDiagonalColor
public void setDiagonalColor(Color value)
Sets the color for the diagonal (ie second data series if present) of XY charts.- Parameters:
value- the color
-
getDiagonalColor
public Color getDiagonalColor()
Returns the color for the diagonal (ie second data series if present) of XY charts.- Returns:
- the color
-
diagonalColorTipText
public String diagonalColorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setZoomSelectionColor
public void setZoomSelectionColor(Color value)
Sets the color for the zoom selection.- Parameters:
value- the color
-
getZoomSelectionColor
public Color getZoomSelectionColor()
Returns the color for the zoom selection.- Returns:
- the color
-
zoomSelectionColorTipText
public String zoomSelectionColorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
buildChart
protected org.knowm.xchart.XYChart buildChart()
Builds the chart.- Specified by:
buildChartin classAbstractChartGenerator<org.knowm.xchart.XYChart,XYDataset>- Returns:
- the chart
-
styleChart
protected void styleChart(org.knowm.xchart.XYChart chart, Datasets<XYDataset> data)Applies styling to the chart.- Specified by:
styleChartin classAbstractChartGenerator<org.knowm.xchart.XYChart,XYDataset>- Parameters:
data- the data to will be addedchart- the chart to style
-
addData
protected void addData(org.knowm.xchart.XYChart chart, Datasets<XYDataset> data)Adds the data to the chart.- Specified by:
addDatain classAbstractChartGenerator<org.knowm.xchart.XYChart,XYDataset>- Parameters:
chart- the chart to add the data todata- the data to add
-
-