Last Updated: 3/4/97
Class NFGraphSymbol

Class NFGraphSymbol

public final class NFGraphSymbol

Graph Symbol object used to draw graph symbols.

Instance Variables

Type Name Description Default
int size size (in pixels) 4
int style Symbol style (or'd) FILLED
int type symbol type drawn CIRCLE

Final Variables

Type Name Description
int BAR Bar
int CIRCLE Circle Symbol
int CROSS Cross Symbol
int CYLINDER Cylinder
int DIAMOND Diamond Symbol
int DIAMONDBAR Diamond Bar
int FILLED Fill the symbol
int HORIZONTAL symbol is horizontal aligned
int HRECTANGLE Horizontal Rectangle
int NONE No Symbol
int OUTLINED Draw the symbol outline
int PIEHORIZONTAL
int PIEVERTICAL Pie symbol
int SQUARE Square Symbol
int TRIANGLEBAR Triangle Bar
int TRIANGLEDOWN Triangle (Point Down) Symbol
int TRIANGLEUP Triangle (Point Up) Symbol
int VERTICAL symbol is vertically aligned
int VRECTANGLE Vertical Rectangle

Constructors

Methods


NFGraphSymbol()
Create a graph symbol object. This object should not be subclassed.

static NFParamDef defineGraphSymbol (NFParam p,
                                     String param)
Create a parser definition for a graph symbol.

static int defineGraphSymbol (NFParam p,
                              String param,
                              Vector v)
Append the parameters needed for a graph symbol to the given vector. This method returns the number of parameters appended.

void draw (Graphics g,
           int x,
           int y,
           int dx,
           int dy,
           Color colors[],
           int percents[],
           int nvalues,
           int depth)
draw a pie-type symbol

void draw (Graphics g,
           int x,
           int y,
           int dx,
           int dy,
           int depth,
           int alignment)
draw a bar-type symbol

void draw (Graphics g,
           int x,
           int y,
           int dx,
           int dy,
           int depth,
           int alignment,
           boolean drawTop,
           boolean drawSide)
draw a bar-type symbol

void draw(Graphics g,
          int x,
          int y)
Draws this symbol on the given graphics context centered on the given x and y coordinates.

void draw(Graphics g,
          int x,
          int y,
          int len)
Draws this symbol on the given graphics context centered on the given x and y coordinates.

static NFGraphSymbol loadParams (NFParam p,
                                 Object val)
Build a new graph symbol, given a vector of values from the parser.

static NFGraphSymbol loadParams (NFParam p,
                                 Object val,
                                 int offset)
Build a new graph symbol, given a vector of values from the parser, starting at the given offset.