| The Essential JViews Framework > Graphers > Managing Nodes and Links > Basic Grapher Link Class |
Basic Grapher Link Class |
INDEX
PREVIOUS
NEXT
|
Nodes in a grapher are connected with links. All links are instances of the class IlvLinkImage (or subclasses). The constructor of the class IlvLinkImage has two graphic objects as parameters, so, when creating a link, you always have to give the origin and destination of the link. Here is the constructor of IlvLinkImage:
IlvLinkImage(IlvGraphic from, IlvGraphic to, boolean oriented)
The oriented parameter specifies whether or not an arrowhead is to be drawn at one end of the link. Once a link is created, you can add it to the grapher using one of the following methods:
void addLink(IlvLinkImage obj, boolean redraw) void addLink(IlvLinkImage obj, int layer, boolean redraw)
Here is a small piece of code that creates a grapher, two nodes and a link:
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |