NetCharts Pro

netcharts.pro.datamodel
Class NFDataModelAxisLabel

java.lang.Object
  extended by netcharts.pro.datamodel.NFDataModelAxisLabel
All Implemented Interfaces:
NFDataModel

public abstract class NFDataModelAxisLabel
extends java.lang.Object
implements NFDataModel

This abstract class should be used to provide an interface for 1 dimensional data sets (bar sets, line sets, etc) from an underlying data object. The underlying data object is passed into the constructor, and then is accessible directly in order to support getData and getNumPoints() method calls. An example is shown here:


 Object datao[][] = makeData();

 NFDataModelAxisLabel foodata = new NFDataModelAxisLabel(datao) {
     public Object getAxisLabel(int row) {
         Object o[][] = (Object[][])dataObject;
         return o[row][2];
     }
     public int getNumPoints() {
         return ((Object[])dataObject).length;
     }
 };
 
In the example above, the underlying data object is a multidimensional object array, but it could be a JDBC result set, DOM object, or other data object. This data may be passed to any instance of NFVector via the loadDataModel call.


Field Summary
 java.lang.Object dataObject
          Constructor provided data object.
 boolean hasMoreData
          Whether or not the model has more data.
 java.lang.Object userData
          Allows for information to be stored within the data model.
 
Constructor Summary
NFDataModelAxisLabel()
          NFDataModelAxisLabel constructor that does not set the underlying data object.
NFDataModelAxisLabel(java.lang.Object dataObject)
          NFDataModelAxisLabel constructor that sets the underlying data object.
 
Method Summary
 java.lang.Object elementAt(int rowIndex)
          Used internally
 java.lang.Object elementAt(int row, int col)
          Used internally
abstract  java.lang.Object getAxisLabel(int row)
          Return the data value corresponding to this row.
 int getDataDimensions()
          Return the number of data dimensions
 int getNRows()
          Used internally
abstract  int getNumPoints()
          Return the total number of points available in the data object
 boolean hasMoreData()
          Returns whether or not there is more data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataObject

public java.lang.Object dataObject
Constructor provided data object.


hasMoreData

public boolean hasMoreData
Whether or not the model has more data.


userData

public java.lang.Object userData
Allows for information to be stored within the data model.

Constructor Detail

NFDataModelAxisLabel

public NFDataModelAxisLabel()
NFDataModelAxisLabel constructor that does not set the underlying data object. Used when the implementing class will not rely on the underlying data object after initialization.


NFDataModelAxisLabel

public NFDataModelAxisLabel(java.lang.Object dataObject)
NFDataModelAxisLabel constructor that sets the underlying data object. Used when the implementing class will rely on the underlying data object after initialization to retrieve the values.

Parameters:
dataObject -
Method Detail

getAxisLabel

public abstract java.lang.Object getAxisLabel(int row)
Return the data value corresponding to this row.


getNumPoints

public abstract int getNumPoints()
Return the total number of points available in the data object


getDataDimensions

public final int getDataDimensions()
Return the number of data dimensions

Specified by:
getDataDimensions in interface NFDataModel

hasMoreData

public boolean hasMoreData()
Returns whether or not there is more data. This is necessary where the number of rows being returned does not correspond to the underlying data set.

Specified by:
hasMoreData in interface NFDataModel

elementAt

public final java.lang.Object elementAt(int rowIndex)
Used internally

Specified by:
elementAt in interface NFDataModel

elementAt

public final java.lang.Object elementAt(int row,
                                        int col)
Used internally

Specified by:
elementAt in interface NFDataModel

getNRows

public final int getNRows()
Used internally

Specified by:
getNRows in interface NFDataModel

NetCharts Pro


Visual Mining, Inc.
2099 Gaither Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2011
All Rights Reserved.

NetCharts Pro TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Jun 28, 2011