JComponentPack 1.5.0

com.zfqjava.swing
Class DefaultBasicChartModel

java.lang.Object
  extended by com.zfqjava.swing.AbstractBasicChartModel
      extended by com.zfqjava.swing.DefaultBasicChartModel
All Implemented Interfaces:
BasicChartModel

public class DefaultBasicChartModel
extends AbstractBasicChartModel

DefaultBasicChartModel provides a default implements of chart model.


Field Summary
 
Fields inherited from class com.zfqjava.swing.AbstractBasicChartModel
listenerList
 
Constructor Summary
DefaultBasicChartModel()
           
 
Method Summary
 void addCategory(String name, double[] values)
           
 void addCategory(String name, double[] values, int index)
           
 void addCategory(String name, Number[] values)
           
 void addCategory(String name, Number[] values, int index)
           
 void addSeries(String name, double[] values)
           
 void addSeries(String name, double[] values, int index)
           
 void addSeries(String name, Number[] values)
           
 void addSeries(String name, Number[] values, int index)
           
 int getCategoryCount()
          Returns the category count for this model.
 String getCategoryName(int categoryIndex)
          Returns the category name of the specified index.
 int getSeriesCount()
          Returns the series count for this model.
 String getSeriesName(int seriesIndex)
          Returns the series name of the specified index.
 Number getValue(int categoryIndex, int seriesIndex)
          Returns the value for the specified category and series index.
 int indexOfCategoryName(String name)
           
 int indexOfSeriesName(String name)
           
 void removeCategory(int index)
           
 void removeSeries(int index)
           
 void setCategoryName(String name, int categoryIndex)
          Sets the category name of the specified index.
 void setSeriesName(String name, int seriesIndex)
          Sets the series name of the specified index.
 void setValue(Number value, int categoryIndex, int seriesIndex)
          Sets the value for the specified category and series index.
 String toString()
           
 
Methods inherited from class com.zfqjava.swing.AbstractBasicChartModel
addBasicChartModelListener, fireCategoryDeleted, fireCategoryInserted, fireCategoryNameUpdated, fireCategoryUpdated, fireChartChanged, fireSeriesDeleted, fireSeriesInserted, fireSeriesNameUpdated, fireSeriesUpdated, fireValueUpdated, fireValueUpdated, getBasicChartModelListeners, getListeners, removeBasicChartModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultBasicChartModel

public DefaultBasicChartModel()
Method Detail

addSeries

public void addSeries(String name,
                      double[] values)
Since:
JDataGrid 2.0

addSeries

public void addSeries(String name,
                      double[] values,
                      int index)
Since:
JDataGrid 2.0

addSeries

public void addSeries(String name,
                      Number[] values)

addSeries

public void addSeries(String name,
                      Number[] values,
                      int index)

removeSeries

public void removeSeries(int index)

indexOfSeriesName

public int indexOfSeriesName(String name)

addCategory

public void addCategory(String name,
                        double[] values)
Since:
JDataGrid 2.0

addCategory

public void addCategory(String name,
                        double[] values,
                        int index)
Since:
JDataGrid 2.0

addCategory

public void addCategory(String name,
                        Number[] values)

addCategory

public void addCategory(String name,
                        Number[] values,
                        int index)

removeCategory

public void removeCategory(int index)

indexOfCategoryName

public int indexOfCategoryName(String name)

getCategoryCount

public int getCategoryCount()
Description copied from interface: BasicChartModel
Returns the category count for this model.

Returns:
the category count

getSeriesCount

public int getSeriesCount()
Description copied from interface: BasicChartModel
Returns the series count for this model.

Returns:
the series count

getCategoryName

public String getCategoryName(int categoryIndex)
Description copied from interface: BasicChartModel
Returns the category name of the specified index.

Parameters:
categoryIndex - the category index
Returns:
the category name

setCategoryName

public void setCategoryName(String name,
                            int categoryIndex)
Description copied from interface: BasicChartModel
Sets the category name of the specified index.

Parameters:
name - the category name
categoryIndex - the category index

getSeriesName

public String getSeriesName(int seriesIndex)
Description copied from interface: BasicChartModel
Returns the series name of the specified index.

Parameters:
seriesIndex - the series index
Returns:
the series name

setSeriesName

public void setSeriesName(String name,
                          int seriesIndex)
Description copied from interface: BasicChartModel
Sets the series name of the specified index.

Parameters:
name - the series name
seriesIndex - the series index

getValue

public Number getValue(int categoryIndex,
                       int seriesIndex)
Description copied from interface: BasicChartModel
Returns the value for the specified category and series index.

Parameters:
categoryIndex - the category index
seriesIndex - the series index
Returns:
the number for the specified category and series index

setValue

public void setValue(Number value,
                     int categoryIndex,
                     int seriesIndex)
Description copied from interface: BasicChartModel
Sets the value for the specified category and series index.

Parameters:
value - the value
categoryIndex - the category index
seriesIndex - the series index

toString

public String toString()
Overrides:
toString in class Object

JComponentPack 1.5.0

Send your Feedback
JComponentPack 1.5.0
Copyright © 2001-2007 Extreme Component, Inc. All rights reserved.