Class SeriesAttributes

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
BoxPlotSeriesAttributes, BubbleChartSeriesAttributes, HistogramSeriesAttributes, PieChartSeriesAttributes, ScatterPlotSeriesAttributes, TimeSeriesAttributes

public abstract class SeriesAttributes extends LabelledList
The superclass for the series-attributes widgets used by subclasses of ChartGenerator to let the user control individual series' features. SeriesAttributes will be placed in the list at the bottom-left of the ChartGenerator window, and series will be assigned a unique SeriesAttributes to control it.

SeriesAttributes need to override the rebuildGraphicsDefinitions and buildAttributes methods.

See Also:
  • Field Details

    • I_DOWN

      public static final ImageIcon I_DOWN
    • I_DOWN_PRESSED

      public static final ImageIcon I_DOWN_PRESSED
    • I_CLOSE

      public static final ImageIcon I_CLOSE
    • I_CLOSE_PRESSED

      public static final ImageIcon I_CLOSE_PRESSED
    • I_UP

      public static final ImageIcon I_UP
    • I_UP_PRESSED

      public static final ImageIcon I_UP_PRESSED
  • Constructor Details

    • SeriesAttributes

      public SeriesAttributes(ChartGenerator generator, String name, int index, org.jfree.data.general.SeriesChangeListener stoppable)
      Builds a SeriesAttributes with the provided generator, name for the series, and index for the series. Calls buildAttributes to construct custom elements in the LabelledList, then finally calls rebuildGraphicsDefinitions() to update the series.
  • Method Details

    • getStoppable

      public org.jfree.data.general.SeriesChangeListener getStoppable()
    • setStoppable

      public void setStoppable(org.jfree.data.general.SeriesChangeListener obj)
    • setName

      public void setName(String val)
      Deprecated.
      Sets the name of the series.
      Overrides:
      setName in class Component
    • setSeriesName

      public void setSeriesName(String val)
    • getName

      public String getName()
      Deprecated.
      Returns the name of the series.
      Overrides:
      getName in class Component
    • getSeriesName

      public String getSeriesName()
    • rebuildGraphicsDefinitions

      public abstract void rebuildGraphicsDefinitions()
      Updates features of the series to reflect the current widget settings as specified by the user.
    • buildAttributes

      public abstract void buildAttributes()
      Constructs the widget by adding items to the LabelledList. Will be called in the middle of the SeriesAttributes constructor, and so certain instance variables may not yet have been initialized.
    • reviseColor

      public Color reviseColor(Color c, double opacity)
      Given an opaque color and a desired opacity (from 0.0 to 1.0), returns a new color of the same tint but with the given opacity.
    • getPlot

      public org.jfree.chart.plot.Plot getPlot()
      Returns the Chart's Plot.
    • getGenerator

      public ChartGenerator getGenerator()
      Returns the ChartGenerator holding the series this SeriesAttributes is responsible for.
    • getSeriesIndex

      public int getSeriesIndex()
      Returns the index of the series.
    • setSeriesIndex

      public void setSeriesIndex(int val)
      Sets the index of the series -- Do NOT call this if you want to move the series order; instead call moveSeries in the Generator.
    • setPlotVisible

      public void setPlotVisible(boolean val)
    • isPlotVisible

      public boolean isPlotVisible()