com.jinsight.jetchart
Class Grid

java.lang.Object
  extended bycom.jinsight.jetchart.Grid

public class Grid
extends java.lang.Object

The Grid class paints a chart grid. It has no public constructor, and can only be accessed through 'get' methods implemented in classes ScatterGraph and GraphSet.

See Also:
ScatterGraph, GraphSet

Field Summary
static int DASHED
          Constant used to set the grid line style to dashed.
static int SOLID
          Constant used to set the grid line style to solid.
 
Constructor Summary
Grid()
           
 
Method Summary
protected  void finalize()
           
 void setBandsColors(java.awt.Color firstBandColor, java.awt.Color secondBandColor)
          Sets the bands colors.
 void setColor(java.awt.Color color)
          Sets grid color.
 void setColoredBandsEnabled(boolean isColoredBandsEnabled)
          Enables/disables display of colored bands.
 void setDashSize(int dashSize)
          Sets the size of a dash painted in a dashed grid line.
 void setDashSpace(int dashSpace)
          Sets the size of the space between consecutive dashes painted in a dashed grid line.
 void setEnabled(boolean isEnabled)
          Enables/disables grid.
 void setInnerLogLinesCount(int innerLogLinesCount)
          Deprecated.  
 void setInnerLogLinesEnabled(boolean isInnerLogLinesEnabled)
          Deprecated.  
 void setStyle(int style)
          Sets the grid line style.
 void setThickness(int thickness)
          Sets the grid lines thickness.
 void setVisibleLinesIndexes(int[] visibleLinesIndexes)
          Sets the indexes of the only grid lines to be displayed.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOLID

public static final int SOLID
Constant used to set the grid line style to solid.

See Also:
Constant Field Values

DASHED

public static final int DASHED
Constant used to set the grid line style to dashed.

See Also:
Constant Field Values
Constructor Detail

Grid

public Grid()
Method Detail

setEnabled

public void setEnabled(boolean isEnabled)
Enables/disables grid.

Parameters:
isEnabled - A boolean value (true/false).

setColor

public void setColor(java.awt.Color color)
Sets grid color.

Parameters:
color - A Color object.

setVisibleLinesIndexes

public void setVisibleLinesIndexes(int[] visibleLinesIndexes)
Sets the indexes of the only grid lines to be displayed. The indexes range from 0 to the maximum number of lines displayed minus 1. If chart is vertical the lines indexes increase from top to bottom, and if chart is horizontal, from left to right.

Parameters:
visibleLinesIndexes - An array of integer numbers.

setStyle

public void setStyle(int style)
Sets the grid line style. A grid line can be solid or dashed. Default style is solid.

Parameters:
style - An integer value.
See Also:
SOLID, DASHED

setDashSize

public void setDashSize(int dashSize)
Sets the size of a dash painted in a dashed grid line. Default value is 10 pixels.

Parameters:
dashSize - An integer value.
See Also:
setStyle(int), setDashSpace(int)

setDashSpace

public void setDashSpace(int dashSpace)
Sets the size of the space between consecutive dashes painted in a dashed grid line. Default value is 5 pixels.

Parameters:
dashSpace - An integer value.
See Also:
setStyle(int), setDashSize(int)

setThickness

public void setThickness(int thickness)
Sets the grid lines thickness. Default value is 1 pixel. This method only has effect if chart is 2D and the grid lines style is solid.

Parameters:
thickness - An integer value.
See Also:
setStyle(int)

setColoredBandsEnabled

public void setColoredBandsEnabled(boolean isColoredBandsEnabled)
Enables/disables display of colored bands. The colored bands are painted horizontally across the chart area starting from the left or right scales of vertical charts, and from top to bottom, alternating two colors. The colored bands take precedence over the horizontal grid lines, in a vertical chart. They are not displayed in horizontal charts.

Parameters:
isColoredBandsEnabled - A boolean value(true/false)
See Also:
setBandsColors(java.awt.Color, java.awt.Color)

setBandsColors

public void setBandsColors(java.awt.Color firstBandColor,
                           java.awt.Color secondBandColor)
Sets the bands colors. If in a vertical chart the colored bands are enabled, they are painted from top to bottom, alternating two colors. Default colors are white and light gray for the first and second colors, respectively.

Parameters:
firstBandColor - A Color object.
secondBandColor - A Color object.
See Also:
setColoredBandsEnabled(boolean)

setInnerLogLinesEnabled

public void setInnerLogLinesEnabled(boolean isInnerLogLinesEnabled)
Deprecated.  

This method has been deprecated. Use Scale.setInnerLogTicksEnabled instead.

See Also:
Scale.setInnerLogTicksEnabled(boolean)

setInnerLogLinesCount

public void setInnerLogLinesCount(int innerLogLinesCount)
Deprecated.  

This method has been deprecated. Use Scale.setInnerLogTicksCount instead.

See Also:
Scale.setInnerLogTicksCount(int)

finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable