public class IlvOneSplineLinkImage extends IlvOneLinkImage
IlvOneSplineLinkImage represents the connection between two
nodes in a grapher; the link is displayed as a
spline curve. For more information about specialized link graphic objects,
see IlvLinkImage.
The default values for an IlvOneSplineLinkImage instance are as
follows:
Color.black0IlvStroke.CAP_SQUARE
The following code example shows how to use an
IlvOneSplineLinkImage in a simple Java application:
IlvGraphic node1, node2; IlvGrapher grapher = new IlvGrapher(); IlvOneSplineLinkImage link; // Create new ellipse node and add it to the grapher. node1 = new IlvEllipse(new IlvRect(30, 10, 50, 50), true, false); grapher.addNode(node1, false); // Add a new rectangular node to the grapher. node2 = new IlvRectangle(new IlvRect(220, 90, 50, 50), false, true); grapher.addNode(node2, 2, true); // Link the two nodes and add the link to a grapher. link = new IlvOneSplineLinkImage(node1, node2, IlvOneLinkImage.VerticalLink, true); grapher.addLink(link, true);
The following image shows the graphic object created in the code example:
IlvOneSplineLinkImage is a custom graphic object, that is, a
subclass of IlvGraphic. Graphic objects are controlled using an
IlvManager instance and displayed using one or more
IlvManagerView instances in a Java Swing application. For
information about generic features for graphic objects, see
IlvGraphic.
IlvPoint,
IlvManager,
IlvManagerView,
Serialized FormHorizontalLink, VerticalLink| Constructor and Description |
|---|
IlvOneSplineLinkImage(IlvGraphic from,
IlvGraphic to,
boolean oriented)
Creates a new link image.
|
IlvOneSplineLinkImage(IlvGraphic from,
IlvGraphic to,
int orientation,
boolean oriented)
Creates a new link image.
|
IlvOneSplineLinkImage(IlvInputStream stream)
Reads the object from an
IlvInputStream. |
IlvOneSplineLinkImage(IlvOneSplineLinkImage source)
Create a new
IlvOneSplineLinkImage by copying the specified
one. |
| Modifier and Type | Method and Description |
|---|---|
IlvRect |
boundingBox(IlvTransformer t)
Returns the bounding rectangle of the object.
|
boolean |
contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if a point lies within the outline of the link.
|
IlvGraphic |
copy()
Copies the object.
|
void |
draw(Graphics dst,
IlvTransformer t)
Draws the object.
|
IlvPoint[] |
getLinkPoints(IlvTransformer t)
Returns the points that define the link.
|
getConnectionPoints, getOrientation, getPointAt, getPointsCardinal, setOrientation, writeallowsPointInsertion, allowsPointMove, allowsPointRemoval, applyTransform, arrowBBox, arrowContains, drawArrow, finalize, getArrowSize, getConnectionReferencePoint, getEndCap, getForeground, getFrom, getFromBoundingBox, getFromTransformer, getLineJoin, getLineStyle, getLineWidth, getLineWidth, getLinkConnectorConnectionPoint, getLinkPoints, getLocalTransformerOf, getMaximumLineWidth, getOpposite, getTo, getToBoundingBox, getToTransformer, getVisibleFrom, getVisibleTo, insertPoint, isOriented, isPersistent, isSpline, makeSelection, movePoint, pointsInBBox, removePoint, setEndCap, setForeground, setFrom, setIntermediateLinkPoints, setLineJoin, setLineStyle, setLineWidth, setLinkPoints, setMaximumLineWidth, setOriented, setTo, zoomableaddActionListener, addNamedPropertyListener, allViewsRemoved, baseTextDirectionChanged, blinkingStateOn, boundingBox, callDraw, componentOrientationChanged, getAndAssociateObjectInteractor, getBaseTextDirection, getBlinkingAction, getBlinkingObjectOwner, getBlinkingOffPeriod, getBlinkingOnPeriod, getCenter, getComponentOrientation, getDefaultInteractor, getGraphicBag, GetGraphicObject, getIntersectionWithOutline, getLocale, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getResolvedBaseTextDirection, getToolTipBaseTextDirection, getToolTipText, getToolTipText, 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, setGraphicBag, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipBaseTextDirection, setToolTipText, setVisible, setZOrderIndex, toString, translate, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemovedpublic IlvOneSplineLinkImage(IlvGraphic from, IlvGraphic to, boolean oriented)
from - the origin object.to - the destination object.oriented - if oriented is true then an arrow is drawn at the
destination point.public IlvOneSplineLinkImage(IlvGraphic from, IlvGraphic to, int orientation, boolean oriented)
from - the origin object.to - the destination object.orientation - the valid values for this may be
IlvOneLinkImage.VerticalLink or
IlvOneLinkImage.HorizontalLink. It specifies the
direction the link takes upon leaving the from node.oriented - if oriented is true then an arrow is drawn at the
destination point.public IlvOneSplineLinkImage(IlvOneSplineLinkImage source)
IlvOneSplineLinkImage by copying the specified
one.public IlvOneSplineLinkImage(IlvInputStream stream) throws IlvReadFileException
IlvInputStream.stream - the input stream.IlvReadFileException - if the format is not correct.public IlvGraphic copy()
copy in class IlvOneLinkImageIlvGraphic instance.IlvGraphicpublic void draw(Graphics dst, IlvTransformer t)
draw in class IlvLinkImagedst - The destination Graphics.t - The transformation used to draw the object.IlvGraphic.callDraw(Graphics,IlvTransformer),
IlvGraphic.boundingBox(IlvTransformer),
IlvGraphic.zoomable(),
IlvGraphicpublic IlvPoint[] getLinkPoints(IlvTransformer t)
getConnectionPoints member function and
the intermediate points for the spline.getLinkPoints in class IlvOneLinkImagepublic boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
contains in class IlvLinkImagep - The point to be tested.tp - The point p transformed by the transformer t.t - The transformation that was applied to the object when it was
drawn.true if the point lies inside this graphic object.IlvGraphicpublic IlvRect boundingBox(IlvTransformer t)
boundingBox in interface IlvPolyPointsInterfaceboundingBox in class IlvLinkImaget - The transformer used to draw the object.IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer),
IlvGraphic.zoomable(),
IlvGraphic© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.