Last Updated: 3/4/97
Class NFNote

Class NFNote

public class NFNote extends NFLabel

NFNote class is used to make text annotations to associate with data points on a graph. Each note may have an "arrowed" line constructed of four points to direct the viewer attention to a particular area or feature of the graph. The NFNote label, and perhaps associated NFRegion, can be placed in one of 9 sectors on top of and around the primary X/Y point of the NFNote. These positions are:

 	 --------------------------------------
 	|  TOPLEFT   |    TOP    |  TOPRIGHT   |
 	|--------------------------------------|
 	|    LEFT    |   CENTER  |   RIGHT     |
 	|--------------------------------------|
 	| BOTTOMLEFT |   BOTTOM  | BOTTOMRIGHT |
 	 --------------------------------------

where "CENTER" represents the actual X/Y point of the note.

Notes are usually contained within a NFNoteSet object which shares a common note for drawing.

Instance Variables

Type Name Description Default
int sector Note position CENTER

Final Variables

Type Name Description
int BOTH Arrow both directions
int BOTTOM Note is below point
int BOTTOMLEFT Note is below/left of point
int BOTTOMRIGHT Note is below/right of point
int CENTER Note is centered on point
int FROMTO Arrow from note to endpoint
int LEFT Note is left of point
int NONE No Arrow
int RIGHT Note is right of point
int TOFROM Arrow from endpoint to note
int TOP Note is above point
int TOPLEFT Note is above/left of point
int TOPRIGHT Note is above/right of point

Methods


static NFParamDef defineArrow(NFParam p,
                              String param)
defines the arrow line vector

static NFParamDef defineBox(NFParam p,
                            String param)
define the note box parameter

static NFParamDef defineJustify(NFParam p,
                                String param)
defines the justification parameter

static NFParamDef defineLabel(NFParam p,
                              String param)
defines the note's label parameters

void defineNote(NFParam p,
                String param)
defines the note for the parameter parser

static void defineSharedNote(NFParam p,
                             String param)
defines a shared note for the parameter parser

static NFParamDef defineText(NFParam p,
                             String param)
defines the note text and positional information.

void draw(Graphics g)
draws the note by drawing the arrow line first (if defined, and then calling on the superclass to draw the note label and region (if defined)

	public void loadArrow(NFParam p,
                       String param) throws Exception
load the line and arrow information from the parameter parser.

	public void loadArrow(NFParam p,
                       String param,
                       Vector v) throws Exception
load the arrow info from the parameter parser and put it into a vector

	public void loadBox(NFParam p,
                     String param) throws Exception
load the NoteBox info from the parameter parser

	public void loadFormat(NFParam p,
                        String param) throws Exception
OBSOLETED!!!

void loadLabel(NFParam p,
               String param) throws Exception
load the NoteLabel from the parameter parser

void loadParams(NFParam p,
                String param)
loads the parameters from the parameter parser.

void loadSharedNote(NFParam p,
                    String param)
loads the parameters from the parameter parser for a note that is to be shared. This means that the NoteSet[1-20] information will not be read from the parser and will be taken care of elsewhere (most likely in NFNoteSet).

    public void loadText(NFParam p,
                         String param) throws Exception
loads the text string and line points from the parameter parser.

void setCoordinates(int x,
                    int y,
                    int x1,
                    int y1,
                    int x2,
                    int y2,
                    int x3,
                    int y3)
Sets the location of the note and the associated line. Any line points not being used should be set to -1.