Last Updated: 3/4/97
Class NFGrid

Class NFGrid

public final class NFGrid

The NFGrid object is a parallelagram display object that optionally displays background and gridlines.

Instance Variables

Type Name Description Default
NFAxis XAxis X Axis null
NFAxis YAxis Y Axis null
NFAxis ZAxis Z Axis (3D only) null
Color background background color Color.gray
Color borderColor border color Color.gray.darker()
Image im background image null
Color lineColor gridline color Color.gray.darker()
int lineStyle line style, use 0 for bars NFLine.SOLID
int lineWidth line width in pixels 1
boolean showBackground show background false
boolean showBorder show border false
boolean showGrid show grid false
boolean showHorizontal show horizontal lines true
boolean showVertical show vertical lines true

Constructors

Methods


NFGrid ()
Constructor to use for a grid with default settings

void display (Graphics g)
Draw the currently defined grid in the given graphics context.

void setAxis (NFAxis XAxis,
              NFAxis YAxis,
              NFAxis ZAxis)
Define the X, Y and Z axis to be used when displaying the grid. If the Z axis is null, then only a 2D grid will be drawn, regardless of the depth setting. If the X or Y axis are null, then the current polygon settings will be used.

void setDepth (int depth)
Sets the current depth for 3D grids. If the depth is 0, only a 2D grid will be displayed.