JComponentPack 1.5.0

com.zfqjava.swing
Class AbstractBasicChartModel

java.lang.Object
  extended by com.zfqjava.swing.AbstractBasicChartModel
All Implemented Interfaces:
BasicChartModel
Direct Known Subclasses:
DefaultBasicChartModel, TableBasicChartModel

public abstract class AbstractBasicChartModel
extends Object
implements BasicChartModel

AbstractBasicChartModel provides a abstract implements of chart model.


Field Summary
protected  EventListenerList listenerList
          The list of ChangeListeners for this model.
 
Constructor Summary
AbstractBasicChartModel()
           
 
Method Summary
 void addBasicChartModelListener(BasicChartModelListener l)
          Adds a BasicChartModelListener to the model's listener list.
protected  void fireCategoryDeleted(int firstIndex, int lastIndex)
           
protected  void fireCategoryInserted(int firstIndex, int lastIndex)
           
protected  void fireCategoryNameUpdated(int firstIndex, int lastIndex)
           
protected  void fireCategoryUpdated(int firstIndex, int lastIndex)
           
protected  void fireChartChanged(BasicChartModelEvent e)
          Forwards the given notification event to all BasicChartModelListeners that registered themselves as listeners for this basic chart model.
protected  void fireSeriesDeleted(int firstIndex, int lastIndex)
           
protected  void fireSeriesInserted(int firstIndex, int lastIndex)
           
protected  void fireSeriesNameUpdated(int firstIndex, int lastIndex)
           
protected  void fireSeriesUpdated(int firstIndex, int lastIndex)
           
protected  void fireValueUpdated(int category, int series)
           
protected  void fireValueUpdated(int firstCategory, int lastCategory, int firstSeries, int lastSeries)
           
 BasicChartModelListener[] getBasicChartModelListeners()
          Returns an array of all the basic chart model listeners registered on this AbstractBasicChartModel.
 EventListener[] getListeners(Class listenerType)
          Return an array of all the listeners of the given type that were added to this model.
 void removeBasicChartModelListener(BasicChartModelListener l)
          Removes a BasicChartModelListener from the model's listener list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.zfqjava.swing.BasicChartModel
getCategoryCount, getCategoryName, getSeriesCount, getSeriesName, getValue, setCategoryName, setSeriesName, setValue
 

Field Detail

listenerList

protected EventListenerList listenerList
The list of ChangeListeners for this model. Subclasses may store their own listeners here.

Constructor Detail

AbstractBasicChartModel

public AbstractBasicChartModel()
Method Detail

addBasicChartModelListener

public void addBasicChartModelListener(BasicChartModelListener l)
Adds a BasicChartModelListener to the model's listener list. The BasicChartModelListeners must be notified when models value changes.

Specified by:
addBasicChartModelListener in interface BasicChartModel
Parameters:
l - the BasicChartModelListener to add
See Also:
removeBasicChartModelListener(com.zfqjava.swing.event.BasicChartModelListener)

removeBasicChartModelListener

public void removeBasicChartModelListener(BasicChartModelListener l)
Removes a BasicChartModelListener from the model's listener list.

Specified by:
removeBasicChartModelListener in interface BasicChartModel
Parameters:
l - the BasicChartModelListener to remove
See Also:
addBasicChartModelListener(com.zfqjava.swing.event.BasicChartModelListener)

getBasicChartModelListeners

public BasicChartModelListener[] getBasicChartModelListeners()
Returns an array of all the basic chart model listeners registered on this AbstractBasicChartModel.

Returns:
all of this model's BasicChartModelListeners, or an empty array if no basicchart model listeners are currently registered
See Also:
addBasicChartModelListener(com.zfqjava.swing.event.BasicChartModelListener), removeBasicChartModelListener(com.zfqjava.swing.event.BasicChartModelListener)

fireCategoryInserted

protected void fireCategoryInserted(int firstIndex,
                                    int lastIndex)

fireCategoryUpdated

protected void fireCategoryUpdated(int firstIndex,
                                   int lastIndex)

fireCategoryDeleted

protected void fireCategoryDeleted(int firstIndex,
                                   int lastIndex)

fireCategoryNameUpdated

protected void fireCategoryNameUpdated(int firstIndex,
                                       int lastIndex)

fireChartChanged

protected void fireChartChanged(BasicChartModelEvent e)
Forwards the given notification event to all BasicChartModelListeners that registered themselves as listeners for this basic chart model.

Parameters:
e - the event to be forwarded
See Also:
addBasicChartModelListener(com.zfqjava.swing.event.BasicChartModelListener), BasicChartModelEvent, EventListenerList

fireSeriesInserted

protected void fireSeriesInserted(int firstIndex,
                                  int lastIndex)

fireSeriesUpdated

protected void fireSeriesUpdated(int firstIndex,
                                 int lastIndex)

fireSeriesDeleted

protected void fireSeriesDeleted(int firstIndex,
                                 int lastIndex)

fireSeriesNameUpdated

protected void fireSeriesNameUpdated(int firstIndex,
                                     int lastIndex)

fireValueUpdated

protected void fireValueUpdated(int category,
                                int series)

fireValueUpdated

protected void fireValueUpdated(int firstCategory,
                                int lastCategory,
                                int firstSeries,
                                int lastSeries)

getListeners

public EventListener[] getListeners(Class listenerType)
Return an array of all the listeners of the given type that were added to this model. For example to find all of the ChangeListeners added to this model:
 myAbstractSpinnerModel.getListeners(ChangeListener.class);
 

Parameters:
listenerType - the type of listeners to return, e.g. ChangeListener.class
Returns:
all of the objects receiving listenerType notifications from this model

JComponentPack 1.5.0

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