org.pentaho.chart.core
Class AxisSeriesLinkInfo

java.lang.Object
  extended by org.pentaho.chart.core.AxisSeriesLinkInfo

public class AxisSeriesLinkInfo
extends Object

This class stores the axis to series mapping in addition to storing the respective axis element. For eg: the data structure stores the axis element and series elements that refer to the axis element. This information can be retrieved using axis id. {axis-id1}{axisElement} = that stores the axis info {axis-id1}{seriesElements} = > the array list stores the series elements that refer axis-id1

Author:
Ravi Hasija

Constructor Summary
AxisSeriesLinkInfo()
          The constructor initializes requisiste data structures
 
Method Summary
 ChartElement getAxisElement(Object axisID)
          Returns chart axis element with the given axis id.
 ArrayList<ChartElement> getDomainAxisElements()
          Returns an array list of domain axis elements.
 ArrayList<ChartElement> getRangeAxisElements()
          Returns an array list of range axis elements.
 ArrayList<ChartElement> getSeriesElements(Object axisID)
          Returns the array list consisting of the series elements that belong to the given axis id.
 void setAxisElement(Object axisID, ChartElement axisElement)
          Stores the value: axis element in the hash map where the key is axis id.
 void setSeriesElements(Object axisID, ChartElement seriesElement)
          Updates the series elements array list with the given element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AxisSeriesLinkInfo

public AxisSeriesLinkInfo()
The constructor initializes requisiste data structures

Method Detail

setAxisElement

public void setAxisElement(Object axisID,
                           ChartElement axisElement)
Stores the value: axis element in the hash map where the key is axis id.

Parameters:
axisID - - Axis ID for the current axis element
axisElement - - Current axis element

getAxisElement

public ChartElement getAxisElement(Object axisID)
Returns chart axis element with the given axis id.

Parameters:
axisID - - AxisID for the element you want to retrieve.
Returns:
ChartElement - Chart axis element with the given axis id.

setSeriesElements

public void setSeriesElements(Object axisID,
                              ChartElement seriesElement)
Updates the series elements array list with the given element.

Parameters:
axisID - - Axis ID for the current axis element
seriesElement - - Series element that belongs to the given axis id

getSeriesElements

public ArrayList<ChartElement> getSeriesElements(Object axisID)
Returns the array list consisting of the series elements that belong to the given axis id.

Parameters:
axisID - - The axis id to get the series elements for.
Returns:
ArrayList - Returns the array list consisting of the series elements that belong to the given axis id.

getRangeAxisElements

public ArrayList<ChartElement> getRangeAxisElements()
Returns an array list of range axis elements. If there are no range axis elements then returns an empty list.

Returns:
ArrayList - ArrayList consisting of range axis elements.

getDomainAxisElements

public ArrayList<ChartElement> getDomainAxisElements()
Returns an array list of domain axis elements. If there are no domain axis elements then returns an empty list

Returns:
ArrayList - ArrayList consisting of domain axis elements.