rrdService.util
Class XGrid

java.lang.Object
  |
  +--rrdService.util.XGrid
All Implemented Interfaces:
java.io.Serializable

public class XGrid
extends java.lang.Object
implements java.io.Serializable

The class XGrid main purpose is to create graphical representations of the data stored in one or several RRDs. Apart from generating graphs, it can also extract numerical reports.

Version:
1.0 date : 15/07/2001
Author:
Pellier Damien
See Also:
XGrid, RoundRobinGraphic, Serialized Form

Field Summary
private  int baseGridInterval
          The base grid interval of the grid
private  java.lang.String baseGridUnit
          The base grid unit of the grid
static java.lang.String DAY
          DAY unit
private  boolean defaultGrid
          Default grid
static java.lang.String HOUR
          HOUR unit
private  java.lang.String labelFormat
          The label format of the grid
private  int labelInterval
          The label interval of the grid
private  int labelPrecision
          The label precision of the grid
private  java.lang.String labelUnit
          The label unit of the grid
private  int majorGridInterval
          The major grid interval of the grid
private  java.lang.String majorGridUnit
          The major grid unit of the grid
static java.lang.String MINUTE
          MINUTE unit
static java.lang.String MONTH
          MONTH unit
static java.lang.String SECOND
          SECOND unit
static java.lang.String WEEK
          WEEK unit
static java.lang.String YEAR
          YEAR unit
 
Constructor Summary
XGrid()
          Default constructor of XGrid
XGrid(java.lang.String baseGridUnit, int baseGridInterval, java.lang.String majorGridUnit, int majorGridInterval, java.lang.String labelUnit, int labelInterval, int labelPrecision, java.lang.String labelFormat)
          Constructor of XGrid
 
Method Summary
 int getBaseGridInterval()
          Returns the base grid interval of this xgrid
 java.lang.String getBaseGridUnit()
          Returns the base grid unit of this xgrid
 java.lang.String getLabelFormat()
          Returns the label format of this xgrid
 int getLabelInterval()
          Returns the label interval of this xgrid
 int getLabelPrecision()
          Returns the label precision of this xgrid
 java.lang.String getLabelUnit()
          Returns the label unit of this xgrid
 int getMajorGridInterval()
          Returns the major grid interval of this xgrid
 java.lang.String getMajorGridUnit()
          Returns the major grid unit of this xgrid
 boolean isUnit(java.lang.String unit)
          Returns true if the string parameter is a valide unit
 void setBaseGridInterval(int baseGridInterval)
          Replaces the base grid interval of this xgrid
 void setBaseGridUnit(java.lang.String baseGridUnit)
          Replaces the base grid unit of this xgrid
 void setLabelFormat(java.lang.String labelFormat)
          Replaces the label format of this xgrid
 void setLabelInterval(int labelInterval)
          Replaces the label interval of this xgrid
 void setLabelPrecision(int labelPrecision)
          Replaces the label precision of this xgrid
 void setLabelUnit(java.lang.String labelUnit)
          Replaces the label unit of this xgrid
 void setMajorGridInterval(int majorGridInterval)
          Replaces the major grid interval of this xgrid
 void setMajorGridUnit(java.lang.String majorGridUnit)
          Replaces the major grid unit of this xgrid
 java.lang.String toString()
          Returns a string representation of this xgrid
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

baseGridInterval

private int baseGridInterval
The base grid interval of the grid

baseGridUnit

private java.lang.String baseGridUnit
The base grid unit of the grid

DAY

public static final java.lang.String DAY
DAY unit

defaultGrid

private boolean defaultGrid
Default grid

HOUR

public static final java.lang.String HOUR
HOUR unit

labelFormat

private java.lang.String labelFormat
The label format of the grid

labelInterval

private int labelInterval
The label interval of the grid

labelPrecision

private int labelPrecision
The label precision of the grid

labelUnit

private java.lang.String labelUnit
The label unit of the grid

majorGridInterval

private int majorGridInterval
The major grid interval of the grid

