JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d
Class JCGridColor

java.lang.Object
  |
  +--com.klg.jclass.chart3d.JCGridColor

public class JCGridColor
extends Object

Class that allows certain bars (or rows/columns of bars) to be drawn with distinct colors. This can be used to do selection of bars.


Field Summary
protected  Color color
          The color to give selected bars.
protected  com.klg.jclass.chart3d.JCData3dGridIndex dataIndex
          The grid index of the selected bar (or row/column of bars).
protected  com.klg.jclass.chart3d.TrackChange parent
          The parent tracking changes in this object.
 
Constructor Summary
JCGridColor()
          Default constructor.
JCGridColor(int x, int y, Color color)
          Constructor that specifies the necessary info: x, y, and color.
 
Method Summary
 Color getColor()
          Gets the color used to draw the bar (or row/column of bars) referenced by the x and y of the JCData3dGridIndex.
 com.klg.jclass.chart3d.JCData3dGridIndex getDataIndex()
          Returns the JCData3dGridIndex object that contains the x and y index for this grid color.
 int getX()
          Returns the x index for this grid color.
 int getY()
          Returns the y index for this grid color.
protected  void setChanged(boolean b, int cf)
          Tells the parent (if there is one) that a change has happened.
 void setColor(Color color)
          Sets the color used to draw the bar (or row/column of bars) referenced by the x and y of the JCData3dGridIndex.
 void setDataIndex(com.klg.jclass.chart3d.JCData3dGridIndex dataIndex)
          Sets the JCData3dGridIndex object that contains the x and y index for this grid color.
 void setX(int x)
          Sets the x index for this grid color.
 void setY(int y)
          Returns the y index for this grid color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataIndex

protected com.klg.jclass.chart3d.JCData3dGridIndex dataIndex
The grid index of the selected bar (or row/column of bars).


color

protected Color color
The color to give selected bars.


parent

protected com.klg.jclass.chart3d.TrackChange parent
The parent tracking changes in this object.

Constructor Detail

JCGridColor

public JCGridColor()
Default constructor. Color is null, and x and y are invalid values.


JCGridColor

public JCGridColor(int x,
                   int y,
                   Color color)
Constructor that specifies the necessary info: x, y, and color.

Parameters:
x - the x index for this grid color object
y - the y index for this grid color object
color - the color for this grid color object
Method Detail

getDataIndex

public com.klg.jclass.chart3d.JCData3dGridIndex getDataIndex()
Returns the JCData3dGridIndex object that contains the x and y index for this grid color.

Returns:
the current data index

setDataIndex

public void setDataIndex(com.klg.jclass.chart3d.JCData3dGridIndex dataIndex)
Sets the JCData3dGridIndex object that contains the x and y index for this grid color.

Parameters:
dataIndex - the new data index

getX

public int getX()
Returns the x index for this grid color. This is a convenience method that only returns the x index of the grid color's JCData3dGridIndex object.

Returns:
the grid color's x index

setX

public void setX(int x)
Sets the x index for this grid color. This is a convenience method that only sets the x index of the grid color's JCData3dGridIndex object.

Parameters:
x - the new x index

getY

public int getY()
Returns the y index for this grid color. This is a convenience method that only returns the y index of the grid color's JCData3dGridIndex object.

Returns:
the grid color's y index

setY

public void setY(int y)
Returns the y index for this grid color. This is a convenience method that only returns the y index of the grid color's JCData3dGridIndex object.

Parameters:
y - the new y index

getColor

public Color getColor()
Gets the color used to draw the bar (or row/column of bars) referenced by the x and y of the JCData3dGridIndex.

Returns:
the color that bars referenced by this grid color should be drawn

setColor

public void setColor(Color color)
Sets the color used to draw the bar (or row/column of bars) referenced by the x and y of the JCData3dGridIndex.

Parameters:
color - the new color used to draw bars referenced by this grid color

setChanged

protected void setChanged(boolean b,
                          int cf)
Tells the parent (if there is one) that a change has happened.

Parameters:
b - Is there a change?
cf - the change mask that tells which type of change

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