com.odesys.chart
Class DefaultSeries

java.lang.Object
  |
  +--com.odesys.chart.DefaultSeries
All Implemented Interfaces:
Series
Direct Known Subclasses:
DefaultLine

public class DefaultSeries
extends java.lang.Object
implements Series

This class is a default implementation of the Series interface. DefaultSeries depends on methods of the DefaultChartModel rather than the generic ChartModel.


Constructor Summary
DefaultSeries(DefaultChartModel model)
          Creates a new DefaultSeries instance for the specified DefaultChartModel
 
Method Summary
 ChartElement addElement()
          Adds a new ChartElement to this DefaultSeries.
 java.util.Enumeration elements()
          Returns an Enumeration of the ChartElements in this DefaultSeries
 java.awt.Color getColor()
          Gets the color of this DefaultSeries
 ChartElement getElementAt(int index)
          Returns the ChartElement at the specified index in this DefaultSeries.
 java.lang.String getLabel()
          Gets the label of this DefaultSeries
 ChartModel getModel()
          Gets the ChartModel this DefaultSeries belongs to
 int getSize()
          Returns the number of ChartElements in this DefaultSeries
 ChartElement insertElementAt(int index)
          Inserts a new ChartElement to this DefaultSeries at the specified index.
 void removeElementAt(int index)
          Removes the ChartElement at the specified index
 void setColor(java.awt.Color color)
          Sets the color of this DefaultSeries
 void setLabel(java.lang.String label)
          Sets the label of this DefaultSeries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSeries

public DefaultSeries(DefaultChartModel model)
Creates a new DefaultSeries instance for the specified DefaultChartModel
Method Detail

setColor

public void setColor(java.awt.Color color)
Sets the color of this DefaultSeries
Specified by:
setColor in interface Series

getColor

public java.awt.Color getColor()
Gets the color of this DefaultSeries
Specified by:
getColor in interface Series

setLabel

public void setLabel(java.lang.String label)
Sets the label of this DefaultSeries
Specified by:
setLabel in interface Series

getLabel

public java.lang.String getLabel()
Gets the label of this DefaultSeries
Specified by:
getLabel in interface Series

getModel

public ChartModel getModel()
Gets the ChartModel this DefaultSeries belongs to
Specified by:
getModel in interface Series

getSize

public int getSize()
Returns the number of ChartElements in this DefaultSeries
Specified by:
getSize in interface Series

elements

public java.util.Enumeration elements()
Returns an Enumeration of the ChartElements in this DefaultSeries
Specified by:
elements in interface Series

addElement

public ChartElement addElement()
Adds a new ChartElement to this DefaultSeries.
Returns:
The new ChartElement

insertElementAt

public ChartElement insertElementAt(int index)
Inserts a new ChartElement to this DefaultSeries at the specified index.
Returns:
The new ChartElement

getElementAt

public ChartElement getElementAt(int index)
Returns the ChartElement at the specified index in this DefaultSeries.
Returns:
The ChartElement at the specified index

removeElementAt

public void removeElementAt(int index)
Removes the ChartElement at the specified index