public class IlvLinkBundle extends IlvPolylineLinkImage implements IlvGraphicBag, IlvObjectWithSelection
IlvLinkBundle
class provides a link object that stores and
represents a bundle of individual links ("sublinks").
This link class can be used to force the display of a collection of links
between two nodes in a fixed order and with a specified distance between them.
A link bundle groups a number of links that are laid out in the order in which
they are added to the link bundle. The spacing between the links is known
as the link offset (see setOffset(double)
. This value is specific to each
link bundle: in the same grapher, different bundles can have different offsets.
The extremities of a link bundle and of the sublinks it gathers must match in the sense that, for each sublink, the origin and the destination nodes of the link must either:
The sublinks can be of any class. Notice however that the link
bundle must be allowed to move the points of the link (connection points
and intermediate points if any).
Hence, links of type
IlvOneLinkImage
,
IlvDoubleLinkImage
,
IlvOneSplineLinkImage
and
IlvDoubleSplineLinkImage
are usually not appropriate,
because they don't allow the intermediate points to be moved freely.
To obtain a consistent layout, it is not recommended to mix in the same
bundle spline links
(IlvSplineLinkImage
) with polyline
links (IlvPolylineLinkImage
and subclasses).
Either use only polyline links, or use only spline links for both the sublinks
and for the overview link. An overview link of type
IlvSplineLinkImage
should be
set on the link bundle when the sublinks are splines.
Also, a link connector class allowing the connection points to be moved freely must be installed either
IlvLinkConnector
.
The recommended link connector is
IlvClippingLinkConnector
.
Similar to submanagers and subgraphs, the link bundle has two states:
getFrame()
).getOverviewLink()
) is drawn,
instead of the individual sublinks. If no overview link is specified, the bundle is rendered
by the super class of IlvLinkBundle
, that is IlvPolylineLinkImage
.
The link bundle gives the sublinks a polyline shape when no overview link is
specified. If an overview link is specified, the shape of the sublinks depends
on the type of the specified overview link: spline shape for
IlvSplineLinkImage
and
subclasses, otherwise polyline shape.
The following code sample shows an example of how to build a link bundle:
// Create the origin and destination nodes of the link IlvGraphic origin = new IlvReliefRectangle(new IlvRect(50, 50, 40, 40)); IlvGraphic dest = new IlvReliefRectangle(new IlvRect(350, 50, 40, 40)); // Create the sublinks IlvLinkImage sublink1 = new IlvPolylineLinkImage(origin, dest, false, null); // If appropriate, some sublinks can have the reversed orientation: IlvLinkImage sublink2 = new IlvPolylineLinkImage(dest, origin, false, null); // Ensure that the connection points of all links can be freely moved // and are clipped on the border of their adjacent nodes. For instance: new IlvClippingLinkConnector(origin); new IlvClippingLinkConnector(dest); // Alternatively, if a different type of link connector is needed on links that // are not sublinks in bundles, the IlvClippingLinkConnector can be installed // directly on the sublinks of the bundle, while a different type of link // connector can exist on the nodes: // // new IlvClippingLinkConnector(sublink1, true); // origin of sublink1 // new IlvClippingLinkConnector(sublink1, false); // destination of sublink1 // new IlvClippingLinkConnector(sublink2, true); // origin of sublink2 // new IlvClippingLinkConnector(sublink2, false); // destination of sublink2 // // Note that it is not necessary and it is not recommended to install a // clipping connector on both the node and the sublinks. // Create the link bundle IlvLinkBundle linkBundle = new IlvLinkBundle(origin, dest, false); // Add the sublinks to the link bundle linkBundle.addSublink(sublink1); linkBundle.addSublink(sublink2); // Alternatively, and more efficiently, the sublinks can be specified // at once using the method addSublinks(IlvLinkImage[] sublinks). // Optional: specify the overview link linkBundle.setOverviewLink(new IlvPolylineLinkImage(origin, dest, false, null); // Add the nodes and links to the grapher grapher.addNode(origin, false); grapher.addNode(dest, false); grapher.addLink(linkBundle, false);
On links of the type
IlvEnhancedPolylineLinkImage
and subclasses,
a complementary bundling mechanism (with some restrictions) can
be activated using
IlvEnhancedPolylineLinkImage.setMultiLinkBundled(boolean)
.
See also IlvBundleLinkShapePolicy
.
Constructor and Description |
---|
IlvLinkBundle()
Creates a new empty
IlvLinkBundle instance. |
IlvLinkBundle(IlvGraphic from,
IlvGraphic to,
boolean oriented)
Creates a new
IlvLinkBundle instance with
no intermediate points and no overview link. |
IlvLinkBundle(IlvGraphic from,
IlvGraphic to,
boolean oriented,
IlvPoint[] points)
Creates a new
IlvLinkBundle instance with no
overview link. |
IlvLinkBundle(IlvGraphic from,
IlvGraphic to,
boolean oriented,
IlvPoint[] points,
IlvLinkImage overviewLink)
Creates a new
IlvLinkBundle instance. |
IlvLinkBundle(IlvInputStream stream)
Reads the object from an
IlvInputStream . |
IlvLinkBundle(IlvLinkBundle source)
Creates an
IlvLinkBundle by copying an existing one. |
Modifier and Type | Method and Description |
---|---|
void |
addLinkBundleSelectionChangedListener(LinkBundleSelectionChangedListener listener)
Adds the specified listener to receive events from the link bundle when
the selection of sublinks changes.
|
void |
addObject(IlvGraphic obj,
boolean redraw)
You should not call this method.
|
void |
addSublink(IlvLinkImage sublink)
Adds a sublink at the end of the link bundle.
|
void |
addSublink(int index,
IlvLinkImage sublink)
Adds a sublink at the specified index in the link bundle.
|
boolean |
allowsPointInsertion()
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
boolean |
allowsPointMove(int index)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
boolean |
allowsPointRemoval()
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
void |
applyToObject(IlvGraphic obj,
IlvApplyObject f,
Object arg,
boolean redraw)
Applies a method to an object of this bag, that is to a sublink
of this link bundle.
|
IlvRect |
boundingBox(IlvTransformer t)
Returns the bounding rectangle of the link bundle.
|
boolean |
contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if a point lies within the outline of the link.
|
boolean |
containsFrame(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if the specified point lie within the link bundle frame.
|
IlvGraphic |
copy()
Copies the object.
|
void |
deSelectAll()
Deselects all the sublinks in the link bundle.
|
void |
deSelectAll(boolean traverse)
Deselects all the sublinks in the link bundle.
|
void |
deSelectAll(boolean traverse,
boolean redraw)
Deselects all the sublinks in the link bundle.
|
void |
draw(Graphics dst,
IlvTransformer t)
Draws the link bundle.
|
void |
ensureClippingLinkConnector(boolean traverse,
boolean redraw)
Ensures that a clip link connector is installed at the link bundle and
all sublinks.
|
IlvGraphicVector |
getAllSelectableObjects(IlvPoint p,
IlvManagerView view,
IlvTransformer t,
boolean traverse,
boolean includeParentsIfInnerFound)
Returns all selectable object at the given point.
|
IlvObjectWithSelection |
getCollapseExpandObject(IlvPoint p,
IlvManagerView view,
IlvTransformer t,
boolean traverse)
Returns the first object that should change its collapsed state
when clicking at the input point.
|
void |
getConnectionPoints(IlvPoint src,
IlvPoint dst,
IlvTransformer t)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
IlvPoint |
getConnectionReferencePoint(boolean origin,
IlvTransformer t)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
int |
getEndCap()
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
Color |
getForeground()
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
IlvLinkBundleFrame |
getFrame()
Returns the frame of the link bundle or
null . |
int |
getLineJoin()
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
float[] |
getLineStyle()
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
double |
getLineWidth()
Returns the line width of the object.
|
double |
getLineWidth(IlvTransformer t)
Returns the line width that is actually displayed when the link bundle is drawn
with the specified transformer.
|
double |
getLineWidth(IlvTransformer t,
boolean includingFrameMargin)
Returns the line width that is actually displayed when the
link bundle is drawn with the specified transformer.
|
IlvGraphicEnumeration |
getLinkBundles()
Returns an enumeration of all the link bundles that have
been added as sublinks in this link bundle.
|
int |
getLinkBundlesCount()
Returns the number of link bundles that have
been added in this link bundle.
|
IlvPoint[] |
getLinkPoints(IlvTransformer t)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
double |
getMaximumLineWidth()
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
IlvGraphic |
getObject(String name)
Returns the sublink or overview link with the specified name, or
null if there
is no sublink with this name and the overview link does not have this name. |
String |
getObjectName(IlvGraphic obj)
Returns the name of the specified graphic object.
|
IlvGraphicEnumeration |
getObjects()
You should not call this method.
|
double |
getOffset()
Returns the offset between the individual links of the bundle.
|
double |
getOverviewLineWidth()
Returns the line width of the bundle when it is in collapsed state.
|
IlvLinkImage |
getOverviewLink()
Returns the overview link.
|
IlvPoint |
getPointAt(int index,
IlvTransformer t)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
int |
getPointsCardinal()
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
JPopupMenu |
getPopupMenu(IlvPoint p,
IlvTransformer t,
IlvManagerView view,
IlvPopupMenuManager popupManager)
Returns the Swing pop-up menu to display when the pop-up is triggered.
|
IlvLinkBundle |
getRootLinkBundle()
Returns the root link bundle.
|
IlvManager |
getRootManager()
Returns the manager which contains the root link bundle, or
null if
the root link bundle is null or is not contained in a manager. |
IlvGraphic |
getSelectableObject(IlvPoint p,
IlvManagerView view,
IlvTransformer t,
boolean traverse)
Returns the first selectable object at the given point.
|
IlvGraphicEnumeration |
getSelectedObjects()
Returns an enumeration of all the selected sublinks of this link bundle.
|
int |
getSelectedObjectsCount()
Returns the number of selected sublinks of this link bundle.
|
IlvGraphicEnumeration |
getSelectedSublinks()
Returns an enumeration of all the selected sublinks of this link bundle.
|
IlvGraphicEnumeration |
getSelectedSublinks(boolean traverse)
Returns an enumeration of all the selected
sublinks in this link bundle.
|
int |
getSelectedSublinksCount()
Returns the number of selected sublinks of this link bundle.
|
int |
getSelectedSublinksCount(boolean traverse)
Returns the number of selected sublinks.
|
IlvSelection |
getSelection(IlvLinkImage sublink)
Returns the selection object (instance of
IlvSelection )
associated with the specified sublink, or null
if the sublink is not selected. |
IlvSelection |
getSelection(IlvPoint tp,
IlvTransformer t)
Returns the selection object (instance of
IlvSelection )
located at the specified transformed point. |
IlvSelection |
getSelection(IlvPoint tp,
IlvTransformer t,
boolean traverse)
Returns the selection object (instance of
IlvSelection )
located at the specified transformed point. |
IlvSelectionFactory |
getSelectionFactory()
Returns the selection factory installed in the grapher that contains the
root link bundle of this link bundle, or
null if no
factory is installed or the link bundle is not added to a grapher. |
IlvLinkImage |
getSublink(IlvPoint tp,
IlvTransformer t)
Returns the sublink located at the specified transformed point, or
null if any. |
IlvLinkImage |
getSublink(IlvPoint tp,
IlvTransformer t,
boolean traverse)
Returns the sublink located at the specified transformed point, or
null if any. |
IlvLinkImage |
getSublink(int index)
Returns the sublink of this bundle at the given position.
|
IlvLinkImage[] |
getSublinks()
Returns the sublinks of this object.
|
int |
getSublinksCount()
Returns the number of sublinks of this link bundle.
|
IlvGraphicEnumeration |
getSublinksEnum()
Returns an enumeration of the sublinks of this link bundle.
|
String |
getToolTipText()
Returns the tooltip text set by
setToolTipText(java.lang.String) . |
String |
getToolTipText(IlvPoint p,
IlvTransformer t)
Returns the tooltip text to display when the mouse
pointer is at a specified location inside the link bundle.
|
Object |
getTreeLock()
Returns the object used to synchronize the content of the link bundle
for multi-threaded environment.
|
void |
insertPoint(int index,
double x,
double y,
IlvTransformer t)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
void |
invalidateLayout()
Invalidates the internal layout of this link bundle.
|
boolean |
isCollapsed()
Returns the collapsed/expanded status of the link bundle.
|
boolean |
isCollapsible()
Returns whether the object can be collapsed or expanded.
|
boolean |
isLayoutValid()
Determines whether the internal layout of this link bundle is valid.
|
boolean |
isOriented()
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
boolean |
isSelected(IlvGraphic object)
Returns
true if the specified object is selected. |
boolean |
isSelected(IlvLinkImage sublink)
Returns
true if the specified sublink is selected. |
boolean |
isSelectionAdjusting()
Returns whether we are currently selecting or deselecting a series of
sublinks.
|
boolean |
isSingleConnectionPoint()
Returns
true if the single connection point mode is
enabled, and returns false otherwise. |
IlvSelection |
makeSelection()
Creates a selection object for this object.
|
void |
moveObject(IlvGraphic obj,
double x,
double y,
boolean redraw)
Changes the location of a graphic object.
|
void |
movePoint(int index,
double x,
double y,
IlvTransformer t)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
boolean |
pointsInBBox()
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
void |
reDrawObj(IlvGraphic obj)
Redraws a graphic object contained in the set.
|
void |
reDrawRegion(IlvRegion region)
Redraws a region of the link bundle.
|
void |
removeLinkBundleSelectionChangedListener(LinkBundleSelectionChangedListener listener)
Removes the specified selection listener so that it no longer
receives events from the link bundle when the selection of sublinks changes.
|
void |
removeObject(IlvGraphic obj,
boolean redraw)
You should not call this method.
|
void |
removePoint(int index,
IlvTransformer t)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
void |
removeSublink(IlvLinkImage sublink)
Removes a sublink from the link bundle.
|
void |
reshapeObject(IlvGraphic obj,
IlvRect newrect,
boolean redraw)
Changes the size of a graphic object located in the link bundle.
|
void |
selectAll()
Selects all the visible sublinks in this link bundle.
|
void |
selectAll(boolean traverse)
Selects all the visible sublinks in the link bundle.
|
void |
selectAll(boolean traverse,
boolean redraw)
Selects all the visible sublinks in this link bundle.
|
protected void |
selectionChanged(IlvLinkImage sublink)
Called when a selection changes in the
link bundle.
|
void |
setCollapsed(boolean collapsed)
Collapses or expands the link bundle.
|
void |
setEndCap(int endCap)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
void |
setForeground(Color c)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
void |
setFrame(IlvLinkBundleFrame frame)
Sets the frame of the link bundle.
|
void |
setGraphicBag(IlvGraphicBag bag)
Changes the bag that contains the link bundle.
|
void |
setIntermediateLinkPoints(IlvPoint[] points,
int index,
int length)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
void |
setLineJoin(int lineJoin)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
void |
setLineStyle(float[] lineStyle)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
void |
setLineWidth(double lineWidth)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
void |
setMaximumLineWidth(double maximumLineWidth)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
boolean |
setObjectName(IlvGraphic obj,
String name)
Changes the name of a sublink or overview link of this link bundle.
|
void |
setOffset(double offset)
Sets the offset between the individual links of the bundle.
|
void |
setOriented(boolean oriented)
This method delegates to the link supplied with the method
setOverviewLink(ilog.views.IlvLinkImage) . |
void |
setOverviewLink(IlvLinkImage link)
Sets the link responsible for the rendering of the link bundle in
collapsed state (see
isCollapsed() ). |
void |
setSelected(IlvGraphic sublink,
boolean select,
boolean redraw)
Selects or deselects the specified sublink.
|
void |
setSelected(IlvGraphic obj,
IlvPoint p,
IlvManagerView view)
Selects the specified sublink.
|
void |
setSelected(IlvLinkImage sublink,
boolean select)
Selects or deselects the specified sublink.
|
void |
setSelectionAdjusting(boolean set)
Starts a series of selection events.
|
void |
setSelectionEventSource(Object source)
Changes the source for selection events.
|
void |
setSingleConnectionPoint(boolean single)
Enables the single connection point mode.
|
void |
setSublink(int index,
IlvLinkImage sublink)
Sets the given sublink at the supplied position.
|
void |
setSublinks(IlvLinkImage[] sublinks)
Sets a new collection of sublinks for this link bundle.
|
void |
setToolTipText(String text)
Sets the text to display in the tooltip of this link bundle.
|
void |
write(IlvOutputStream stream)
Writes the object to an
IlvOutputStream . |
boolean |
zoomable()
Returns
false , since this graphic object is not zoomable. |
applyTransform
arrowBBox, arrowContains, drawArrow, finalize, getArrowSize, getFrom, getFromBoundingBox, getFromTransformer, getLinkConnectorConnectionPoint, getLinkPoints, getLocalTransformerOf, getOpposite, getTo, getToBoundingBox, getToTransformer, getVisibleFrom, getVisibleTo, isPersistent, isSpline, setFrom, setLinkPoints, setTo
addActionListener, addNamedPropertyListener, allViewsRemoved, baseTextDirectionChanged, blinkingStateOn, boundingBox, callDraw, componentOrientationChanged, getAndAssociateObjectInteractor, getBaseTextDirection, getBlinkingAction, getBlinkingObjectOwner, getBlinkingOffPeriod, getBlinkingOnPeriod, getCenter, getComponentOrientation, getDefaultInteractor, getGraphicBag, GetGraphicObject, getIntersectionWithOutline, getLocale, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenuName, getProperty, getResolvedBaseTextDirection, getToolTipBaseTextDirection, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, getULocale, getZOrderIndex, hasProperty, inside, intersects, invalidateBBoxCache, invalidateBidiCache, isBaseTextDirectionSensitive, isComponentOrientationSensitive, isDataFlavorSupported, isEditable, isInApplyToObject, isLocaleSensitive, isMovable, isSelectable, isVisible, localeChanged, move, move, moveResize, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, reDraw, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBackground, setBaseTextDirection, setBaseTextDirectionDuringConstruction, setBlinkingAction, setBlinkingOffPeriod, setBlinkingOnPeriod, setEditable, setFillOn, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipBaseTextDirection, setVisible, setZOrderIndex, toString, translate, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemoved
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getGraphicBag
public IlvLinkBundle()
IlvLinkBundle
instance.
This default bean constructor exists only for internal use. Do not call it.public IlvLinkBundle(IlvGraphic from, IlvGraphic to, boolean oriented)
IlvLinkBundle
instance with
no intermediate points and no overview link.from
- The origin node of the bundle.to
- The destination node of the bundle.oriented
- If true
, an arrow is drawn at the
destination point.public IlvLinkBundle(IlvGraphic from, IlvGraphic to, boolean oriented, IlvPoint[] points)
IlvLinkBundle
instance with no
overview link.from
- The origin node of the bundle.to
- The destination node of the bundle.oriented
- If true
, an arrow is drawn at the
destination point.points
- The intermediate points of the polylink. If the array is
null
or its length is 0, the link is created
without intermediate points.public IlvLinkBundle(IlvGraphic from, IlvGraphic to, boolean oriented, IlvPoint[] points, IlvLinkImage overviewLink)
IlvLinkBundle
instance.from
- The origin node of the bundle.to
- The destination node of the bundle.oriented
- If true
, an arrow is drawn at the
destination point.points
- The intermediate points of the polylink. If the array is
null
or its length is 0, the link is created
without intermediate points.overviewLink
- The overview link (see setOverviewLink(ilog.views.IlvLinkImage)
).public IlvLinkBundle(IlvInputStream stream) throws IlvReadFileException
IlvInputStream
.stream
- The input stream.IlvReadFileException
- if the format is not correct.public IlvLinkBundle(IlvLinkBundle source)
IlvLinkBundle
by copying an existing one.source
- The origin of the copy.public IlvGraphic copy()
copy
in class IlvPolylineLinkImage
IlvGraphic
instance.IlvGraphic
public final IlvGraphicEnumeration getLinkBundles()
IlvLinkBundle
objects
added in this link bundle.public final int getLinkBundlesCount()
public void setGraphicBag(IlvGraphicBag bag)
IlvGraphicBag
such as an
IlvGrapher
. It is also used when the link bundle
is added to, or removed from, the sublinks of another link bundle.
You should not call this method directly unless you are
creating a new type of bag.
This method checks that the link bundle is added in a bag that
is either an IlvGrapher
or an IlvLinkBundle
.
Other bags are not allowed.
setGraphicBag
in class IlvGraphic
bag
- The graphic bag.IlvGraphic
public final Object getTreeLock()
public final IlvLinkBundle getRootLinkBundle()
null
. Otherwise, it returns the
link bundle which is on top of the containment hierarchy.public final IlvManager getRootManager()
null
if
the root link bundle is null
or is not contained in a manager.public final void setOverviewLink(IlvLinkImage link)
isCollapsed()
).
By default, there is no overview link and the method getOverviewLink()
returns null
. In this case, the rendering of the link bundle
in collapsed state is done by the link bundle class itself.
When a link bundle has an overview link, any modification of the points of the link bundle is replicated by the link bundle on the overview link. Hence, the connection points and the intermediate points of the link bundle are always the same as those of the overview link.
To remove the overview link that has been previously specified, you
can call this method with a null
argument.
The following properties of the supplied link (if not null
):
IlvLinkBundle
instance.
Note that a call to this method can modify the bounding box of
the link bundle.
For this reason, if the link bundle is contained inside an
IlvGraphicBag
, this method can be called only using the method
IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the graphic bag.
setCollapsed(boolean)
,
getOverviewLink()
public final IlvLinkImage getOverviewLink()
setOverviewLink(ilog.views.IlvLinkImage)
public void addObject(IlvGraphic obj, boolean redraw)
addSublink(IlvLinkImage)
. To specify the overview link,
use the method setOverviewLink(ilog.views.IlvLinkImage)
.addObject
in interface IlvGraphicBag
obj
- The graphic object.redraw
- If true
the object is redrawn.public void removeObject(IlvGraphic obj, boolean redraw)
removeSublink(ilog.views.IlvLinkImage)
.removeObject
in interface IlvGraphicBag
obj
- The graphic object.redraw
- If true
the object is redrawn.public void addSublink(IlvLinkImage sublink)
IlvLinkBundle
at the same time.
The sublinks can be of any class. Notice however that the link bundle
must be allowed to move the points of the link (connection points and
intermediate points if any).
Hence, links of type
IlvOneLinkImage
,
IlvDoubleLinkImage
,
IlvOneSplineLinkImage
and
IlvDoubleSplineLinkImage
are usually not appropriate,
because they don't allow the intermediate points to be moved freely.
To obtain a consistent layout, it is not recommended to mix in the same bundle
spline links
(IlvSplineLinkImage
) with polyline
links (IlvSplineLinkImage
etc.).
Either use only polyline links, or use only spline links for both the sublinks
and for the overview link. An overview link of type
IlvSplineLinkImage
should be
set on the link bundle when the sublinks are splines.
Also, a link connector class allowing the connection points to be moved freely must be installed either
IlvLinkConnector
.
The recommended link connector is
IlvClippingLinkConnector
.
Note that a call to this method can modify the bounding box of
the link bundle.
For this reason, if the link bundle is contained inside an
IlvGraphicBag
, this method can be called only using the method
IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the graphic bag.
sublink
- The sublink to be added. The value null
is
not allowed.public void addSublink(int index, IlvLinkImage sublink)
Note that a sublink can be contained in only one link bundle,
and the sublink cannot be contained by a grapher and a
IlvLinkBundle
at the same time.
The sublinks can be of any class. Notice however that the link bundle
must be allowed to move the points of the link (connection points and
intermediate points if any).
Hence, links of type
IlvOneLinkImage
,
IlvDoubleLinkImage
,
IlvOneSplineLinkImage
and
IlvDoubleSplineLinkImage
are usually not appropriate,
because they don't allow the intermediate points to be moved freely.
To obtain a consistent layout, it is not recommended to mix in the same bundle
spline links
(IlvSplineLinkImage
) with polyline
links (IlvSplineLinkImage
etc.).
Either use only polyline links, or use only spline links for both the sublinks
and for the overview link. An overview link of type
IlvSplineLinkImage
should be
set on the link bundle when the sublinks are splines.
Also, a link connector class allowing the connection points to be moved freely must be installed either
IlvClippingLinkConnector
.
Note that a call to this method can modify the bounding box of
the link bundle.
For this reason, if the link bundle is contained inside an
IlvGraphicBag
, this method can be called only using the method
IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the graphic bag.
index
- The index at which the specified sublink is to be
inserted. If the index is equal to getSublinksCount(),
the specified sublink is added to the end.sublink
- The sublink. The value null
is not allowed.IndexOutOfBoundsException
- if index
is out
of range (index< 0 || index >= getSublinksCount()).public void removeSublink(IlvLinkImage sublink)
Note that a call to this method can modify the bounding box of
the link bundle.
For this reason, if the link bundle is contained inside an
IlvGraphicBag
, this method can be called only using the method
IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the graphic bag.
sublink
- The sublink.public IlvLinkImage getSublink(IlvPoint tp, IlvTransformer t)
null
if any.tp
- The point transformed by t
.t
- The transformer used to draw the object.getSublink(IlvPoint, IlvTransformer, boolean)
public IlvLinkImage getSublink(IlvPoint tp, IlvTransformer t, boolean traverse)
null
if any.
This method will traverse the link bundles that have been added as sublinks in this
link bundle if the traverse
parameter is set to true
.tp
- The point transformed by t
.t
- The transformer used to draw the object.traverse
- If true
, this method will recursively traverse
the link bundles added as sublinks of this link bundle to find the
sublink located at the specified point.getSublink(IlvPoint, IlvTransformer)
,
getSelection(IlvPoint, IlvTransformer)
,
getSelection(IlvPoint, IlvTransformer, boolean)
,
getLinkBundles()
public IlvObjectWithSelection getCollapseExpandObject(IlvPoint p, IlvManagerView view, IlvTransformer t, boolean traverse)
null
if no object is found.
getCollapseExpandObject
in interface IlvObjectWithSelection
p
- The point in the view coordinate system.view
- The view. Can be null
.t
- The transformer to draw this link bundle.traverse
- If true
, the method
will also search recursively the subobjects contained in
subobjects of this object, unless they are collapsed.public IlvGraphic getSelectableObject(IlvPoint p, IlvManagerView view, IlvTransformer t, boolean traverse)
getSelectableObject
in interface IlvObjectWithSelection
p
- The point in the view coordinates system.view
- The view. Can be null
.t
- The transformer to draw this link bundle.traverse
- If true
, the method
will also search recursively the subobjects contained in
subobjects of this object, unless they are collapsed.public IlvGraphicVector getAllSelectableObjects(IlvPoint p, IlvManagerView view, IlvTransformer t, boolean traverse, boolean includeParentsIfInnerFound)
getAllSelectableObjects
in interface IlvObjectWithSelection
p
- The point in the view coordinates system.view
- The view. Can be null
.t
- The transformer to draw this link bundle.traverse
- If true
, the method
will also search recursively the subobjects contained in
subobjects of this object, unless they are collapsed.includeParentsIfInnerFound
- If false
, the
result will contain an object of type IlvObjectWithSelection
* located at the input point only if it does not contain any subobjects * of the object. If true
, the result will contain an object * of type IlvObjectWithSelection
at the input point even if * it also contains subobjects of the object.public IlvSelection getSelection(IlvPoint tp, IlvTransformer t)
IlvSelection
)
located at the specified transformed point.tp
- The transformed point.t
- The transformer used for drawing the object.getSelection(IlvPoint, IlvTransformer, boolean)
,
getSublink(IlvPoint, IlvTransformer)
,
getSublink(IlvPoint, IlvTransformer, boolean)
,
setSelected(ilog.views.IlvLinkImage, boolean)
public IlvSelection getSelection(IlvPoint tp, IlvTransformer t, boolean traverse)
IlvSelection
)
located at the specified transformed point. If the
traverse
parameter is set to true
, this method
will traverse the link bundles added in this link bundle.tp
- The transformed point.t
- The transformer used for drawing the object.traverse
- If true
, the method will recursively traverse
the link bundles added in this link bundle to find the selection object
located at the specified point.getSublink(IlvPoint, IlvTransformer)
,
getSublink(IlvPoint, IlvTransformer, boolean)
,
setSelected(ilog.views.IlvLinkImage, boolean)
,
getLinkBundles()
public IlvGraphic getObject(String name)
null
if there
is no sublink with this name and the overview link does not have this name.getObject
in interface IlvGraphicBag
name
- The name.getObjectName(ilog.views.IlvGraphic)
,
setObjectName(ilog.views.IlvGraphic, java.lang.String)
public boolean setObjectName(IlvGraphic obj, String name)
false
if an object
already has the specified name. In this case the name is not changed.setObjectName
in interface IlvGraphicBag
obj
- The graphic object. This object must be already
added to this link bundle (as a sublink or as its overview link);
otherwise, an IllegalArgumentException
is thrown.name
- The desired name.false
if the name could not be changed.getObjectName(ilog.views.IlvGraphic)
,
getObject(java.lang.String)
public String getObjectName(IlvGraphic obj)
setObjectName
, then this
method returns null
.obj
- The graphic object.setObjectName(ilog.views.IlvGraphic, java.lang.String)
,
getObject(String)
public JPopupMenu getPopupMenu(IlvPoint p, IlvTransformer t, IlvManagerView view, IlvPopupMenuManager popupManager)
getPopupMenu
in class IlvGraphic
p
- The location of the mouse in view coordinates.t
- The transformer that converts the manager coordinates of this
object into the coordinate system of the manager view in which the pop-up
menu will be displayed (the view coordinates).view
- The manager view that triggered the pop-up menu.popupManager
- The pop-up menu manager.null
.IlvGraphic
,
IlvPopupMenuManager.registerView(ilog.views.IlvManagerView)
,
IlvGraphic.getPopupMenu()
public void setToolTipText(String text)
Tooltips for Rogue Wave JViews graphic objects will work only
if your manager view is contained in a hierarchy of Swing components.
In addition, you must enable the tooltip mechanism for the manager view
by calling the static method
IlvToolTipManager.registerView(IlvManagerView)
.
setToolTipText
in class IlvGraphic
text
- The tooltip string to display. If text
is
null
, the tooltip is turned off for this link bundle.IlvToolTipManager
,
getToolTipText()
,
getToolTipText(IlvPoint, IlvTransformer)
public String getToolTipText()
setToolTipText(java.lang.String)
.getToolTipText
in class IlvGraphic
null
.getToolTipText(IlvPoint, IlvTransformer)
public String getToolTipText(IlvPoint p, IlvTransformer t)
setCollapsed(boolean)
,
the method returns the tooltip of a sublink over which the
point is located, if any. Otherwise, it returns the tooltip
of the link bundle itself.
You can override this method to display different tooltip texts over different parts of your link bundle object.
If this method returns null
, no tooltip is shown for this
link bundle.
Note that you must enable the tooltip mechanism for the manager view
by calling the static method
IlvToolTipManager.registerView(IlvManagerView)
.
getToolTipText
in class IlvGraphic
p
- The location of the mouse (in view coordinates).t
- The transformer of the manager view in which the tooltip
is about to be displayed.p
for transformation
t
, or null
if no tooltip should be displayed.getToolTipText()
public void setSelected(IlvLinkImage sublink, boolean select)
When a sublink is selected, another graphic object
is created to show that this object is selected. This
new graphic object is called the selection object and is
an instance of the class IlvSelection
.
If a selection factory is installed on the grapher that contains
the bundle
(see setSelectionFactory
), this
factory is responsible for creating the selection object. The same
holds for nested bundles: a bundle used as sublink inside another bundle
uses the factory of the grapher that contains the root bundle.
Otherwise, the method makeSelection
of the class IlvGraphic
is called.
This method also fires a
LinkBundleSelectionChangedEvent
event
by calling the method selectionChanged
.
Note that selecting or deselecting a sublink can change the bounding box of the
link bundle and if the link bundle is contained inside an
IlvGraphicBag
, this method can be called only using the method
IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the graphic bag.
If you need to select only one link at a time, you can more conveniently
use the method setSelected(IlvGraphic, boolean, boolean)
which calls IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
automatically.
sublink
- The graphic object to select or deselect.select
- If true
the object will be selected,
and deselected otherwise.isSelected(ilog.views.IlvLinkImage)
,
getSelection(IlvLinkImage)
,
selectAll()
,
selectAll(boolean)
,
deSelectAll()
,
getSelectedSublinks()
,
getSelectedSublinksCount()
,
addLinkBundleSelectionChangedListener(ilog.views.graphic.linkbundle.event.LinkBundleSelectionChangedListener)
,
removeLinkBundleSelectionChangedListener(ilog.views.graphic.linkbundle.event.LinkBundleSelectionChangedListener)
public void setSelected(IlvGraphic sublink, boolean select, boolean redraw)
IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
to call setSelected(IlvLinkImage, boolean)
.
setSelected
in interface IlvObjectWithSelection
sublink
- The graphic object to select or deselect.select
- If true
the object will be selected,
and deselected otherwise.redraw
- Whether the object must be redrawn.setSelected(IlvLinkImage, boolean)
public void setSelected(IlvGraphic obj, IlvPoint p, IlvManagerView view)
The default implementation calls
setSelected(obj, true, true)
.
Subclasses can override this method to select subparts of the input
object located on the input point.
setSelected
in interface IlvObjectWithSelection
obj
- The object to be selected.p
- The point in the manager view where the mouse click occurred.view
- The view currently handled by the select interactor.setSelected(IlvGraphic, boolean, boolean)
protected void selectionChanged(IlvLinkImage sublink)
sublink
- The selected or deselected sublink.setSelected(ilog.views.IlvLinkImage, boolean)
,
addLinkBundleSelectionChangedListener(ilog.views.graphic.linkbundle.event.LinkBundleSelectionChangedListener)
,
removeLinkBundleSelectionChangedListener(ilog.views.graphic.linkbundle.event.LinkBundleSelectionChangedListener)
public void selectAll()
Note that selecting or deselecting a sublink can change the bounding
box of the link bundle and if the link bundle is contained inside an
IlvGraphicBag
, this method can be called only using the method
IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the graphic bag.
You can more conveniently
use the method selectAll(boolean, boolean)
which calls IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
automatically.
public void selectAll(boolean traverse)
Note that selecting or deselecting a sublink can change the bounding
box of the link bundle and if the link bundle is contained inside an
IlvGraphicBag
, this method can be called only using the method
IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the graphic bag.
You can more conveniently
use the method selectAll(boolean, boolean)
which calls IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
automatically.
traverse
- If true
, the method
will also select recursively the sublinks in the link bundles added
as sublinks of this link bundle./isSelected(ilog.views.IlvLinkImage)
,
setSelected(ilog.views.IlvLinkImage, boolean)
,
getSelection(IlvLinkImage)
,
deSelectAll()
,
selectAll()
,
selectAll(boolean, boolean)
,
getSelectedSublinks(boolean)
,
getLinkBundles()
public void selectAll(boolean traverse, boolean redraw)
IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
to call selectAll(boolean)
.
selectAll
in interface IlvObjectWithSelection
traverse
- If true
, the method
will also select recursively the sublinks in the link bundles added
as sublinks of this link bundle./redraw
- Whether the object must be redrawn.selectAll(boolean)
public void deSelectAll()
Note that selecting or deselecting a sublink can change the bounding
box of the link bundle and if the link bundle is contained inside an
IlvGraphicBag
, this method can be called only using the method
IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the graphic bag.
You can more conveniently
use the method deSelectAll(boolean, boolean)
which calls IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
automatically.
public void deSelectAll(boolean traverse)
traverse
parameter is set to
true
.
Note that selecting or deselecting a sublink can change the bounding
box of the link bundle and if the link bundle is contained inside an
IlvGraphicBag
, this method can be called only using the method
IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the graphic bag.
You can more conveniently
use the method deSelectAll(boolean, boolean)
which calls IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
automatically.
traverse
- If true
, the method will also deselect
recursively the link bundles added in this link bundle.isSelected(ilog.views.IlvLinkImage)
,
setSelected(ilog.views.IlvLinkImage, boolean)
,
getSelection(IlvLinkImage)
,
deSelectAll()
,
deSelectAll(boolean, boolean)
,
selectAll()
,
selectAll(boolean)
,
getSelectedSublinks(boolean)
,
getLinkBundles()
public void deSelectAll(boolean traverse, boolean redraw)
traverse
parameter is set to
true
.
This convenience method uses IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
to call deSelectAll(boolean)
.
deSelectAll
in interface IlvObjectWithSelection
traverse
- If true
, the method will also deselect
recursively the link bundles added in this link bundle.redraw
- Whether the object must be redrawn.deSelectAll(boolean)
public IlvSelectionFactory getSelectionFactory()
null
if no
factory is installed or the link bundle is not added to a grapher.public void setSelectionEventSource(Object source)
setSelectionEventSource
in interface IlvObjectWithSelection
public void setSelectionAdjusting(boolean set)
true
when you want upcoming
selection or deselection of sublinks to be
considered as a single selection event.
In this case, events of the class LinkBundleSelectionChangedEvent
sent by the method setSelected
will return true
to a call of LinkBundleSelectionChangedEvent.isAdjusting()
, meaning
that they are part of a series of events.
When you have finished selecting or deselecting the series
of sublinks, you must call the method with the parameter set
to false
.setSelectionAdjusting
in interface IlvObjectWithSelection
LinkBundleSelectionChangedEvent.isAdjusting()
,
LinkBundleSelectionChangedEvent.isAdjustmentEnd()
public boolean isSelectionAdjusting()
isSelectionAdjusting
in interface IlvObjectWithSelection
setSelectionAdjusting(boolean)
public void addLinkBundleSelectionChangedListener(LinkBundleSelectionChangedListener listener)
listener
- The listener.removeLinkBundleSelectionChangedListener(ilog.views.graphic.linkbundle.event.LinkBundleSelectionChangedListener)
,
setSelected(ilog.views.IlvLinkImage, boolean)
,
selectionChanged(IlvLinkImage)
public void removeLinkBundleSelectionChangedListener(LinkBundleSelectionChangedListener listener)
listener
- The listener.addLinkBundleSelectionChangedListener(ilog.views.graphic.linkbundle.event.LinkBundleSelectionChangedListener)
,
setSelected(ilog.views.IlvLinkImage, boolean)
,
selectionChanged(IlvLinkImage)
public final IlvGraphicEnumeration getSelectedSublinks()
public final IlvGraphicEnumeration getSelectedObjects()
getSelectedSublinks()
.getSelectedObjects
in interface IlvObjectWithSelection
public final IlvGraphicEnumeration getSelectedSublinks(boolean traverse)
traverse
is set to
true
.traverse
- If true
, the method will also return the
selected sublinks of link bundles added in this link bundle
recursively.
Be cautioned that you should not select, deselect, remove, or add
any sublink while using the returned enumeration.isSelected(ilog.views.IlvLinkImage)
,
setSelected(ilog.views.IlvLinkImage, boolean)
,
getSelection(IlvLinkImage)
,
selectAll()
,
selectAll(boolean)
,
getSelectedSublinks()
,
getSelectedSublinksCount(boolean)
,
getLinkBundles()
public final int getSelectedSublinksCount()
public final int getSelectedObjectsCount()
getSelectedSublinksCount()
.getSelectedObjectsCount
in interface IlvObjectWithSelection
public final int getSelectedSublinksCount(boolean traverse)
traverse
is set
to true
.traverse
- If true
, the method
will count the selected sublinks of link bundles added
in this link bundle recursively.isSelected(ilog.views.IlvLinkImage)
,
setSelected(ilog.views.IlvLinkImage, boolean)
,
getSelection(IlvLinkImage)
,
deSelectAll()
,
selectAll()
,
selectAll(boolean)
,
getSelectedSublinks(boolean)
,
getLinkBundles()
public boolean isSelected(IlvLinkImage sublink)
true
if the specified sublink is selected.sublink
- The sublink.setSelected(ilog.views.IlvLinkImage, boolean)
,
getSelection(IlvLinkImage)
public boolean isSelected(IlvGraphic object)
true
if the specified object is selected.
This is the same as isSelected(IlvLinkImage)
.isSelected
in interface IlvObjectWithSelection
object
- The sublink.setSelected(ilog.views.IlvLinkImage, boolean)
public final IlvSelection getSelection(IlvLinkImage sublink)
IlvSelection
)
associated with the specified sublink, or null
if the sublink is not selected.sublink
- The sublink.setSelected(ilog.views.IlvLinkImage, boolean)
public void setOffset(double offset)
offset
- The offset valuegetOffset()
public double getOffset()
setOffset(double)
public void setSingleConnectionPoint(boolean single)
false
.isSingleConnectionPoint()
public boolean isSingleConnectionPoint()
true
if the single connection point mode is
enabled, and returns false
otherwise.setSingleConnectionPoint(boolean)
public void setCollapsed(boolean collapsed)
setCollapsed
in interface IlvObjectWithSelection
collapsed
- When set to true
, the link bundle is collapsed.
Otherwise, the link bundle is expanded.isCollapsed()
public boolean isCollapsed()
isCollapsed
in interface IlvObjectWithSelection
setCollapsed(boolean)
public final boolean isCollapsible()
isCollapsible
in interface IlvObjectWithSelection
public void draw(Graphics dst, IlvTransformer t)
draw
in class IlvLinkImage
dst
- The destination Graphics.t
- The transformation used to draw the object.IlvGraphic.callDraw(Graphics,IlvTransformer)
,
IlvGraphic.boundingBox(IlvTransformer)
,
IlvGraphic.zoomable()
,
IlvGraphic
public IlvRect boundingBox(IlvTransformer t)
boundingBox
in interface IlvPolyPointsInterface
boundingBox
in class IlvLinkImage
t
- The transformer used to draw the link bundle.IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer)
,
IlvGraphic.zoomable()
,
IlvGraphic
public final boolean isLayoutValid()
invalidateLayout()
public final void invalidateLayout()
isLayoutValid()
public IlvLinkBundleFrame getFrame()
null
.public void setFrame(IlvLinkBundleFrame frame)
The frame is drawn when the link bundle is used as a sublink inside a grapher or inside another link bundle (nested link bundles).
Note that changing the frame may change the bounding box
of the link bundle. If the link bundle is already added in an graphic bag,
you must use the applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
method to change the
frame. This is also true when changing a property of
a frame that is already attached to a link bundle.
By default, there is no frame (the method getFrame()
returns null
.
A default implementation of IlvLinkBundleFrame
is provided:
IlvDefaultLinkBundleFrame
.
Note that this method can be called with a null
argument in order
to go back to the default behavior (no frame).
frame
- The new frame or null
..getFrame()
,
IlvDefaultLinkBundleFrame
public boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
contains
in class IlvLinkImage
p
- The point to be tested.tp
- The point p
transformed by the transformer
t
.t
- The transformer used for drawing the object.true
if the point lies inside this graphic object.IlvGraphic
public boolean containsFrame(IlvPoint p, IlvPoint tp, IlvTransformer t)
If the bundle is collapsed, the method
contains(IlvPoint, IlvPoint, IlvTransformer)
is called.
Otherwise, the method IlvLinkBundleFrame.contains(ilog.views.graphic.linkbundle.IlvLinkBundle, ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvTransformer)
is called.
p
- The point to be tested.tp
- The point p
transformed by the
transformer t
.t
- The transformation used to draw the object.IlvLinkBundleFrame
public void setSublinks(IlvLinkImage[] sublinks)
The sublinks can be of any class. Notice however that the link bundle
must be allowed to move the points of the link (connection points and
intermediate points if any).
Hence, links of type
IlvOneLinkImage
,
IlvDoubleLinkImage
,
IlvOneSplineLinkImage
and
IlvDoubleSplineLinkImage
are usually not appropriate,
because they don't allow the intermediate points to be moved freely.
To obtain a consistent layout, it is not recommended to mix in the same bundle
spline links
(IlvSplineLinkImage
) with polyline
links (IlvSplineLinkImage
etc.).
Either use only polyline links, or use only spline links for both the sublinks
and for the overview link. An overview link of type
IlvSplineLinkImage
should be
set on the link bundle when the sublinks are splines.
Also, a link connector class allowing the connection points to be moved freely must be installed either
For details on how to attach a link connector to nodes or links, see the
documentation of IlvLinkConnector
.
The recommended link connector is
IlvClippingLinkConnector
.
Note that a call to this method can modify the bounding box of
this link bundle.
For this reason, if the link bundle is contained inside an
IlvGraphicBag
, this method can be called only using the method
IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the graphic bag.
sublinks
- Array of sublinks to be added. The value null
or
an empty array removes all the sublinks.public final IlvGraphicEnumeration getObjects()
getSublinks()
or
getSublinksEnum()
instead.getObjects
in interface IlvGraphicBag
IlvGraphic
objects, or
null
.public final IlvLinkImage[] getSublinks()
null
if there is no sublinks.
Notice that a new array is constructed each time the method is called. Hence, to add, remove or replace sublinks, you must use the appropriate methods, not to directly modify the returned array.
public final IlvGraphicEnumeration getSublinksEnum()
IlvLinkImage
or subclasses.public final int getSublinksCount()
public void setSublink(int index, IlvLinkImage sublink)
Note that a call to this method can modify the bounding box of the
link bundle. For this reason, if the link bundle is contained in an
IlvGraphicBag
, this method can be called only using the method
IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the graphic bag.
index
- The position of the sublink to be set. If index
is equal to getSublinksCount(), the sublink is added at the end of
the current array of sublinks. If index
is in the range
(index>= 0 || index < getSublinksCount()), the sublink
is replaces the existing sublink at this index.sublink
- The sublink to be added. The value null
is not
allowed.IndexOutOfBoundsException
- if index
is out
of range (index< 0 || index > getSublinksCount()).public IlvLinkImage getSublink(int index)
index
- The index of the sublink.IndexOutOfBoundsException
- if index
is out
of range (index< 0 || index >= getSublinksCount()).public int getPointsCardinal()
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.getPointsCardinal
in interface IlvPolyPointsInterface
getPointsCardinal
in class IlvPolylineLinkImage
setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.getPointsCardinal()
public boolean allowsPointInsertion()
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.allowsPointInsertion
in interface IlvPolyPointsInterface
allowsPointInsertion
in class IlvPolylineLinkImage
true
.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.allowsPointInsertion()
public boolean allowsPointRemoval()
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.allowsPointRemoval
in interface IlvPolyPointsInterface
allowsPointRemoval
in class IlvPolylineLinkImage
true
if at least one intermediate point exists
and false
otherwise.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.allowsPointRemoval()
public boolean allowsPointMove(int index)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.allowsPointMove
in interface IlvPolyPointsInterface
allowsPointMove
in class IlvLinkImage
index
- The index of the point.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.allowsPointMove(int)
public void insertPoint(int index, double x, double y, IlvTransformer t)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.insertPoint
in interface IlvPolyPointsInterface
insertPoint
in class IlvPolylineLinkImage
index
- The index at which the new point will be inserted.x
- The x coordinate of the new point (in manager coordinates).y
- The y coordinate of the new point (in manager coordinates).t
- The transformer used to draw the link.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.insertPoint(int, double, double, ilog.views.IlvTransformer)
public void removePoint(int index, IlvTransformer t)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.removePoint
in interface IlvPolyPointsInterface
removePoint
in class IlvPolylineLinkImage
index
- The index of the point to be removed.t
- The transformer used to draw the link.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.removePoint(int, ilog.views.IlvTransformer)
public IlvPoint getPointAt(int index, IlvTransformer t)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.getPointAt
in interface IlvPolyPointsInterface
getPointAt
in class IlvPolylineLinkImage
index
- The index of the point.t
- The transformer through which the object is drawn.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.getPointAt(int, ilog.views.IlvTransformer)
public void movePoint(int index, double x, double y, IlvTransformer t)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.movePoint
in interface IlvPolyPointsInterface
movePoint
in class IlvPolylineLinkImage
index
- The index of the point to be moved.x
- The new x coordinate (in manager coordinates).y
- The new y coordinate (in manager coordinates).t
- The transformer through which the object is drawn.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.movePoint(int, double, double, ilog.views.IlvTransformer)
public void setIntermediateLinkPoints(IlvPoint[] points, int index, int length)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified, the method
of the superclass is called.setIntermediateLinkPoints
in class IlvPolylineLinkImage
points
- An array of points.index
- The index of the point that will be the first
intermediate point.length
- The number of intermediate points taken in the
points
array.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.setIntermediateLinkPoints(ilog.views.IlvPoint[], int, int)
public boolean pointsInBBox()
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified, the
method of the superclass is called.pointsInBBox
in interface IlvPolyPointsInterface
pointsInBBox
in class IlvLinkImage
setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.pointsInBBox()
public IlvPoint getConnectionReferencePoint(boolean origin, IlvTransformer t)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.getConnectionReferencePoint
in class IlvLinkImage
origin
- If true
, the connection
point of the origin node is searched for. If origin
is
false
, then the connection point of the destination node
is searched for.t
- The transformer used to draw the link.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.getConnectionReferencePoint(boolean, ilog.views.IlvTransformer)
public void getConnectionPoints(IlvPoint src, IlvPoint dst, IlvTransformer t)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified, the
method of the superclass is called.getConnectionPoints
in class IlvLinkImage
src
- A point for storing the origin.dst
- A point for storing the destination.t
- The transformer used to draw the link.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.getConnectionPoints(ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvTransformer)
public boolean isOriented()
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.isOriented
in class IlvLinkImage
setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.isOriented()
public void setOriented(boolean oriented)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.setOriented
in class IlvLinkImage
setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.setOriented(boolean)
public void setForeground(Color c)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.setForeground
in class IlvLinkImage
c
- The new color.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.setForeground(java.awt.Color)
public Color getForeground()
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.getForeground
in class IlvLinkImage
setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.getForeground()
public double getLineWidth()
If the link bundle is in collapsed state, this method delegates to
the link supplied with the method setOverviewLink(ilog.views.IlvLinkImage)
, if any, or to the
method of the superclass otherwise.
If the link bundle is in expanded state, if computes the sum of the
line widths of the individual links (see getSublinks()
) adding the
offsets (see getOffset()
).
getLineWidth
in class IlvLinkImage
getOverviewLink()
,
getSublinks()
public double getLineWidth(IlvTransformer t)
If the link bundle is in collapsed state, this method delegates to
the link supplied with the method setOverviewLink(ilog.views.IlvLinkImage)
, if any, or to the
method of the superclass otherwise.
If the link bundle is in expanded state, if computes the sum of the
line widths of the individual links (see getSublinks()
) adding the
offsets (see getOffset()
).
getLineWidth
in class IlvLinkImage
t
- The transformer used to draw the link bundle.getOverviewLink()
,
getSublinks()
public double getLineWidth(IlvTransformer t, boolean includingFrameMargin)
includingFrameMargin
is true
, the margin of
the bundle frame (if any) is included.
If the link bundle is in collapsed state, this method delegates to
the link supplied with the method setOverviewLink(ilog.views.IlvLinkImage)
, if any, or to the
method of the superclass otherwise.
If the link bundle is in expanded state, if computes the sum of the
line widths of the individual links (see getSublinks()
) adding the
offsets (see getOffset()
).
t
- The transformer used to draw the link bundle.includingFrameMargin
- If true
, the returned width
includes the margin of the bundle frame (if any).getOverviewLink()
,
getSublinks()
public void setLineWidth(double lineWidth)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.setLineWidth
in class IlvLinkImage
lineWidth
- The new line width.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.setLineWidth(double)
public double getOverviewLineWidth()
getLineWidth()
public int getEndCap()
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.getEndCap
in class IlvLinkImage
setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.getEndCap()
public void setEndCap(int endCap)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.setEndCap
in class IlvLinkImage
endCap
- The new decoration style. The values
are defined in the class IlvStroke
.
The default value is CAP_SQUARE
.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.setEndCap(int)
public int getLineJoin()
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.getLineJoin
in class IlvLinkImage
setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.getLineJoin()
public void setLineJoin(int lineJoin)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.setLineJoin
in class IlvLinkImage
lineJoin
- The new decoration style. The values are defined
in the class IlvStroke
.
The default value is JOIN_MITER
.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.setLineJoin(int)
public double getMaximumLineWidth()
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.getMaximumLineWidth
in class IlvLinkImage
setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.getMaximumLineWidth()
public void setMaximumLineWidth(double maximumLineWidth)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.setMaximumLineWidth
in class IlvLinkImage
maximumLineWidth
- The maximum line width, or 0 to indicate no limit.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.setMaximumLineWidth(double)
public float[] getLineStyle()
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.getLineStyle
in class IlvLinkImage
setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.getLineStyle()
public void setLineStyle(float[] lineStyle)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.setLineStyle
in class IlvLinkImage
lineStyle
- The new line style.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.setLineStyle(float[])
public IlvPoint[] getLinkPoints(IlvTransformer t)
setOverviewLink(ilog.views.IlvLinkImage)
. If no overview link is specified,
the method of the superclass is called.getLinkPoints
in class IlvPolylineLinkImage
t
- The transformer through which the object is drawn.setOverviewLink(ilog.views.IlvLinkImage)
,
getOverviewLink()
,
IlvLinkImage.getLinkPoints(ilog.views.IlvTransformer)
public void applyToObject(IlvGraphic obj, IlvApplyObject f, Object arg, boolean redraw)
applyToObject
in interface IlvGraphicBag
obj
- The graphic object.f
- The method to apply.arg
- The arguments passed to f
.redraw
- If true
, the object is redrawn.public void reshapeObject(IlvGraphic obj, IlvRect newrect, boolean redraw)
reshapeObject
in interface IlvGraphicBag
obj
- The graphic object.newrect
- The new desired bounding rectangle.redraw
- If true
, the object is redrawn.public void moveObject(IlvGraphic obj, double x, double y, boolean redraw)
moveObject
in interface IlvGraphicBag
obj
- The graphic object.x
- The new desired x.y
- The new desired y.redraw
- If true
, the object is redrawn.public void reDrawRegion(IlvRegion region)
reDrawRegion
in interface IlvGraphicBag
region
- The region to redraw in the coordinate system of the
link bundle.public void reDrawObj(IlvGraphic obj)
reDrawObj
in interface IlvGraphicBag
obj
- The graphic object.public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.
You should not call this
method directly; instead, you should use the write
methods of the manager.write
in interface IlvPersistentObject
write
in class IlvPolylineLinkImage
stream
- The output stream.IOException
- thrown when an exception occurs during
the write operation for this object.public IlvSelection makeSelection()
IlvLinkBundleSelection
.makeSelection
in class IlvLinkImage
IlvLinkImageSelection
public boolean zoomable()
false
, since this graphic object is not zoomable.zoomable
in class IlvLinkImage
IlvGraphic.zoomable()
,
IlvLinkConnector.zoomable()
public void ensureClippingLinkConnector(boolean traverse, boolean redraw)
traverse
- Whether this method is recursively called for
all sublinks that are link bundles.redraw
- Whether the object must be redrawn.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.