Class AbstractChartStyle

java.lang.Object
net.simplace.core.ui.jfreechart.AbstractChartStyle
All Implemented Interfaces:
ChartStyle
Direct Known Subclasses:
BasicChartStyle, DefaultSimChartStyle, XMLChartStyle

public abstract class AbstractChartStyle extends Object implements ChartStyle
This class provides an abstract implementation for chart styles. It implements the variables and methods for maintaining the type, the title(s) and flags of the ChartStyle interface.
Version:
1.0
Author:
Martin Schmitz
  • Field Details

    • iType

      protected ChartStyle.ChartType iType
      Stores the chart type.
      See Also:
      • ChartStyle#ChartType
    • iTitle

      protected String iTitle
      Stores the chart title.
    • iXAxisTitle

      protected String iXAxisTitle
      Stores the title of the charts X-Axis.
    • iYAxisTitle

      protected String iYAxisTitle
      Stores the title of the charts Y-Axis.
    • iLegend

      protected boolean iLegend
      Stores whether a legend is generated for the chart (Default: true).
    • iTooltips

      protected boolean iTooltips
      Stores whether tool tips are generated for the chart data (Default: true).
    • iURLs

      protected boolean iURLs
      Stores whether URLs are generated for the chart (Default: true).
    • iObservable

      protected FWObservable iObservable
      Instance of the used Observable.
  • Constructor Details

    • AbstractChartStyle

      public AbstractChartStyle()
      Creates a line style with default values.
    • AbstractChartStyle

      public AbstractChartStyle(ChartStyle.ChartType aType)
      Creates a style with default values.
      Parameters:
      aType - style type
    • AbstractChartStyle

      public AbstractChartStyle(ChartStyle.ChartType aType, String aTitle, String aXTitle, String aYTitle, boolean aLegend, boolean aTooltips, boolean aURLs)
      Creates a style.
      Parameters:
      aType - style type
      aTitle - title for the chart
      aXTitle - title for the chart's X-axis
      aYTitle - title for the chart's Y-axis
      aLegend - flag whether a legend is generated
      aTooltips - flag whether toolstips are generated
      aURLs - flag whether URLs are generated
  • Method Details

    • getType

      public ChartStyle.ChartType getType()
      Description copied from interface: ChartStyle
      Returns the type of the chart style.
      Specified by:
      getType in interface ChartStyle
      Returns:
      the type of the chart style.
    • setType

      public void setType(ChartStyle.ChartType aType)
      Sets the type of the chart style.
      Parameters:
      aType - the chart type
    • getTitle

      public String getTitle()
      Returns the title for the chart.
      Specified by:
      getTitle in interface ChartStyle
      Returns:
      empty string if no title is set
    • setTitle

      public void setTitle(String aTitle)
      Sets the title for the chart.
      Specified by:
      setTitle in interface ChartStyle
      Parameters:
      aTitle - the new chart's title
    • getXAxisTitle

      public String getXAxisTitle()
      Returns the title for the chart's x-axis.
      Specified by:
      getXAxisTitle in interface ChartStyle
      Returns:
      empty string if no title is set
    • setXAxisTitle

      public void setXAxisTitle(String aTitle)
      Sets the title for the chart's X-axis.
      Parameters:
      aTitle - the new X-axis title
    • getYAxisTitle

      public String getYAxisTitle()
      Returns the title for the chart's y-axis.
      Specified by:
      getYAxisTitle in interface ChartStyle
      Returns:
      empty string if no title is set
    • setYAxisTitle

      public void setYAxisTitle(String aTitle)
      Sets the title for the chart's Y-axis.
      Parameters:
      aTitle - the new Y-axis title
    • hasLegend

      public boolean hasLegend()
      Returns whether the chart is configured to generate a legend.
      Specified by:
      hasLegend in interface ChartStyle
      Returns:
      Returns whether the chart is configured to generate a legend.
    • setLegend

      public void setLegend(boolean aLegend)
      Sets whether the chart is configured to generate a legend.
      Parameters:
      aLegend -
    • hasTooltips

      public boolean hasTooltips()
      Returns whether the chart is configured to generate tooltips for the data.
      Specified by:
      hasTooltips in interface ChartStyle
      Returns:
      Returns whether the chart is configured to generate tooltips for the data.
    • setTooltips

      public void setTooltips(boolean aTooltips)
      Sets whether the chart is configured to generate tooltips for the data.
      Parameters:
      aTooltips -
    • hasURLs

      public boolean hasURLs()
      Returns whether the chart is configured to generate URLs.
      Specified by:
      hasURLs in interface ChartStyle
      Returns:
      Returns whether the chart is configured to generate URLs.
    • setURLs

      public void setURLs(boolean aURLs)
      Sets whether the chart is configured to generate URLs.
      Parameters:
      aURLs -
    • setObservable

      public void setObservable(FWObservable aObservable)
      Specified by:
      setObservable in interface ChartStyle