JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d.data
Class JCSwing3dDataSource

java.lang.Object
  |
  +--com.klg.jclass.chart3d.event.Chart3dDataSupport
        |
        +--com.klg.jclass.chart3d.data.Base3dDataSource
              |
              +--com.klg.jclass.chart3d.data.Base3dGridDataSource
                    |
                    +--com.klg.jclass.chart3d.data.JCDefault3dGridDataSource
                          |
                          +--com.klg.jclass.chart3d.data.JCEditable3dGridDataSource
                                |
                                +--com.klg.jclass.chart3d.data.JCSwing3dDataSource
All Implemented Interfaces:
Chart3dDataManager, Chart3dDataModel, Chart3dGridDataModel, Cloneable, EditableChart3dDataModel, EventListener, HoleValueChart3dDataModel, LabelledChart3dDataModel, LabelledChart3dGridDataModel, Serializable, TableModelListener

public class JCSwing3dDataSource
extends JCEditable3dGridDataSource
implements TableModelListener

3d DataSource converts a Swing TableModel into a form useable by the 3d Chart. X and Y values are generated. ZValues are generated in the form zValues[table columns][table rows].
Note: This DataSource is only available in Grid format.

This datasource implements TableModelListener for the benefit of those who wish to update their chart through the TableModel. It is recommended that those who wish to update their TableModel through the chart should implement a Chart3dDataListener for this purpose.

See Also:
Serialized Form

Field Summary
protected  TableModel tableModel
          Swing TableModel instance used to provide zValues for this datasource.
 
Fields inherited from class com.klg.jclass.chart3d.data.Base3dGridDataSource
chartDataListeners, dataSourceName, xGrid, xLabels, yGrid, yLabels, zValues
 
Fields inherited from class com.klg.jclass.chart3d.data.Base3dDataSource
holeValue
 
Fields inherited from class com.klg.jclass.chart3d.event.Chart3dDataSupport
source
 
Fields inherited from interface com.klg.jclass.chart3d.HoleValueChart3dDataModel
DEFAULT_HOLE_VALUE
 
Constructor Summary
JCSwing3dDataSource(TableModel tm)
          Simple constructor which takes the TableModel as an argument.
 
Method Summary
 TableModel getTableModel()
          Gets the TableModel object for this datasource.
protected  void setData()
          Makes zValues out of the tableModel.
 void setTableModel(TableModel tm)
          Sets the tableModel property, adds the tableModelListener to it, and calls setData;.
 void tableChanged(TableModelEvent ev)
          This method is from the TableModelListener.
 
Methods inherited from class com.klg.jclass.chart3d.data.JCEditable3dGridDataSource
getZValue, getZValue, setZValue, setZValue
 
Methods inherited from class com.klg.jclass.chart3d.data.JCDefault3dGridDataSource
getXGridSize, getYGridSize, getZArray, setZArray
 
Methods inherited from class com.klg.jclass.chart3d.data.Base3dGridDataSource
clone, getDataSourceName, getNumX, getNumY, getXGrid, getXLabels, getYGrid, getYLabels, getZValues, setDataSourceName, setXGrid, setXLabels, setYGrid, setYLabels, setZValues
 
Methods inherited from class com.klg.jclass.chart3d.data.Base3dDataSource
getHoleValue, setHoleValue
 
Methods inherited from class com.klg.jclass.chart3d.event.Chart3dDataSupport
addChart3dDataListener, fireChart3dDataEvent, fireChart3dDataEvent, removeChart3dDataListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tableModel

protected TableModel tableModel
Swing TableModel instance used to provide zValues for this datasource.

Constructor Detail

JCSwing3dDataSource

public JCSwing3dDataSource(TableModel tm)
Simple constructor which takes the TableModel as an argument.

Parameters:
tm -
See Also:
TableModel
Method Detail

setData

protected void setData()
Makes zValues out of the tableModel. It is called by the 1-arg constructor, the setTableModel method, and anytime changes to the tableModel are comprehensive enough to warrant a RESET event (which it fires).


tableChanged

public void tableChanged(TableModelEvent ev)
This method is from the TableModelListener. It updates the chart data, when the TableModel Changes.

Specified by:
tableChanged in interface TableModelListener
Parameters:
ev - TableModelEvent

getTableModel

public TableModel getTableModel()
Gets the TableModel object for this datasource.

Returns:
tableModel TableModel

setTableModel

public void setTableModel(TableModel tm)
Sets the tableModel property, adds the tableModelListener to it, and calls setData;.

Parameters:
tm -

Copyright © 2004 Quest Software Inc..
All rights reserved.