|
From: <cob...@us...> - 2004-01-16 16:36:59
|
Update of /cvsroot/jrobin/src/org/jrobin/graph
In directory sc8-pr-cvs1:/tmp/cvs-serv10372/src/org/jrobin/graph
Modified Files:
Pdef.java RrdGraphDef.java Plottable.java
Log Message:
JRobin 1.2.3-dev
- Switched to abstract Plottable class instead of interface
Index: Pdef.java
===================================================================
RCS file: /cvsroot/jrobin/src/org/jrobin/graph/Pdef.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Pdef.java 15 Jan 2004 22:24:30 -0000 1.1
--- Pdef.java 16 Jan 2004 16:36:54 -0000 1.2
***************
*** 28,32 ****
* <p>Plottable Def, reprents a custom datasource that can be graphed by JRobin.
* All the Pdef needs, is a reference to a Plottable class, and it will get the datapoint values (based
! * on timestamps) from that external class. Any class implementing the public Plottable interface will do,
* meaning that the class could get its values from ANY source... like a RDBMS for example.
* </p>
--- 28,32 ----
* <p>Plottable Def, reprents a custom datasource that can be graphed by JRobin.
* All the Pdef needs, is a reference to a Plottable class, and it will get the datapoint values (based
! * on timestamps) from that external class. Any class extending the public Plottable class will do,
* meaning that the class could get its values from ANY source... like a RDBMS for example.
* </p>
***************
*** 47,51 ****
* (represented as a Plottable class) that can be graphed by JRobin.
* @param name Name of the datasource in the graph definition.
! * @param plottable Reference to the class implementing the Plottable interface and providing the datapoints.
*/
Pdef( String name, Plottable plottable )
--- 47,51 ----
* (represented as a Plottable class) that can be graphed by JRobin.
* @param name Name of the datasource in the graph definition.
! * @param plottable Reference to the class extending Plottable and providing the datapoints.
*/
Pdef( String name, Plottable plottable )
***************
*** 59,63 ****
* (represented as a Plottable class) that can be graphed by JRobin.
* @param name Name of the datasource in the graph definition.
! * @param plottable Reference to the class implementing the Plottable interface and providing the datapoints.
* @param index Integer number used for referring to the series of datapoints to use in the Plottable class.
*/
--- 59,63 ----
* (represented as a Plottable class) that can be graphed by JRobin.
* @param name Name of the datasource in the graph definition.
! * @param plottable Reference to the class extending Plottable and providing the datapoints.
* @param index Integer number used for referring to the series of datapoints to use in the Plottable class.
*/
***************
*** 74,78 ****
* (represented as a Plottable class) that can be graphed by JRobin.
* @param name Name of the datasource in the graph definition.
! * @param plottable Reference to the class implementing the Plottable interface and providing the datapoints.
* @param sourceName String used for referring to the series of datapoints to use in the Plottable class.
*/
--- 74,78 ----
* (represented as a Plottable class) that can be graphed by JRobin.
* @param name Name of the datasource in the graph definition.
! * @param plottable Reference to the class extending Plottable and providing the datapoints.
* @param sourceName String used for referring to the series of datapoints to use in the Plottable class.
*/
Index: RrdGraphDef.java
===================================================================
RCS file: /cvsroot/jrobin/src/org/jrobin/graph/RrdGraphDef.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** RrdGraphDef.java 15 Jan 2004 22:24:30 -0000 1.4
--- RrdGraphDef.java 16 Jan 2004 16:36:54 -0000 1.5
***************
*** 661,668 ****
/**
* <p>Adds a custom graph source with the given name to the graph definition.
! * The datapoints should be made available by a class implementing the Plottable interface.</p>
*
* @param name Graph source name.
! * @param plottable Class that implements plottable interface and is suited for graphing.
*/
public void datasource( String name, Plottable plottable )
--- 661,668 ----
/**
* <p>Adds a custom graph source with the given name to the graph definition.
! * The datapoints should be made available by a class extending Plottable.</p>
*
* @param name Graph source name.
! * @param plottable Class that extends Plottable class and is suited for graphing.
*/
public void datasource( String name, Plottable plottable )
***************
*** 673,680 ****
/**
* <p>Adds a custom graph source with the given name to the graph definition.
! * The datapoints should be made available by a class implementing the Plottable interface.</p>
*
* @param name Graph source name.
! * @param plottable Class that implements plottable interface and is suited for graphing.
* @param index Integer referring to the datasource in the Plottable class.
*/
--- 673,680 ----
/**
* <p>Adds a custom graph source with the given name to the graph definition.
! * The datapoints should be made available by a class extending Plottable.</p>
*
* @param name Graph source name.
! * @param plottable Class that extends Plottable class and is suited for graphing.
* @param index Integer referring to the datasource in the Plottable class.
*/
***************
*** 686,693 ****
/**
* <p>Adds a custom graph source with the given name to the graph definition.
! * The datapoints should be made available by a class implementing the Plottable interface.</p>
*
* @param name Graph source name.
! * @param plottable Class that implements plottable interface and is suited for graphing.
* @param sourceName String name referring to the datasource in the Plottable class.
*/
--- 686,693 ----
/**
* <p>Adds a custom graph source with the given name to the graph definition.
! * The datapoints should be made available by a class extending Plottable.</p>
*
* @param name Graph source name.
! * @param plottable Class that extends Plottable class and is suited for graphing.
* @param sourceName String name referring to the datasource in the Plottable class.
*/
Index: Plottable.java
===================================================================
RCS file: /cvsroot/jrobin/src/org/jrobin/graph/Plottable.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Plottable.java 15 Jan 2004 22:24:30 -0000 1.1
--- Plottable.java 16 Jan 2004 16:36:54 -0000 1.2
***************
*** 28,37 ****
* <p>Interface to be used for custom datasources.
* If you wish to use a custom datasource in a graph, you should create a class implementing this interface
! * that represents that datasource, and then pass this class on to the RrdGraphDef.
! * </p>
*
* @author Arne Vandamme <cob...@ch...>
*/
! public interface Plottable
{
/**
--- 28,36 ----
* <p>Interface to be used for custom datasources.
* If you wish to use a custom datasource in a graph, you should create a class implementing this interface
! * that represents that datasource, and then pass this class on to the RrdGraphDef.</p>
*
* @author Arne Vandamme <cob...@ch...>
*/
! public abstract class Plottable
{
/**
***************
*** 41,45 ****
* @return Double value of the datapoint.
*/
! public double getValue( long timestamp );
/**
--- 40,46 ----
* @return Double value of the datapoint.
*/
! public double getValue( long timestamp ) {
! return Double.NaN;
! }
/**
***************
*** 49,53 ****
* @return Double value of the datapoint.
*/
! public double getValue( long timestamp, int index );
/**
--- 50,56 ----
* @return Double value of the datapoint.
*/
! public double getValue( long timestamp, int index ) {
! return Double.NaN;
! }
/**
***************
*** 57,60 ****
* @return Double value of the datapoint.
*/
! public double getValue( long timestamp, String fieldName );
}
--- 60,65 ----
* @return Double value of the datapoint.
*/
! public double getValue( long timestamp, String fieldName ) {
! return Double.NaN;
! }
}
|