Last Updated: 3/4/97
Class NFDiagramApp

Class NFDiagramApp

public class NFDiagramApp extends Applet

This class supports the generation of diagrams that are defined by <applet> parameters in an HTML file. The user can reposition any node displayed in the diagram by dragging it with the mouse. All edges will be automatically adjusted.

The following standard parameters are supported by this chart:

 	Background

 	Header
 	HeaderBox
 	Footer
 	FooterBox
 	LeftTitle
 	LeftTitleBox
 	RightTitle
 	RightTitleBox

 	DwellLabel
 	DwellBox
 	ActiveClicks
 	ActiveLabels[1-50]

 	ColorTable

 	NoteSets
 	NoteSets[1-20]
 	NoteArrow
 	NoteAxis
 	NoteLabel
 	NoteBox

The following parameters are specifically supported by this chart:

Nodes = (node1 tuple), (node2 tuple), ...;

 	A diagram node will be displayed for each node tuple 
 	defined.  Each node tuple should be defined using the
 	following attributes:

 	"name"   - the name of the node.

 	"label"  - the string to be displayed in the node.
 		   Newlines (\n) may be used for multi-line 
 		   labels.

 	x, y     - center position of the node.

 	fg, bg   - foreground and background colors

 	"font"	 - font name

 	fontsize - font size

 	See NFLabel for more details concerning label attributes
 	and NFParam for more details concerning colors.

 	If a color is not specified in the vector, then the 
 	previously specified color will be used. If the color is
 	specified as "null", then a default color will be chosen
 	from the color table. (See the ColorTable parameter.)

Edges = (n1, n2, color, arrow), (n3, n4, color, arrow), ...;

 	An arrow will be drawn between each pair of nodes
 	defined in the Edges vector, using the given color.
 	The arrow attribute may be any of the following:

 		NONE   = No Arrow
 		FROMTO = Arrow from src node to dest node
 		TOFROM = Arrow from dest node to src node
 		BOTH   = Arrow in both directions

 	The default arrow value is FROMTO.

 	If a color is not specified in the vector, then the 
 	previously specified color will be used.  If no edge
 	color is specified for the first edge, blue will be 
 	assigned. If the color is specified as "null" for any 
 	edge, then a default color will be chosen from the color
 	table. (See the ColorTable parameter.)

For example, the following HTML segment defines a diagram with two nodes connected by a single arrow.

 	<applet code=NFDiagramApp.class width=400 height=400>
 	<param name=ParamScript	value='

 	Background = (yellow, RAISED, 10);

 	Nodes = ("n1", "Fred", 100, 100, white, red, "Courier", 20),
 		("n2", "Sally, 300, 100, black, white);

 	Edges = ("n1", "n2", blue);

 	'>
 	</applet>

Instance Variables

Type Name Description Default
NFDiagram diag Underlying diagram object