public class IlvSDMLinkBundle extends IlvLinkBundle
IlvLinkBundle
class.
This class allows to specify a link bundle in CSS:
link { class: "ilog.views.sdm.graphic.IlvSDMLinkBundle"; collapsed: "false"; // whether the bundle is collapsed offset: "7"; // the spacing between the sublinks singleConnectionPoint: "true"; // whether the sublinks point to a common point overviewLink: "@+OverviewLink"; // optional overview link for collapsed state fsublink[0]: "@+Sublink1"; // link in normal direction rsublink[1]: "@+Sublink2"; // link in reversed direction ... frame: "@+BundleFrame"; // optional frame of the bundle }Here is a more complete example:
link { class: "ilog.views.sdm.graphic.IlvSDMLinkBundle"; overviewLink: "@+OverviewLink"; fsublink[0]: "@+SublinkA"; fsublink[1]: "@+SublinkB"; rsublink[2]: "@+SublinkReversed"; collapsed: "false"; } Subobject#OverviewLink { class : "ilog.views.sdm.graphic.IlvGeneralLink" ; foreground : "green" ; oriented : "true" ; } Subobject#SublinkA { class : "ilog.views.sdm.graphic.IlvGeneralLink" ; foreground : "blue" ; oriented : "true" ; } Subobject#SublinkB { class : "ilog.views.sdm.graphic.IlvGeneralLink" ; ... } Subobject#SublinkReversed { class : "ilog.views.sdm.graphic.IlvGeneralLink" ; ... }Link bundles can be nested and have a frame:
link { class: "ilog.views.sdm.graphic.IlvSDMLinkBundle"; overviewLink: "@+OverviewLink"; fsublink[0]: "@+SublinkA"; fsublink[1]: "@+SublinkB"; fsublink[2]: "@+SubBundle"; collapsed: "false"; frame: "@+BundleFrame"; } Subobject#BundleFrame { class: "ilog.views.graphic.linkbundle.IlvDefaultLinkBundleFrame"; background: "pink"; } Subobject#OverviewLink { class : "ilog.views.sdm.graphic.IlvGeneralLink" ; ... } Subobject#SublinkA { class : "ilog.views.sdm.graphic.IlvGeneralLink" ; foreground : "black" ; oriented: "true"; } Subobject#SublinkB { class : "ilog.views.sdm.graphic.IlvGeneralLink" ; ... } Subobject#SubBundle { class: "ilog.views.sdm.graphic.IlvSDMLinkBundle"; fsublink[0]: "@+SublinkX"; fsublink[1]: "@+SublinkY"; collapsed: "false"; frame: "@+SubBundleFrame"; } Subobject#SubBundleFrame { class: "ilog.views.graphic.linkbundle.IlvDefaultLinkBundleFrame"; background: "@+FramePaint"; margin: "2"; } Subobject#SublinkX { class : "ilog.views.sdm.graphic.IlvGeneralLink" ; ... } Subobject#SublinkY { class : "ilog.views.sdm.graphic.IlvGeneralLink" ; ... } Subobject#FramePaint { class : "ilog.views.java2d.IlvRadialGradientPaint(center,radius,stops,colors,focal,adapting)" ; center : "0.25,0.25" ; focal : "0.25,0.25" ; radius : "0.35355338" ; stops[0] : "0" ; stops[1] : "1" ; colors[0] : "#FFFFFF" ; colors[1] : "#ADD8E6" ; adapting : "true" ; }
Constructor and Description |
---|
IlvSDMLinkBundle()
Creates an
IlvSDMLinkBundle instance. |
IlvSDMLinkBundle(IlvGraphic from,
IlvGraphic to,
boolean oriented)
Creates a new
IlvSDMLinkBundle instance with
no intermediate points and no overview link. |
IlvSDMLinkBundle(IlvGraphic from,
IlvGraphic to,
boolean oriented,
IlvPoint[] points)
Creates a new
IlvSDMLinkBundle instance with no
overview link. |
IlvSDMLinkBundle(IlvGraphic from,
IlvGraphic to,
boolean oriented,
IlvPoint[] points,
IlvLinkImage overviewLink)
Creates a new
IlvSDMLinkBundle instance. |
IlvSDMLinkBundle(IlvInputStream stream)
Reads the object from an
IlvInputStream . |
IlvSDMLinkBundle(IlvSDMLinkBundle source)
Creates an
IlvSDMLinkBundle by copying an existing one. |
Modifier and Type | Method and Description |
---|---|
IlvGraphic |
copy()
Copies the object.
|
IlvLinkImage |
getForwardOrReversedSublink(int index)
Returns the current sublink at the supplied position.
|
IlvLinkImage[] |
getForwardOrReversedSublinks()
This method returns the array of sublinks.
|
IlvLinkImage |
getForwardSublink(int index)
This method exists for internal reasons.
|
int |
getNumberOfForwardOrReversedSublink()
Returns the number of forwards or reversed sublinks.
|
IlvLinkImage |
getReversedSublink(int index)
This method exists for internal reasons.
|
boolean |
isReversedSublink(int index)
Returns whether the sublink at the suppled position is reversed.
|
void |
setForwardSublink(int index,
IlvLinkImage sublink)
Removes the current sublink at the supplied position if any, and
adds the given sublink to this link bundle at the supplied position.
|
void |
setForwardSublinks(IlvLinkImage[] sublinks)
Sets a new collection of unreversed sublinks.
|
void |
setFrom(IlvGraphic obj)
Changes the origin of the link.
|
void |
setGraphicBag(IlvGraphicBag bag)
Sets the graphic bag.
|
void |
setReversedSublink(int index,
IlvLinkImage sublink)
Removes the current sublink at the supplied position if any, and
adds the given sublink to this link bundle at the supplied position.
|
void |
setReversedSublinks(IlvLinkImage[] sublinks)
Sets a new collection of reversed sublinks.
|
void |
setTo(IlvGraphic obj)
Changes the destination of the link.
|
void |
write(IlvOutputStream stream)
Writes the object to an
IlvOutputStream . |
addLinkBundleSelectionChangedListener, addObject, addSublink, addSublink, allowsPointInsertion, allowsPointMove, allowsPointRemoval, applyToObject, boundingBox, contains, containsFrame, deSelectAll, deSelectAll, deSelectAll, draw, ensureClippingLinkConnector, getAllSelectableObjects, getCollapseExpandObject, getConnectionPoints, getConnectionReferencePoint, getEndCap, getForeground, getFrame, getLineJoin, getLineStyle, getLineWidth, getLineWidth, getLineWidth, getLinkBundles, getLinkBundlesCount, getLinkPoints, getMaximumLineWidth, getObject, getObjectName, getObjects, getOffset, getOverviewLineWidth, getOverviewLink, getPointAt, getPointsCardinal, getPopupMenu, getRootLinkBundle, getRootManager, getSelectableObject, getSelectedObjects, getSelectedObjectsCount, getSelectedSublinks, getSelectedSublinks, getSelectedSublinksCount, getSelectedSublinksCount, getSelection, getSelection, getSelection, getSelectionFactory, getSublink, getSublink, getSublink, getSublinks, getSublinksCount, getSublinksEnum, getToolTipText, getToolTipText, getTreeLock, insertPoint, invalidateLayout, isCollapsed, isCollapsible, isLayoutValid, isOriented, isSelected, isSelected, isSelectionAdjusting, isSingleConnectionPoint, makeSelection, moveObject, movePoint, pointsInBBox, reDrawObj, reDrawRegion, removeLinkBundleSelectionChangedListener, removeObject, removePoint, removeSublink, reshapeObject, selectAll, selectAll, selectAll, selectionChanged, setCollapsed, setEndCap, setForeground, setFrame, setIntermediateLinkPoints, setLineJoin, setLineStyle, setLineWidth, setMaximumLineWidth, setObjectName, setOffset, setOriented, setOverviewLink, setSelected, setSelected, setSelected, setSelectionAdjusting, setSelectionEventSource, setSingleConnectionPoint, setSublink, setSublinks, setToolTipText, zoomable
applyTransform
arrowBBox, arrowContains, drawArrow, finalize, getArrowSize, getFrom, getFromBoundingBox, getFromTransformer, getLinkConnectorConnectionPoint, getLinkPoints, getLocalTransformerOf, getOpposite, getTo, getToBoundingBox, getToTransformer, getVisibleFrom, getVisibleTo, isPersistent, isSpline, setLinkPoints
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 IlvSDMLinkBundle()
IlvSDMLinkBundle
instance.
This default bean constructor exists only for internal use. Do not call it.public IlvSDMLinkBundle(IlvGraphic from, IlvGraphic to, boolean oriented)
IlvSDMLinkBundle
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 IlvSDMLinkBundle(IlvGraphic from, IlvGraphic to, boolean oriented, IlvPoint[] points)
IlvSDMLinkBundle
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 IlvSDMLinkBundle(IlvGraphic from, IlvGraphic to, boolean oriented, IlvPoint[] points, IlvLinkImage overviewLink)
IlvSDMLinkBundle
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 IlvLinkBundle.setOverviewLink(ilog.views.IlvLinkImage)
).public IlvSDMLinkBundle(IlvInputStream stream) throws IlvReadFileException
IlvInputStream
.stream
- The input stream.IlvReadFileException
- if the format is not correct.public IlvSDMLinkBundle(IlvSDMLinkBundle source)
IlvSDMLinkBundle
by copying an existing one.source
- The origin of the copy.public IlvGraphic copy()
copy
in class IlvLinkBundle
IlvGraphic
instance.IlvGraphic
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 IlvLinkBundle
stream
- The output stream.IOException
- thrown when an exception occurs during
the write operation for this object.public void setGraphicBag(IlvGraphicBag bag)
Note: do not call this method directly unless you are creating a custom graphics bag.
setGraphicBag
in class IlvLinkBundle
bag
- The graphic bag to contain this graphic object.IlvGraphic
public void setFrom(IlvGraphic obj)
Note: You may use this method only when the link is not in a grapher. If you want to change the origin of a link that is inside a grapher, you must first remove the link from the grapher and add it back after the modification is done.
setFrom
in class IlvLinkImage
IlvLinkImage.setTo(ilog.views.IlvGraphic)
public void setTo(IlvGraphic obj)
Note: You may use this method only when the link is not in a grapher. If you want to change the origin of a link that is inside a grapher, you must first remove the link from the grapher and add it back after the modification is done.
setTo
in class IlvLinkImage
IlvLinkImage.setFrom(ilog.views.IlvGraphic)
public void setForwardSublinks(IlvLinkImage[] sublinks)
Note that a call to this method can modify the bounding box of
this object. For this reason, if the link bundle is contained inside an
IlvManager
, this method can be called only using the
method IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the manager.
This method is for internal purposes of CSS.
It calls IlvLinkBundle.setSublinks(ilog.views.IlvLinkImage[])
when this link bundle is added to its
graphic bag.
sublinks
- Array of sublinks. The value null
removes
all the sublinks.public void setForwardSublink(int index, IlvLinkImage sublink)
Note that a call to this method can modify the bounding box of
this object. For this reason, if the link bundle is contained inside an
IlvManager
, this method can be called only using the
method IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the manager.
This method is for internal purposes of CSS.
It calls IlvLinkBundle.setSublinks(ilog.views.IlvLinkImage[])
when this link bundle is added to its
graphic bag.
index
- The position of the sublink to be set.sublink
- The sublink to be added. The value null
removes the current sublink at the supplied position.public IlvLinkImage getForwardSublink(int index)
getForwardOrReversedSublink(int)
.
Note that the returned link is not necessarily unreversed.public void setReversedSublinks(IlvLinkImage[] sublinks)
Note that a call to this method can modify the bounding box of
this object. For this reason, if the link bundle is contained inside an
IlvManager
, this method can be called only using the
method IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the manager.
This method is for internal purposes of CSS.
It calls IlvLinkBundle.setSublinks(ilog.views.IlvLinkImage[])
when this link bundle is added to its
graphic bag.
sublinks
- Array of sublinks. The value null
removes
all the sublinks.public void setReversedSublink(int index, IlvLinkImage sublink)
Note that a call to this method can modify the bounding box of
this object. For this reason, if the link bundle is contained inside an
IlvManager
, this method can be called only using the
method IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
of the manager.
This method is for internal purposes of CSS.
It calls IlvLinkBundle.setSublinks(ilog.views.IlvLinkImage[])
when this link bundle is added to its
graphic bag.
index
- The position of the sublink to be set.sublink
- The sublink to be added. The value null
removes the current sublink at the supplied position.public IlvLinkImage getReversedSublink(int index)
getForwardOrReversedSublink(int)
.
Note that the returned link is not necessarily reversed.public IlvLinkImage[] getForwardOrReversedSublinks()
public IlvLinkImage getForwardOrReversedSublink(int index)
index
- The position of the sublink to return.IlvLinkImage
at the given position or
null
if none.public boolean isReversedSublink(int index)
index
- The position of the sublink to return.true
, if the sublink has reversed from and to node.public int getNumberOfForwardOrReversedSublink()
getForwardOrReversedSublink(int)
and isReversedSublink(int)
can be called.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.