org.knowm.xchart.style
Class Styler
- java.lang.Object
-
- org.knowm.xchart.style.Styler
-
- Direct Known Subclasses:
- AxesChartStyler, DialStyler, PieStyler, RadarStyler
public abstract class Styler extends java.lang.ObjectThe styler is used to manage all things related to styling of the vast number of Chart components
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classStyler.ChartButtonPositionstatic classStyler.ChartThemestatic classStyler.LegendLayoutstatic classStyler.LegendPositionstatic classStyler.ToolTipTypestatic classStyler.YAxisPosition
-
Constructor Summary
Constructors Constructor and Description Styler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.awt.ColorgetAnnotationLineColor()java.awt.BasicStrokegetAnnotationLineStroke()java.awt.FontgetAnnotationTextFont()java.awt.ColorgetAnnotationTextFontColor()java.awt.ColorgetAnnotationTextPanelBackgroundColor()java.awt.ColorgetAnnotationTextPanelBorderColor()java.awt.FontgetAnnotationTextPanelFont()java.awt.ColorgetAnnotationTextPanelFontColor()intgetAnnotationTextPanelPadding()booleangetAntiAlias()java.awt.FontgetBaseFont()java.awt.ColorgetChartBackgroundColor()java.awt.ColorgetChartButtonBackgroundColor()java.awt.ColorgetChartButtonBorderColor()java.awt.FontgetChartButtonFont()java.awt.ColorgetChartButtonFontColor()intgetChartButtonMargin()Styler.ChartButtonPositiongetChartButtonPosition()java.awt.ColorgetChartFontColor()intgetChartPadding()java.awt.ColorgetChartTitleBoxBackgroundColor()java.awt.ColorgetChartTitleBoxBorderColor()java.awt.FontgetChartTitleFont()intgetChartTitlePadding()java.lang.StringgetDecimalPattern()java.awt.ColorgetLegendBackgroundColor()java.awt.ColorgetLegendBorderColor()Set the chart legend border colorjava.awt.FontgetLegendFont()Styler.LegendLayoutgetLegendLayout()Set the legend layoutintgetLegendPadding()Styler.LegendPositiongetLegendPosition()intgetLegendSeriesLineLength()intgetMarkerSize()java.awt.ColorgetPlotBackgroundColor()java.awt.ColorgetPlotBorderColor()doublegetPlotContentSize()java.awt.Color[]getSeriesColors()java.awt.BasicStroke[]getSeriesLines()Marker[]getSeriesMarkers()booleangetShowWithinAreaPoint()ThemegetTheme()java.awt.ColorgetToolTipBackgroundColor()java.awt.ColorgetToolTipBorderColor()java.awt.FontgetToolTipFont()java.awt.ColorgetToolTipHighlightColor()Styler.ToolTipTypegetToolTipType()java.awt.ColorgetXAxisTitleColor()Styler.YAxisPositiongetYAxisGroupPosistion(int yAxisGroup)java.awt.ColorgetYAxisGroupTitleColor(int yAxisGroup)intgetYAxisLeftWidthHint()java.awt.ColorgetYAxisTitleColor()booleanisChartTitleBoxVisible()booleanisChartTitleVisible()booleanisLegendVisible()booleanisPlotBorderVisible()booleanisToolTipsAlwaysVisible()booleanisToolTipsEnabled()StylersetAnnotationLineColor(java.awt.Color annotationLineColor)StylersetAnnotationLineStroke(java.awt.BasicStroke annotationLineStroke)StylersetAnnotationTextFont(java.awt.Font annotationTextFont)StylersetAnnotationTextFontColor(java.awt.Color annotationTextFontColor)StylersetAnnotationTextPanelBackgroundColor(java.awt.Color color)StylersetAnnotationTextPanelBorderColor(java.awt.Color borderColor)StylersetAnnotationTextPanelFont(java.awt.Font font)StylersetAnnotationTextPanelFontColor(java.awt.Color annotationTextPanelFontColor)StylersetAnnotationTextPanelPadding(int annotationTextPanelPadding)StylersetAntiAlias(boolean newVal)StylersetBaseFont(java.awt.Font baseFont)Set the base fontStylersetChartBackgroundColor(java.awt.Color color)Set the chart background color - the part around the edge of the chartStylersetChartButtonBackgroundColor(java.awt.Color chartButtonBackgroundColor)StylersetChartButtonBorderColor(java.awt.Color chartButtonBorderColor)StylersetChartButtonFont(java.awt.Font chartButtonFont)StylersetChartButtonFontColor(java.awt.Color chartButtonFontColor)StylersetChartButtonMargin(int chartButtonMargin)StylersetChartButtonPosition(Styler.ChartButtonPosition chartButtonPosition)StylersetChartFontColor(java.awt.Color color)Set the chart font color.StylersetChartPadding(int chartPadding)Set the chart paddingStylersetChartTitleBoxBackgroundColor(java.awt.Color chartTitleBoxBackgroundColor)set the chart title box background colorStylersetChartTitleBoxBorderColor(java.awt.Color chartTitleBoxBorderColor)set the chart title box border colorStylersetChartTitleBoxVisible(boolean isChartTitleBoxVisible)Set the chart title box visibilityStylersetChartTitleFont(java.awt.Font chartTitleFont)Set the chart title fontStylersetChartTitlePadding(int chartTitlePadding)set the chart title padding; the space between the chart title and the plot areaStylersetChartTitleVisible(boolean isChartTitleVisible)Set the chart title visibilityStylersetDecimalPattern(java.lang.String decimalPattern)Set the decimal formatter for all numbers on the chartStylersetLegendBackgroundColor(java.awt.Color color)Set the chart legend background colorStylersetLegendBorderColor(java.awt.Color legendBorderColor)StylersetLegendFont(java.awt.Font font)Set the chart legend fontStylersetLegendLayout(Styler.LegendLayout legendLayout)StylersetLegendPadding(int legendPadding)Set the chart legend paddingStylersetLegendPosition(Styler.LegendPosition legendPosition)sets the legend positionStylersetLegendSeriesLineLength(int legendSeriesLineLength)Set the chart legend series line lengthStylersetLegendVisible(boolean isLegendVisible)Set the chart legend visibilityStylersetMarkerSize(int markerSize)Sets the size of the markers (in pixels)StylersetPlotBackgroundColor(java.awt.Color plotBackgroundColor)set the plot area's background colorStylersetPlotBorderColor(java.awt.Color plotBorderColor)set the plot area's border colorStylersetPlotBorderVisible(boolean isPlotBorderVisible)sets the visibility of the border around the plot areaStylersetPlotContentSize(double plotContentSize)Sets the content size of the plot inside the plot area of the chart.StylersetSeriesColors(java.awt.Color[] seriesColors)StylersetSeriesLines(java.awt.BasicStroke[] seriesLines)StylersetSeriesMarkers(Marker[] seriesMarkers)StylersetShowWithinAreaPoint(boolean showWithinAreaPoint)StylersetToolTipBackgroundColor(java.awt.Color toolTipBackgroundColor)StylersetToolTipBorderColor(java.awt.Color toolTipBorderColor)StylersetToolTipFont(java.awt.Font toolTipFont)StylersetToolTipHighlightColor(java.awt.Color toolTipHighlightColor)StylersetToolTipsAlwaysVisible(boolean toolTipsAlwaysVisible)StylersetToolTipsEnabled(boolean toolTipsEnabled)StylersetToolTipType(Styler.ToolTipType toolTipType)StylersetXAxisTitleColor(java.awt.Color xAxisTitleColor)StylersetYAxisGroupPosition(int yAxisGroup, Styler.YAxisPosition yAxisPosition)Set the Y-Axis group position.StylersetYAxisGroupTitleColor(int yAxisGroup, java.awt.Color yAxisColor)StylersetYAxisLeftWidthHint(int yAxisLeftWidthHint)Set the width of the Y-Axis tick labels on the left side of the chart.StylersetYAxisTitleColor(java.awt.Color yAxisColor)
-
-
-
Method Detail
-
getBaseFont
public java.awt.Font getBaseFont()
-
setBaseFont
public Styler setBaseFont(java.awt.Font baseFont)
Set the base font- Parameters:
baseFont-- Returns:
- styler
-
getChartBackgroundColor
public java.awt.Color getChartBackgroundColor()
-
setChartBackgroundColor
public Styler setChartBackgroundColor(java.awt.Color color)
Set the chart background color - the part around the edge of the chart- Parameters:
color-
-
getChartFontColor
public java.awt.Color getChartFontColor()
-
setChartFontColor
public Styler setChartFontColor(java.awt.Color color)
Set the chart font color. includes: Chart title, axes label, legend- Parameters:
color-
-
getChartPadding
public int getChartPadding()
-
setChartPadding
public Styler setChartPadding(int chartPadding)
Set the chart padding- Parameters:
chartPadding-
-
getSeriesColors
public java.awt.Color[] getSeriesColors()
-
setSeriesColors
public Styler setSeriesColors(java.awt.Color[] seriesColors)
-
getSeriesLines
public java.awt.BasicStroke[] getSeriesLines()
-
setSeriesLines
public Styler setSeriesLines(java.awt.BasicStroke[] seriesLines)
-
getSeriesMarkers
public Marker[] getSeriesMarkers()
-
getChartTitleFont
public java.awt.Font getChartTitleFont()
-
setChartTitleFont
public Styler setChartTitleFont(java.awt.Font chartTitleFont)
Set the chart title font- Parameters:
chartTitleFont-- Returns:
-
isChartTitleVisible
public boolean isChartTitleVisible()
-
setChartTitleVisible
public Styler setChartTitleVisible(boolean isChartTitleVisible)
Set the chart title visibility- Parameters:
isChartTitleVisible-
-
isChartTitleBoxVisible
public boolean isChartTitleBoxVisible()
-
setChartTitleBoxVisible
public Styler setChartTitleBoxVisible(boolean isChartTitleBoxVisible)
Set the chart title box visibility- Parameters:
isChartTitleBoxVisible-
-
getChartTitleBoxBackgroundColor
public java.awt.Color getChartTitleBoxBackgroundColor()
-
setChartTitleBoxBackgroundColor
public Styler setChartTitleBoxBackgroundColor(java.awt.Color chartTitleBoxBackgroundColor)
set the chart title box background color- Parameters:
chartTitleBoxBackgroundColor-
-
getChartTitleBoxBorderColor
public java.awt.Color getChartTitleBoxBorderColor()
-
setChartTitleBoxBorderColor
public Styler setChartTitleBoxBorderColor(java.awt.Color chartTitleBoxBorderColor)
set the chart title box border color- Parameters:
chartTitleBoxBorderColor-
-
getChartTitlePadding
public int getChartTitlePadding()
-
setChartTitlePadding
public Styler setChartTitlePadding(int chartTitlePadding)
set the chart title padding; the space between the chart title and the plot area- Parameters:
chartTitlePadding-
-
isLegendVisible
public boolean isLegendVisible()
-
setLegendVisible
public Styler setLegendVisible(boolean isLegendVisible)
Set the chart legend visibility- Parameters:
isLegendVisible-
-
getLegendBackgroundColor
public java.awt.Color getLegendBackgroundColor()
-
setLegendBackgroundColor
public Styler setLegendBackgroundColor(java.awt.Color color)
Set the chart legend background color- Parameters:
color-
-
getLegendBorderColor
public java.awt.Color getLegendBorderColor()
Set the chart legend border color- Returns:
-
setLegendBorderColor
public Styler setLegendBorderColor(java.awt.Color legendBorderColor)
-
getLegendFont
public java.awt.Font getLegendFont()
-
setLegendFont
public Styler setLegendFont(java.awt.Font font)
Set the chart legend font- Parameters:
font-
-
getLegendPadding
public int getLegendPadding()
-
setLegendPadding
public Styler setLegendPadding(int legendPadding)
Set the chart legend padding- Parameters:
legendPadding-
-
getLegendSeriesLineLength
public int getLegendSeriesLineLength()
-
setLegendSeriesLineLength
public Styler setLegendSeriesLineLength(int legendSeriesLineLength)
Set the chart legend series line length- Parameters:
legendSeriesLineLength-- Returns:
-
getLegendPosition
public Styler.LegendPosition getLegendPosition()
-
setLegendPosition
public Styler setLegendPosition(Styler.LegendPosition legendPosition)
sets the legend position- Parameters:
legendPosition-
-
getLegendLayout
public Styler.LegendLayout getLegendLayout()
Set the legend layout- Returns:
-
setLegendLayout
public Styler setLegendLayout(Styler.LegendLayout legendLayout)
-
getPlotBackgroundColor
public java.awt.Color getPlotBackgroundColor()
-
setPlotBackgroundColor
public Styler setPlotBackgroundColor(java.awt.Color plotBackgroundColor)
set the plot area's background color- Parameters:
plotBackgroundColor-
-
getPlotBorderColor
public java.awt.Color getPlotBorderColor()
-
setPlotBorderColor
public Styler setPlotBorderColor(java.awt.Color plotBorderColor)
set the plot area's border color- Parameters:
plotBorderColor-
-
isPlotBorderVisible
public boolean isPlotBorderVisible()
-
setPlotBorderVisible
public Styler setPlotBorderVisible(boolean isPlotBorderVisible)
sets the visibility of the border around the plot area- Parameters:
isPlotBorderVisible-
-
getPlotContentSize
public double getPlotContentSize()
-
setPlotContentSize
public Styler setPlotContentSize(double plotContentSize)
Sets the content size of the plot inside the plot area of the chart. To fill the area 100%, use a value of 1.0.- Parameters:
plotContentSize- - Valid range is between 0 and 1.
-
getAnnotationTextPanelBackgroundColor
public java.awt.Color getAnnotationTextPanelBackgroundColor()
-
setAnnotationTextPanelBackgroundColor
public Styler setAnnotationTextPanelBackgroundColor(java.awt.Color color)
-
getAnnotationTextPanelBorderColor
public java.awt.Color getAnnotationTextPanelBorderColor()
-
setAnnotationTextPanelBorderColor
public Styler setAnnotationTextPanelBorderColor(java.awt.Color borderColor)
-
getAnnotationTextPanelFont
public java.awt.Font getAnnotationTextPanelFont()
-
setAnnotationTextPanelFont
public Styler setAnnotationTextPanelFont(java.awt.Font font)
-
getAnnotationTextPanelFontColor
public java.awt.Color getAnnotationTextPanelFontColor()
-
setAnnotationTextPanelFontColor
public Styler setAnnotationTextPanelFontColor(java.awt.Color annotationTextPanelFontColor)
-
getAnnotationTextPanelPadding
public int getAnnotationTextPanelPadding()
-
setAnnotationTextPanelPadding
public Styler setAnnotationTextPanelPadding(int annotationTextPanelPadding)
-
getAnnotationTextFont
public java.awt.Font getAnnotationTextFont()
-
setAnnotationTextFont
public Styler setAnnotationTextFont(java.awt.Font annotationTextFont)
-
getAnnotationTextFontColor
public java.awt.Color getAnnotationTextFontColor()
-
setAnnotationTextFontColor
public Styler setAnnotationTextFontColor(java.awt.Color annotationTextFontColor)
-
getAnnotationLineStroke
public java.awt.BasicStroke getAnnotationLineStroke()
-
setAnnotationLineStroke
public Styler setAnnotationLineStroke(java.awt.BasicStroke annotationLineStroke)
-
getAnnotationLineColor
public java.awt.Color getAnnotationLineColor()
-
setAnnotationLineColor
public Styler setAnnotationLineColor(java.awt.Color annotationLineColor)
-
getChartButtonBackgroundColor
public java.awt.Color getChartButtonBackgroundColor()
-
setChartButtonBackgroundColor
public Styler setChartButtonBackgroundColor(java.awt.Color chartButtonBackgroundColor)
-
getChartButtonBorderColor
public java.awt.Color getChartButtonBorderColor()
-
setChartButtonBorderColor
public Styler setChartButtonBorderColor(java.awt.Color chartButtonBorderColor)
-
getChartButtonFontColor
public java.awt.Color getChartButtonFontColor()
-
setChartButtonFontColor
public Styler setChartButtonFontColor(java.awt.Color chartButtonFontColor)
-
getChartButtonFont
public java.awt.Font getChartButtonFont()
-
setChartButtonFont
public Styler setChartButtonFont(java.awt.Font chartButtonFont)
-
getChartButtonMargin
public int getChartButtonMargin()
-
setChartButtonMargin
public Styler setChartButtonMargin(int chartButtonMargin)
-
getChartButtonPosition
public Styler.ChartButtonPosition getChartButtonPosition()
-
setChartButtonPosition
public Styler setChartButtonPosition(Styler.ChartButtonPosition chartButtonPosition)
-
isToolTipsEnabled
public boolean isToolTipsEnabled()
-
setToolTipsEnabled
public Styler setToolTipsEnabled(boolean toolTipsEnabled)
-
isToolTipsAlwaysVisible
public boolean isToolTipsAlwaysVisible()
-
setToolTipsAlwaysVisible
public Styler setToolTipsAlwaysVisible(boolean toolTipsAlwaysVisible)
-
getToolTipType
public Styler.ToolTipType getToolTipType()
-
setToolTipType
public Styler setToolTipType(Styler.ToolTipType toolTipType)
-
getToolTipBackgroundColor
public java.awt.Color getToolTipBackgroundColor()
-
setToolTipBackgroundColor
public Styler setToolTipBackgroundColor(java.awt.Color toolTipBackgroundColor)
-
getToolTipBorderColor
public java.awt.Color getToolTipBorderColor()
-
setToolTipBorderColor
public Styler setToolTipBorderColor(java.awt.Color toolTipBorderColor)
-
getToolTipFont
public java.awt.Font getToolTipFont()
-
setToolTipFont
public Styler setToolTipFont(java.awt.Font toolTipFont)
-
getToolTipHighlightColor
public java.awt.Color getToolTipHighlightColor()
-
setToolTipHighlightColor
public Styler setToolTipHighlightColor(java.awt.Color toolTipHighlightColor)
-
getDecimalPattern
public java.lang.String getDecimalPattern()
-
setDecimalPattern
public Styler setDecimalPattern(java.lang.String decimalPattern)
Set the decimal formatter for all numbers on the chart- Parameters:
decimalPattern- - the pattern describing the decimal format
-
getYAxisGroupPosistion
public Styler.YAxisPosition getYAxisGroupPosistion(int yAxisGroup)
-
setYAxisGroupPosition
public Styler setYAxisGroupPosition(int yAxisGroup, Styler.YAxisPosition yAxisPosition)
Set the Y-Axis group position.- Parameters:
yAxisGroup-yAxisPosition-
-
getAntiAlias
public boolean getAntiAlias()
-
setAntiAlias
public Styler setAntiAlias(boolean newVal)
-
getYAxisLeftWidthHint
public int getYAxisLeftWidthHint()
-
setYAxisLeftWidthHint
public Styler setYAxisLeftWidthHint(int yAxisLeftWidthHint)
Set the width of the Y-Axis tick labels on the left side of the chart. This can help to align the start of the X-Axis for two or more charts that are arranged in a column of charts.- Parameters:
yAxisLeftWidthHint-
-
setShowWithinAreaPoint
public Styler setShowWithinAreaPoint(boolean showWithinAreaPoint)
-
getShowWithinAreaPoint
public boolean getShowWithinAreaPoint()
-
getXAxisTitleColor
public java.awt.Color getXAxisTitleColor()
-
setXAxisTitleColor
public Styler setXAxisTitleColor(java.awt.Color xAxisTitleColor)
-
getYAxisTitleColor
public java.awt.Color getYAxisTitleColor()
-
setYAxisTitleColor
public Styler setYAxisTitleColor(java.awt.Color yAxisColor)
-
getYAxisGroupTitleColor
public java.awt.Color getYAxisGroupTitleColor(int yAxisGroup)
-
setYAxisGroupTitleColor
public Styler setYAxisGroupTitleColor(int yAxisGroup, java.awt.Color yAxisColor)
-
getMarkerSize
public int getMarkerSize()
-
setMarkerSize
public Styler setMarkerSize(int markerSize)
Sets the size of the markers (in pixels)- Parameters:
markerSize-
-
getTheme
public Theme getTheme()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG