gumbo.graphic.content
Interface LinkingGraphic

All Superinterfaces:
Graphic
All Known Subinterfaces:
KinkableGraphic
All Known Implementing Classes:
SwingGraphEdge

public interface LinkingGraphic
extends Graphic

A graphic capability allowing a graphic entity to link other graphic entities together through none or more ordered end points. The count and order of the end points are determined by the graphic and its topology, not the client. The client only has control of the shape's visual attributes (point position, decorations).

Typically, a linking graphic's geometry is rectilinear. If the graphic is also kinkable (see KinkableGraphic), the geometry could be curvileaner. The semantics of the link end points is defined by the graphic. A simple example of a link graphic is an arrow, with a tail (starting) end point and a head (ending) end point.

Version:
$Revision: 1.9 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Method Summary
 Size3 getGraphicLinkDecoSize(Size3 retVal)
          Gets the approximate size of the linking graphic decorations and, indirectly, the line width.
 Point3 getGraphicLinkEnd(int index, Point3 retVal)
          Gets the specified kink point in the kink point list.
 int getGraphicLinkEndCount()
          Gets the number of end points in the end point list.
 void setGraphicLinkDecoSize(Size3 size)
          Sets a hint for the size of the linking graphic decorations.
 void setGraphicLinkEnd(int index, Point3 point)
          Sets the specified end point in the end point list.
 
Methods inherited from interface gumbo.graphic.Graphic
getGraphic
 

Method Detail

getGraphicLinkEndCount

public int getGraphicLinkEndCount()
Gets the number of end points in the end point list.

Returns:
End point count.

setGraphicLinkEnd

public void setGraphicLinkEnd(int index,
                              Point3 point)
Sets the specified end point in the end point list.

Parameters:
index - Index of the point to set.
point - Value of the point. Never null.
Throws:
java.lang.IndexOutOfBoundsException - Index is outside the point list.

getGraphicLinkEnd

public Point3 getGraphicLinkEnd(int index,
                                Point3 retVal)
Gets the specified kink point in the kink point list.

Parameters:
index - Index of the point to get.
retVal - Return value object. Value of the point. Never null.
Returns:
Reference to retVal. Never null.
Throws:
java.lang.IndexOutOfBoundsException - Index is outside the point list.

setGraphicLinkDecoSize

public void setGraphicLinkDecoSize(Size3 size)
Sets a hint for the size of the linking graphic decorations. Typically set to less than one half the size of the gap between linkable shapes. Depending on the graphic, it may ignore the size or only use the smallest dimension, etc.

Parameters:
size - Value of the size (>=0). Never null.

getGraphicLinkDecoSize

public Size3 getGraphicLinkDecoSize(Size3 retVal)
Gets the approximate size of the linking graphic decorations and, indirectly, the line width. (See setGraphicLinkSize()).

Parameters:
retVal - Return value object. Value of the size. Never null.