majorGridUnit

private java.lang.String majorGridUnit
The major grid unit of the grid

MINUTE

public static final java.lang.String MINUTE
MINUTE unit

MONTH

public static final java.lang.String MONTH
MONTH unit

SECOND

public static final java.lang.String SECOND
SECOND unit

WEEK

public static final java.lang.String WEEK
WEEK unit

YEAR

public static final java.lang.String YEAR
YEAR unit
Constructor Detail

XGrid

public XGrid()
Default constructor of XGrid

XGrid

public XGrid(java.lang.String baseGridUnit,
             int baseGridInterval,
             java.lang.String majorGridUnit,
             int majorGridInterval,
             java.lang.String labelUnit,
             int labelInterval,
             int labelPrecision,
             java.lang.String labelFormat)
      throws java.lang.Exception
Constructor of XGrid
Parameters:
baseGridUnit - The base grid interval of the grid
baseGridInterval - The base grid interval of the grid
majorGridUnit - The major grid unit of the grid
majorGridInterval - The major grid interval of the grid
labelUnit - The label unit of the grid
labelInterval - The label interval of the grid
labelPrecision - The label precision of the grid
labelFormat - The label format of the grid
Method Detail

getBaseGridInterval

public int getBaseGridInterval()
Returns the base grid interval of this xgrid

getBaseGridUnit

public java.lang.String getBaseGridUnit()
Returns the base grid unit of this xgrid

getLabelFormat

public java.lang.String getLabelFormat()
Returns the label format of this xgrid

getLabelInterval

public int getLabelInterval()
Returns the label interval of this xgrid

getLabelPrecision

public int getLabelPrecision()
Returns the label precision of this xgrid

getLabelUnit

public java.lang.String getLabelUnit()
Returns the label unit of this xgrid

getMajorGridInterval

public int getMajorGridInterval()
Returns the major grid interval of this xgrid

getMajorGridUnit

public java.lang.String getMajorGridUnit()
Returns the major grid unit of this xgrid

isUnit

public boolean isUnit(java.lang.String unit)
Returns true if the string parameter is a valide unit
Parameters:
unit - the string to test

setBaseGridInterval

public void setBaseGridInterval(int baseGridInterval)
Replaces the base grid interval of this xgrid
Parameters:
baseGridInterval - The base grid interval of the grid

setBaseGridUnit

public void setBaseGridUnit(java.lang.String baseGridUnit)
                     throws java.lang.Exception
Replaces the base grid unit of this xgrid
Parameters:
baseGridUnit - The base grid interval of the grid

setLabelFormat

public void setLabelFormat(java.lang.String labelFormat)
Replaces the label format of this xgrid
Parameters:
labelFormat - The label format of the grid

setLabelInterval

public void setLabelInterval(int labelInterval)
Replaces the label interval of this xgrid
Parameters:
labelInterval - The label interval of the grid

setLabelPrecision

public void setLabelPrecision(int labelPrecision)
Replaces the label precision of this xgrid
Parameters:
labelInterval - The label interval of the grid

setLabelUnit

public void setLabelUnit(java.lang.String labelUnit)
                  throws java.lang.Exception
Replaces the label unit of this xgrid
Parameters:
labelUnit - The label unit of the grid

setMajorGridInterval

public void setMajorGridInterval(int majorGridInterval)
Replaces the major grid interval of this xgrid
Parameters:
majorGridInterval - The major grid interval of the grid

setMajorGridUnit

public void setMajorGridUnit(java.lang.String majorGridUnit)
                      throws java.lang.Exception
Replaces the major grid unit of this xgrid
Parameters:
majorGridUnit - The major grid unit of the grid

toString

public java.lang.String toString()
Returns a string representation of this xgrid
Overrides:
toString in class java.lang.Object

Copyright 1885-2001 FIRMENICH SA, Geneva

Submit a bug or feature
Copyright 1885-2001 FIRMENICH SA, Geneva,
All Rights Reserved.