Class ThemeImpl

java.lang.Object
com.illumon.iris.db.plot.themes.ThemeImpl
All Implemented Interfaces:
Theme, Serializable, Cloneable

public class ThemeImpl extends Object implements Theme
The theme of a chart. Sets the default colors and fonts of various parts of a chart, such as axes, gridlines, and background colors, axes and figure title fonts.
See Also:
  • Constructor Details

    • ThemeImpl

      public ThemeImpl()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Theme
      Gets the name of this theme.
      Specified by:
      getName in interface Theme
      Returns:
      name of this theme
    • getFigureTitleFont

      public Font getFigureTitleFont()
      Description copied from interface: Theme
      Gets the font used for the Figure's title.
      Specified by:
      getFigureTitleFont in interface Theme
      Returns:
      Figure's title font
    • getFigureTitleColor

      public Paint getFigureTitleColor()
      Description copied from interface: Theme
      Gets the color used for the title of the Figure.
      Specified by:
      getFigureTitleColor in interface Theme
      Returns:
      color of the Figure's title
    • getChartTitleFont

      public Font getChartTitleFont()
      Description copied from interface: Theme
      Gets the font used for the Chart's title.
      Specified by:
      getChartTitleFont in interface Theme
      Returns:
      Chart's title font
    • getChartBackgroundColor

      public Paint getChartBackgroundColor()
      Description copied from interface: Theme
      Gets the color used for the background of the Chart.
      Specified by:
      getChartBackgroundColor in interface Theme
      Returns:
      background color of the Chart
    • getLegendFont

      public Font getLegendFont()
      Description copied from interface: Theme
      Gets the font used for the Chart's legend.
      Specified by:
      getLegendFont in interface Theme
      Returns:
      legend's font
    • getLegendTextColor

      public Paint getLegendTextColor()
      Description copied from interface: Theme
      Gets the color used for the legend's font.
      Specified by:
      getLegendTextColor in interface Theme
      Returns:
      color of the legend's font
    • getPointLabelFont

      public Font getPointLabelFont()
      Description copied from interface: Theme
      Gets the font used for point labels.
      Specified by:
      getPointLabelFont in interface Theme
      Returns:
      font used for point labels.
    • getPointLabelColor

      public Paint getPointLabelColor()
      Description copied from interface: Theme
      Gets the color used for point labels.
      Specified by:
      getPointLabelColor in interface Theme
      Returns:
      color used for point labels.
    • getAxisColor

      public Paint getAxisColor()
      Description copied from interface: Theme
      Gets the color of the Axes.
      Specified by:
      getAxisColor in interface Theme
      Returns:
      color of the Axes
    • getAxisTitleFont

      public Font getAxisTitleFont()
      Description copied from interface: Theme
      Gets the font used for the Axis's title.
      Specified by:
      getAxisTitleFont in interface Theme
      Returns:
      Axis's title's font
    • getAxisTicksFont

      public Font getAxisTicksFont()
      Description copied from interface: Theme
      Gets the font used for the Axis's title.
      Specified by:
      getAxisTicksFont in interface Theme
      Returns:
      Axis's title's font
    • getSeriesColor

      public Paint getSeriesColor(int i)
      Description copied from interface: Theme
      Gets the color of the i-th series in the Chart
      Specified by:
      getSeriesColor in interface Theme
      Parameters:
      i - color index
      Returns:
      i-th color of the Chart's ColorPalette
    • getFigureTextColor

      public Paint getFigureTextColor()
      Description copied from interface: Theme
      Gets the Paint of the figure's text.
      Specified by:
      getFigureTextColor in interface Theme
      Returns:
      Paint of the figure's text
    • getFigureTextFont

      public Font getFigureTextFont()
      Description copied from interface: Theme
      Gets the Font of the figure's text.
      Specified by:
      getFigureTextFont in interface Theme
      Returns:
      Font of the figure's text
    • getChartTitleColor

      public Paint getChartTitleColor()
      Description copied from interface: Theme
      Gets the Paint used for the title of each Chart.
      Specified by:
      getChartTitleColor in interface Theme
      Returns:
      Paint used for the title of each Chart
    • getGridLineColor

      public Paint getGridLineColor()
      Description copied from interface: Theme
      Gets the Paint used for the background grid lines in each Chart.
      Specified by:
      getGridLineColor in interface Theme
      Returns:
      Paint of each Chart's text
    • getDisplayXGridLines

      public boolean getDisplayXGridLines()
      Specified by:
      getDisplayXGridLines in interface Theme
      Returns:
      whether to draw the grid lines in the x direction
    • getDisplayYGridLines

      public boolean getDisplayYGridLines()
      Specified by:
      getDisplayYGridLines in interface Theme
      Returns:
      whether to draw the grid lines in the y direction
    • getAxisTitleColor

      public Paint getAxisTitleColor()
      Description copied from interface: Theme
      Gets the Paint used for the color of each Axis.
      Specified by:
      getAxisTitleColor in interface Theme
      Returns:
      Paint used for the color of each Axis
    • getAxisTickLabelColor

      public Paint getAxisTickLabelColor()
      Description copied from interface: Theme
      Gets the Paint used for the color of each tick label.
      Specified by:
      getAxisTickLabelColor in interface Theme
      Returns:
      Paint used for the color of each tick label
    • getSeriesColorPalette

      public ColorPalette getSeriesColorPalette()
      Description copied from interface: Theme
      Gets the ColorPalette used for each Chart.
      Specified by:
      getSeriesColorPalette in interface Theme
      Returns:
      ColorPalette used for each Chart
    • copy

      public ThemeImpl copy()
      Description copied from interface: Theme
      Deep copy of this theme.
      Specified by:
      copy in interface Theme
      Returns:
      a deep copy of this theme
    • name

      public ThemeImpl name(String name)
      Description copied from interface: Theme
      Sets the name of the Theme
      Specified by:
      name in interface Theme
      Parameters:
      name - case insensitive
      Returns:
      this Theme
    • figureTextFont

      public ThemeImpl figureTextFont(Font font)
      Description copied from interface: Theme
      Defines the default Font of the Figure's text. If no Font is set for one of the Theme's properties, this font is used.
      Specified by:
      figureTextFont in interface Theme
      Parameters:
      font - font
      Returns:
      this Theme
    • figureTextFont

      public ThemeImpl figureTextFont(String family, String style, int size)
      Description copied from interface: Theme
      Defines the default Font of the Figure's text. If no Font is set for one of the Theme's properties, this font is used.
      Specified by:
      figureTextFont in interface Theme
      Parameters:
      family - family; if null, set to Arial
      style - style; if null, set to Font.FontStyle PLAIN
      size - the point size of the Font
      Returns:
      this Theme
    • figureTextColor

      public ThemeImpl figureTextColor(Paint color)
      Description copied from interface: Theme
      Defines the color of the default Font of the Figure's text. If no Color is set for one of the Theme's properties, this color is used.
      Specified by:
      figureTextColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • figureTextColor

      public ThemeImpl figureTextColor(String color)
      Description copied from interface: Theme
      Defines the color of the default Font of the Figure's text. If no Color is set for one of the Theme's properties, this color is used.
      Specified by:
      figureTextColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • figureTitleFont

      public ThemeImpl figureTitleFont(Font font)
      Description copied from interface: Theme
      Sets the Font of the Figure's title.
      Specified by:
      figureTitleFont in interface Theme
      Parameters:
      font - font
      Returns:
      this Theme
    • figureTitleFont

      public ThemeImpl figureTitleFont(String family, String style, int size)
      Description copied from interface: Theme
      Sets the Font of the Figure's title.
      Specified by:
      figureTitleFont in interface Theme
      Parameters:
      family - font family; if null, set to Arial
      style - font style; if null, set to Font.FontStyle PLAIN
      size - the point size of the Font
      Returns:
      this Theme
    • figureTitleColor

      public ThemeImpl figureTitleColor(Paint color)
      Description copied from interface: Theme
      Sets the color of the Figure's title.
      Specified by:
      figureTitleColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • figureTitleColor

      public ThemeImpl figureTitleColor(String color)
      Description copied from interface: Theme
      Sets the color of the default Font of the Figure's text. If no Color is set for one of the Theme's properties, this color is used.
      Specified by:
      figureTitleColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • chartTitleFont

      public ThemeImpl chartTitleFont(Font font)
      Description copied from interface: Theme
      Sets the Font of the Chart's title.
      Specified by:
      chartTitleFont in interface Theme
      Parameters:
      font - font
      Returns:
      this Theme
    • chartTitleFont

      public ThemeImpl chartTitleFont(String family, String style, int size)
      Description copied from interface: Theme
      Sets the Font of the Chart's title.
      Specified by:
      chartTitleFont in interface Theme
      Parameters:
      family - font family; if null, set to Arial
      style - font style; if null, set to Font.FontStyle PLAIN
      size - the point size of the Font
      Returns:
      this Theme
    • chartTitleColor

      public ThemeImpl chartTitleColor(Paint color)
      Description copied from interface: Theme
      Sets the color of the Chart's title.
      Specified by:
      chartTitleColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • chartTitleColor

      public ThemeImpl chartTitleColor(String color)
      Description copied from interface: Theme
      Sets the color of the Chart's title.
      Specified by:
      chartTitleColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • chartBackgroundColor

      public ThemeImpl chartBackgroundColor(Paint color)
      Description copied from interface: Theme
      Sets the color of the Chart's background.
      Specified by:
      chartBackgroundColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • chartBackgroundColor

      public ThemeImpl chartBackgroundColor(String color)
      Description copied from interface: Theme
      Sets the color of the Chart's background.
      Specified by:
      chartBackgroundColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • gridLineColor

      public ThemeImpl gridLineColor(Paint color)
      Description copied from interface: Theme
      Sets the color of the Chart's grid lines.
      Specified by:
      gridLineColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • gridLineColor

      public ThemeImpl gridLineColor(String color)
      Description copied from interface: Theme
      Sets the color of the Chart's grid lines.
      Specified by:
      gridLineColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • gridLinesVisible

      public ThemeImpl gridLinesVisible(String visible)
      Specified by:
      gridLinesVisible in interface Theme
      Parameters:
      visible - whether grid lines will be drawn
      Returns:
      this Theme
    • gridLinesVisible

      public ThemeImpl gridLinesVisible(boolean visible)
      Specified by:
      gridLinesVisible in interface Theme
      Parameters:
      visible - whether grid lines will be drawn
      Returns:
      this Theme
    • xGridLinesVisible

      public ThemeImpl xGridLinesVisible(String visible)
      Specified by:
      xGridLinesVisible in interface Theme
      Parameters:
      visible - whether grid lines in the x direction will be drawn
      Returns:
      this Theme
    • xGridLinesVisible

      public ThemeImpl xGridLinesVisible(boolean visible)
      Specified by:
      xGridLinesVisible in interface Theme
      Parameters:
      visible - whether grid lines in the x direction will be drawn
      Returns:
      this Theme
    • yGridLinesVisible

      public ThemeImpl yGridLinesVisible(String visible)
      Specified by:
      yGridLinesVisible in interface Theme
      Parameters:
      visible - whether grid lines in the y direction will be drawn
      Returns:
      this Theme
    • yGridLinesVisible

      public ThemeImpl yGridLinesVisible(boolean visible)
      Specified by:
      yGridLinesVisible in interface Theme
      Parameters:
      visible - whether grid lines in the y direction will be drawn
      Returns:
      this Theme
    • axisColor

      public ThemeImpl axisColor(Paint color)
      Description copied from interface: Theme
      Sets the Axis's color.
      Specified by:
      axisColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • axisColor

      public ThemeImpl axisColor(String color)
      Description copied from interface: Theme
      Sets the Axis's color.
      Specified by:
      axisColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • axisTitleFont

      public ThemeImpl axisTitleFont(Font font)
      Description copied from interface: Theme
      Sets the Font of the Axis's title.
      Specified by:
      axisTitleFont in interface Theme
      Parameters:
      font - font
      Returns:
      this Theme
    • axisTitleFont

      public ThemeImpl axisTitleFont(String family, String style, int size)
      Description copied from interface: Theme
      Sets the Font of the Axis's title.
      Specified by:
      axisTitleFont in interface Theme
      Parameters:
      family - font family; if null, set to Arial
      style - font style; if null, set to Font.FontStyle PLAIN
      size - the point size of the Font
      Returns:
      this Theme
    • axisTitleColor

      public ThemeImpl axisTitleColor(Paint color)
      Description copied from interface: Theme
      Sets the color of the Axis's title.
      Specified by:
      axisTitleColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • axisTitleColor

      public ThemeImpl axisTitleColor(String color)
      Description copied from interface: Theme
      Sets the color of the Axis's title.
      Specified by:
      axisTitleColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • axisTicksFont

      public ThemeImpl axisTicksFont(Font font)
      Description copied from interface: Theme
      Sets the Font of the Axis's tick labels.
      Specified by:
      axisTicksFont in interface Theme
      Parameters:
      font - font
      Returns:
      this Theme
    • axisTicksFont

      public ThemeImpl axisTicksFont(String family, String style, int size)
      Description copied from interface: Theme
      Sets the Font of the Axis's tick labels.
      Specified by:
      axisTicksFont in interface Theme
      Parameters:
      family - font family; if null, set to Arial
      style - font style; if null, set to Font.FontStyle PLAIN
      size - the point size of the Font
      Returns:
      this Theme
    • axisTickLabelColor

      public ThemeImpl axisTickLabelColor(Paint color)
      Description copied from interface: Theme
      Sets the color of the Axis's tick labels.
      Specified by:
      axisTickLabelColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • axisTickLabelColor

      public ThemeImpl axisTickLabelColor(String color)
      Description copied from interface: Theme
      Sets the color of the Axis's tick labels.
      Specified by:
      axisTickLabelColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • legendFont

      public ThemeImpl legendFont(Font font)
      Description copied from interface: Theme
      Sets the Font of the legend's text.
      Specified by:
      legendFont in interface Theme
      Parameters:
      font - font
      Returns:
      this Theme
    • legendFont

      public ThemeImpl legendFont(String family, String style, int size)
      Description copied from interface: Theme
      Sets the Font of the legend's text.
      Specified by:
      legendFont in interface Theme
      Parameters:
      family - font family; if null, set to Arial
      style - font style; if null, set to Font.FontStyle PLAIN
      size - the point size of the Font
      Returns:
      this Theme
    • legendTextColor

      public ThemeImpl legendTextColor(Paint color)
      Description copied from interface: Theme
      Sets the color of the legned's text.
      Specified by:
      legendTextColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • legendTextColor

      public ThemeImpl legendTextColor(String color)
      Description copied from interface: Theme
      Sets the color of the legend's text.
      Specified by:
      legendTextColor in interface Theme
      Parameters:
      color - color
      Returns:
      this Theme
    • pointLabelFont

      public ThemeImpl pointLabelFont(Font font)
      Description copied from interface: Theme
      Sets the font used for point labels.
      Specified by:
      pointLabelFont in interface Theme
      Parameters:
      font - font
      Returns:
      this Theme.
    • pointLabelFont

      public ThemeImpl pointLabelFont(String family, String style, int size)
      Description copied from interface: Theme
      Sets the font used for point labels.
      Specified by:
      pointLabelFont in interface Theme
      Parameters:
      family - font family; if null, set to Arial
      style - font style; if null, set to Font.FontStyle PLAIN
      size - the point size of the Font
      Returns:
      this Theme.
    • pointLabelColor

      public ThemeImpl pointLabelColor(Paint color)
      Description copied from interface: Theme
      Sets the color used for point labels.
      Specified by:
      pointLabelColor in interface Theme
      Parameters:
      color - point label color
      Returns:
      this Theme.
    • pointLabelColor

      public ThemeImpl pointLabelColor(String color)
      Description copied from interface: Theme
      Sets the color used for point labels.
      Specified by:
      pointLabelColor in interface Theme
      Parameters:
      color - point label color
      Returns:
      this Theme.
    • seriesColorGenerator

      public ThemeImpl seriesColorGenerator(ColorPalette seriesColorPalette)
      Description copied from interface: Theme
      Sets the ColorPalette of this Theme.
      Specified by:
      seriesColorGenerator in interface Theme
      Parameters:
      seriesColorPalette - color palette
      Returns:
      this Theme
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object