JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d
Class JCGridLines

java.lang.Object
  |
  +--com.klg.jclass.chart3d.JCGridLines
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
JCGridLinesJava3d

public class JCGridLines
extends Object
implements Serializable

Specifies which gridlines are drawn for a given axis. This information is specified on a plane by plane basis using a plane_mask.

See Also:
Serialized Form

Field Summary
static int ALL_PLANES
          All planes have been specified.
protected  com.klg.jclass.chart3d.JCAxis axis
          The parent axis.
protected  Point4d data1
           
protected  Point4d data2
           
protected  com.klg.jclass.chart3d.JCLineStyle lineStyle
          Gridline color, width, and pattern.
static int NO_PLANE
          No planes have been specified.
protected  int planeMask
          The plane mask.
static int XY_PLANE
          The XY plane mask.
static int XZ_PLANE
          The XZ plane mask.
static int YZ_PLANE
          The YZ plane mask.
 
Constructor Summary
JCGridLines()
          Null constructor.
JCGridLines(com.klg.jclass.chart3d.JCAxis axis, int planeMask)
          Constructor that specifies the axis and planeMask.
JCGridLines(com.klg.jclass.chart3d.JCAxis axis, int planeMask, com.klg.jclass.chart3d.JCLineStyle lineStyle)
          Constructor which specifies axis, planeMask, and lineStyle.
 
Method Summary
protected  void drawGridFace(Graphics gc, Matrix4d ctm, int faceFlag, Point3d facePoint)
          Draws gridlines on a particular grid face (indicated by faceFlag).
protected  void drawSingleGridLine(Graphics gc, Matrix4d ctm, double value, int faceFlag, Point3d facePoint)
          Computes the end points of the gridline, and draws the gridline if the user has specifically asked for it to be drawn.
 com.klg.jclass.chart3d.JCAxis getAxis()
          Gets the value of the Axis property.
 com.klg.jclass.chart3d.JCLineStyle getLineStyle()
          Gets the JCLineStyle property, which controls how gridlines are drawn.
 int getPlaneMask()
          Returns the plane mask that determines on which plane(s) to draw gridlines.
 void setAxis(com.klg.jclass.chart3d.JCAxis axis)
          Sets the value of the Axis property.
protected  void setChanged(boolean b, int cf)
          Tells the parent (if there is one) that a change has happened.
 void setLineStyle(com.klg.jclass.chart3d.JCLineStyle lineStyle)
          Sets the JCLineStyle property, which controls how gridlines are drawn.
 void setPlaneMask(int planeMask)
          Sets the plane mask which determines on which plane(s) to draw gridlines.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_PLANE

public static final int NO_PLANE
No planes have been specified.

See Also:
Constant Field Values

XY_PLANE

public static final int XY_PLANE
The XY plane mask.

See Also:
Constant Field Values

XZ_PLANE

public static final int XZ_PLANE
The XZ plane mask.

See Also:
Constant Field Values

YZ_PLANE

public static final int YZ_PLANE
The YZ plane mask.

See Also:
Constant Field Values

ALL_PLANES

public static final int ALL_PLANES
All planes have been specified.

See Also:
Constant Field Values

planeMask

protected int planeMask
The plane mask. A logic OR of the three possible planes.


lineStyle

protected com.klg.jclass.chart3d.JCLineStyle lineStyle
Gridline color, width, and pattern.


axis

protected com.klg.jclass.chart3d.JCAxis axis
The parent axis.


data1

protected Point4d data1

data2

protected Point4d data2
Constructor Detail

JCGridLines

public JCGridLines()
Null constructor. Parent is null. Set mask to NO_PLANES and use default line style.


JCGridLines

public JCGridLines(com.klg.jclass.chart3d.JCAxis axis,
                   int planeMask)
Constructor that specifies the axis and planeMask.

Parameters:
axis - the parent axis
planeMask - mask which determines on which plane(s) to draw gridlines

JCGridLines

public JCGridLines(com.klg.jclass.chart3d.JCAxis axis,
                   int planeMask,
                   com.klg.jclass.chart3d.JCLineStyle lineStyle)
Constructor which specifies axis, planeMask, and lineStyle.

Parameters:
axis - the parent axis
planeMask - mask which determines on which plane(s) to draw gridlines
lineStyle - the lineStyle for this set of gridlines
Method Detail

getPlaneMask

public int getPlaneMask()
Returns the plane mask that determines on which plane(s) to draw gridlines. It is a logical OR of XY_PLANE, XZ_PLANE, and YZ_PLANE, two of which make sense for a given axis.

Returns:
The current plane mask

setPlaneMask

public void setPlaneMask(int planeMask)
Sets the plane mask which determines on which plane(s) to draw gridlines. It is a logical OR of XY_PLANE, XZ_PLANE, and YZ_PLANE, two of which make sense for a given axis.

Parameters:
planeMask - The new plane mask

getLineStyle

public com.klg.jclass.chart3d.JCLineStyle getLineStyle()
Gets the JCLineStyle property, which controls how gridlines are drawn.

Returns:
JCLineStyle instance representing the gridline drawing style

setLineStyle

public void setLineStyle(com.klg.jclass.chart3d.JCLineStyle lineStyle)
Sets the JCLineStyle property, which controls how gridlines are drawn.

Parameters:
lineStyle - The new grid line style.

getAxis

public com.klg.jclass.chart3d.JCAxis getAxis()
Gets the value of the Axis property. The Axis property specifies the axis associated with this gridline.

Returns:
The axis associated with this gridline

setAxis

public void setAxis(com.klg.jclass.chart3d.JCAxis axis)
Sets the value of the Axis property. The Axis
Parameters:
axis - The new axis associated with this gridline

setChanged

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

Parameters:
b - Has anything changed?
cf - the change mask which tells what type of change

drawSingleGridLine

protected void drawSingleGridLine(Graphics gc,
                                  Matrix4d ctm,
                                  double value,
                                  int faceFlag,
                                  Point3d facePoint)
Computes the end points of the gridline, and draws the gridline if the user has specifically asked for it to be drawn.

Parameters:
gc - the graphics object used for drawing
ctm - the current transform matrix (determined by caller)
value - the value along the axis at which to draw
faceFlag - which face to draw on for the parent axis
facePoint - a representative point on the face which is being drawn

drawGridFace

protected void drawGridFace(Graphics gc,
                            Matrix4d ctm,
                            int faceFlag,
                            Point3d facePoint)
Draws gridlines on a particular grid face (indicated by faceFlag).

Parameters:
gc - the graphics object used for drawing
ctm - the current transform matrix (determined by caller)
faceFlag - which face to draw on for the parent axis
facePoint - a representative point on the face which is being drawn

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