JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart
Class JCGrid

java.lang.Object
  |
  +--com.klg.jclass.chart.JCGrid
All Implemented Interfaces:
Serializable

public class JCGrid
extends Object
implements Serializable

This class is used to define a series of grid lines on a JCAxis.

See Also:
Serialized Form

Field Summary
protected  com.klg.jclass.chart.JCChartStyle gridStyle
          Style of grid lines.
protected  com.klg.jclass.chart.DerivedDouble incrementValue
          If not default, the scale values at which grid lines are to be placed.
protected  String name
           
protected  com.klg.jclass.chart.JCAxis parent
           
protected  com.klg.jclass.chart.DerivedDouble startValue
          The startValue is the scale value at which to begin this set of grid lines.
protected  com.klg.jclass.chart.DerivedDouble stopValue
          The stopValue is the scale value at which this set of grid lines ends.
 
Constructor Summary
JCGrid()
          Creates a JCGrid object with default properties.
JCGrid(com.klg.jclass.chart.JCAxis ax)
          Creates a JCGrid object with startValue, stopValue, and incrementValue initialized to the min, max, and numSpacing values of the parent axis.
JCGrid(com.klg.jclass.chart.JCAxis parent, double startValue, double stopValue, double incrementValue, com.klg.jclass.chart.JCChartStyle gridStyle)
          Creates a grid object and sets its properties.
 
Method Summary
static boolean equivalentGridLineStyles(com.klg.jclass.chart.JCLineStyle ls1, com.klg.jclass.chart.JCLineStyle ls2, com.klg.jclass.chart.JCAxis ax)
          Intended for internal use only.
 com.klg.jclass.chart.JCChartStyle getGridStyle()
          Returns the style in which to draw grids.
 boolean getIncrementIsDefault()
           
 double getIncrementValue()
          In non-default mode, use this value as the increment value; that is, it places grids at every incrementValue along the scale.
 String getName()
          Returns the name of this grid object.
 com.klg.jclass.chart.JCAxis getParent()
          Returns the parent JCAxis.
 double getStartValue()
          In non-default mode, use this value as the start value.
 boolean getStartValueIsDefault()
           
 double getStopValue()
          In non-default mode, use this value as the stop value.
 boolean getStopValueIsDefault()
           
 boolean isDefault()
          Returns true if all the JCGrid properties have default values.
static com.klg.jclass.chart.JCLineStyle makeDefaultLineStyle(com.klg.jclass.chart.JCAxis axis)
          This method creates a JCLineStyle with default attributes for a JCGrid.
 void setGridStyle(com.klg.jclass.chart.JCChartStyle gridStyle)
          The style to use to draw grid lines.
 void setIncrementIsDefault(boolean isDefault)
           
 void setIncrementValue(double incrementValue)
          In non-default mode, use this value as the increment value; that is, it places grid lines at every incrementValue along the scale.
 void setName(String name)
          Sets the name of this grid object.
 void setParent(com.klg.jclass.chart.JCAxis ax)
          Sets the parent JCAxis.
 void setStartValue(double startValue)
          In non-default mode, use this value as the start value.
 void setStartValueIsDefault(boolean isDefault)
           
 void setStopValue(double stopValue)
          In non-default mode, use this value as the stop value.
 void setStopValueIsDefault(boolean isDefault)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

protected com.klg.jclass.chart.JCAxis parent

name

protected String name

startValue

protected com.klg.jclass.chart.DerivedDouble startValue
The startValue is the scale value at which to begin this set of grid lines.


stopValue

protected com.klg.jclass.chart.DerivedDouble stopValue
The stopValue is the scale value at which this set of grid lines ends.


incrementValue

protected com.klg.jclass.chart.DerivedDouble incrementValue
If not default, the scale values at which grid lines are to be placed.


gridStyle

protected com.klg.jclass.chart.JCChartStyle gridStyle
Style of grid lines.

Constructor Detail

JCGrid

public JCGrid()
Creates a JCGrid object with default properties.


JCGrid

public JCGrid(com.klg.jclass.chart.JCAxis ax)
Creates a JCGrid object with startValue, stopValue, and incrementValue initialized to the min, max, and numSpacing values of the parent axis.


JCGrid

public JCGrid(com.klg.jclass.chart.JCAxis parent,
              double startValue,
              double stopValue,
              double incrementValue,
              com.klg.jclass.chart.JCChartStyle gridStyle)
Creates a grid object and sets its properties.

Parameters:
startValue - where the grid lines are to begin
stopValue - where the grid lines are to end
incrementValue - the grid interval
gridStyle - the grid line style
Method Detail

getParent

public com.klg.jclass.chart.JCAxis getParent()
Returns the parent JCAxis.


setParent

public void setParent(com.klg.jclass.chart.JCAxis ax)
Sets the parent JCAxis.


getName

public String getName()
Returns the name of this grid object.


setName

public void setName(String name)
Sets the name of this grid object.


getIncrementValue

public double getIncrementValue()
In non-default mode, use this value as the increment value; that is, it places grids at every incrementValue along the scale. In default mode, the calculated increment value will overwrite this value.

Returns:
the spacing between adjacent grid lines

getIncrementIsDefault

public boolean getIncrementIsDefault()

getStartValue

public double getStartValue()
In non-default mode, use this value as the start value. In default mode, the calculated start value will overwrite this value.

Returns:
the start value

getStartValueIsDefault

public boolean getStartValueIsDefault()

getStopValue

public double getStopValue()
In non-default mode, use this value as the stop value. In default mode, the calculated stop value will overwrite this value.

Returns:
the stop value

getStopValueIsDefault

public boolean getStopValueIsDefault()

getGridStyle

public com.klg.jclass.chart.JCChartStyle getGridStyle()
Returns the style in which to draw grids.

Returns:
the style of the grid lines

setIncrementValue

public void setIncrementValue(double incrementValue)
In non-default mode, use this value as the increment value; that is, it places grid lines at every incrementValue along the scale. In default mode, the calculated increment value will overwrite this value.

Parameters:
incrementValue - the spacing between adjacent grid lines

setIncrementIsDefault

public void setIncrementIsDefault(boolean isDefault)

setStartValue

public void setStartValue(double startValue)
In non-default mode, use this value as the start value. In default mode, the calculated start value will overwrite this value.

Parameters:
startValue - the start value

setStartValueIsDefault

public void setStartValueIsDefault(boolean isDefault)

setStopValue

public void setStopValue(double stopValue)
In non-default mode, use this value as the stop value. In default mode, the calculated stop value will overwrite this value.

Parameters:
stopValue - the stop value

setStopValueIsDefault

public void setStopValueIsDefault(boolean isDefault)

setGridStyle

public void setGridStyle(com.klg.jclass.chart.JCChartStyle gridStyle)
The style to use to draw grid lines.

Parameters:
gridStyle - the style of the grid lines

toString

public String toString()
Overrides:
toString in class Object

makeDefaultLineStyle

public static com.klg.jclass.chart.JCLineStyle makeDefaultLineStyle(com.klg.jclass.chart.JCAxis axis)
This method creates a JCLineStyle with default attributes for a JCGrid.


equivalentGridLineStyles

public static boolean equivalentGridLineStyles(com.klg.jclass.chart.JCLineStyle ls1,
                                               com.klg.jclass.chart.JCLineStyle ls2,
                                               com.klg.jclass.chart.JCAxis ax)
Intended for internal use only. Returns true if the JCLineStyle parameters are equal.


isDefault

public boolean isDefault()
Returns true if all the JCGrid properties have default values.


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