public class IlvCompositeLink extends IlvPolylineLinkImage implements IlvGraphicBag, IlvComposite
IlvCompositeLink represents a link between two nodes that can
be decorated with IlvGraphic instances.
This class uses an IlvLinkImage instance variable for link
rendering. For more information about specialized link graphic objects, see
IlvLinkImage.
If the IlvCompositeLink has a rendering link
(see getLink()), all rendering values such as color, line width,
end cap and line join are controlled by the rendering link.
The following code example shows how to use an
IlvCompositeLink in a simple Java application:
IlvGrapher grapher = new IlvGrapher();
IlvRectangle origin = new IlvReliefRectangle(new IlvRect(10, 10, 40, 40));
origin.setBackground(Color.lightGray);
IlvRectangle dest = new IlvReliefRectangle(new IlvRect(250, 120, 40, 40));
dest.setBackground(Color.lightGray);
grapher.addNode(origin, false);
grapher.addNode(dest, false);
// Creates the link responsible for the rendering
IlvLinkImage link = new IlvDoubleLinkImage(origin, dest, false);
IlvCompositeLink clink = new IlvCompositeLink(origin, dest, false);
clink.setLink(link);
clink.setLineWidth(5);
clink.setForeground(Color.decode("#40BFBD"));
grapher.addLink(clink, true);
// Creates a plinth rectangle with a label
IlvCompositeGraphic plinth = new IlvCompositeGraphic();
plinth.setLayout(new IlvCenteredLayout(new Insets(4, 10, 4, 10)));
IlvRectangle rect = new IlvReliefRectangle(new IlvRect(0, 0, 40, 40));
rect.setBackground(Color.red);
plinth.setChildren(0, rect);
IlvZoomableLabel name = new IlvZoomableLabel(new IlvPoint(), "Paris", false);
plinth.setChildren(1, name);
//Adds the plinth to the link
clink.setChildren(0, plinth);
clink.setConstraints(0,
new IlvAttachmentConstraint(
IlvAttachmentLocation.CenterPostOrderFirst,
IlvLinkAttachmentLocation.MiddleLink));
//Creates a stack of small rectangles
IlvCompositeGraphic stacker = new IlvCompositeGraphic();
stacker.setLayout(new IlvStackerLayout());
// Creates a tiny blue rectangle
IlvRectangle r1 = new IlvRectangle(new IlvRect(0, 0, 10, 10));
r1.setBackground(Color.blue);
r1.setForeground(Color.blue);
r1.setFillOn(true);
stacker.setChildren(0, r1);
// Creates a tiny red rectangle
IlvRectangle r2 = new IlvRectangle(new IlvRect(0, 0, 10, 10));
r2.setBackground(Color.red);
r2.setForeground(Color.red);
r2.setFillOn(true);
stacker.setChildren(1, r2);
// Creates a tiny green rectangle
IlvRectangle r3 = new IlvRectangle(new IlvRect(0, 0, 10, 10));
r3.setBackground(Color.green);
r3.setForeground(Color.green);
r3.setFillOn(true);
stacker.setChildren(2, r3);
// Adds the stack of rectangles
clink.setChildren(1, stacker);
// IlvLinkAttachmentLocation.NearFromLink --> hotSpot,
// IlvLinkAttachmentLocation.FromLink --> anchor
clink.setConstraints(1,
new IlvAttachmentConstraint(
IlvLinkAttachmentLocation.NearFromLink,
IlvLinkAttachmentLocation.FromLink));
The following image shows the graphic object created in the code example:
>
IlvCompositeLink 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.
IlvManager,
IlvManagerView,
setLink(ilog.views.IlvLinkImage),
Serialized Form| Constructor and Description |
|---|
IlvCompositeLink()
Creates an
IlvCompositeLink instance. |
IlvCompositeLink(IlvCompositeLink source)
Creates an
IlvCompositeLink by copying an existing one. |
IlvCompositeLink(IlvGraphic from,
IlvGraphic to,
boolean oriented)
Creates a new
IlvCompositeLink instance with no intermediate points. |
IlvCompositeLink(IlvGraphic from,
IlvGraphic to,
boolean oriented,
IlvLinkImage link)
Creates a new
IlvCompositeLink instance. |
IlvCompositeLink(IlvGraphic from,
IlvGraphic to,
boolean oriented,
IlvPoint[] points)
Creates a new
IlvCompositeLink instance. |
IlvCompositeLink(IlvInputStream stream)
Reads the object from an
IlvInputStream. |
| Modifier and Type | Method and Description |
|---|---|
void |
addObject(IlvGraphic graphic,
boolean redraw)
You should not called this method directly
|
boolean |
allowsPointInsertion()
This method delegates to the link supplied with the
setLink method. |
boolean |
allowsPointMove(int index)
This method delegates to the link supplied with the
setLink method. |
boolean |
allowsPointRemoval()
This method delegates to the link supplied with the
setLink method. |
void |
applyToObject(IlvGraphic graphic,
IlvApplyObject f,
Object arg,
boolean redraw)
Applies a method to a graphic object of the bag.
|
void |
applyTransform(IlvTransformer t)
Applies a transformation to the shape of the object.
|
void |
baseTextDirectionChanged(int oldBaseTextDirection,
int newBaseTextDirection)
Called when the object is base text direction sensitive and the
resolved base text direction has changed.
|
IlvRect |
boundingBox(IlvTransformer t)
Returns the bounding rectangle of this object.
|
void |
componentOrientationChanged(ComponentOrientation oldOri,
ComponentOrientation newOri)
Called when the object is component orientation sensitive and the
component orientation has changed.
|
boolean |
contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if a point lies within the outline of the link.
|
IlvGraphic |
copy()
Copies the link.
|
protected IlvCompositeGraphic |
createCompositeNode()
Creates a new
IlvCompositeGraphic instance used to lay out the children |
void |
doLayout()
Layout this object using its layout manager.
|
void |
draw(Graphics dst,
IlvTransformer t)
Draws this link.
|
protected void |
drawCore(Graphics2D dst,
IlvTransformer t)
Draws the object.
|
Action |
getAction(int index,
IlvMouseGesture gesture)
Returns the action associated with the child and the given gesture if any.
|
float |
getAlpha()
Returns the alpha value of this object.
|
IlvAttachableGraphic |
getAttachableGraphic(IlvGraphic element)
Returns an
IlvAttachableGraphic for the supplied IlvGraphic |
IlvRect |
getBaseBoundingBox(IlvTransformer t)
Returns the bounding rectangle of the core link of this object
excluding the decoration.
|
int |
getBaseTextDirection()
Returns the base direction of the text.
|
IlvGraphic[] |
getChildren()
Returns the children of this object.
|
IlvGraphic |
getChildren(int index)
Returns the child of this object at the given position.
|
protected IlvCompositeGraphic |
getCompositeNode()
Returns the
IlvCompositeGraphic instance used to lay out the children |
void |
getConnectionPoints(IlvPoint src,
IlvPoint dst,
IlvTransformer t)
This method delegates to the link supplied with the
setLink method. |
IlvPoint |
getConnectionReferencePoint(boolean origin,
IlvTransformer t)
This method delegates to the link supplied with the
setLink method. |
Object[] |
getConstraints()
Returns the constraints of the children of this object.
|
Object |
getConstraints(int index)
Returns the constraint of the child at the given position.
|
int |
getEndCap()
This method delegates to the link supplied with the
setLink method. |
IlvEventMap[] |
getEventMaps()
Returns the event maps of the children of this object.
|
Color |
getForeground()
This method delegates to the link supplied with the
setLink method. |
String |
getLabel()
Returns the label of the object.
|
IlvRect |
getLabelBBox(IlvTransformer t)
Returns the area where the label is displayed.
|
int |
getLineJoin()
This method delegates to the link supplied with the
setLink method. |
float[] |
getLineStyle()
This method delegates to the link supplied with the
setLink method. |
double |
getLineWidth()
This method delegates to the link supplied with the
setLink method. |
double |
getLineWidth(IlvTransformer t)
This method delegates to the link supplied with the
setLink method. |
IlvLinkImage |
getLink()
Returns the link responsible for the rendering.
|
IlvPoint[] |
getLinkPoints(IlvTransformer t)
This method delegates to the link supplied with the
setLink method. |
double |
getMaximumLineWidth()
This method delegates to the link supplied with the
setLink method. |
IlvGraphic |
getObject(String name)
Returns the graphic object with that name if exists in the bag,
otherwise returns
null. |
IlvGraphicEnumeration |
getObjects()
Returns all the children of this object.
|
IlvComposite |
getParent()
Always returns
null. |
IlvPoint |
getPointAt(int index,
IlvTransformer t)
This method delegates to the link supplied with the
setLink method. |
int |
getPointsCardinal()
This method delegates to the link supplied with the
setLink method. |
IlvComposite |
getRoot()
Returns this object which is the root of the hierarchy.
|
String |
getToolTipText(IlvPoint p,
IlvTransformer t)
Returns the tooltip text to display when the mouse
pointer is at a specified location inside the graphic
object.
|
double[] |
getVisibilityThresholds()
Returns the zoom level above which the children are visible.
|
double |
getVisibilityThresholds(int index)
Returns the zoom level above which the child at the supplied position is visible.
|
boolean |
hasActions(int index)
Always returns
false
Cannot define actions on composite links. |
void |
insertPoint(int index,
double x,
double y,
IlvTransformer t)
This method delegates to the link supplied with the
setLink method. |
void |
invalidate()
Invalidates this composite.
|
protected void |
invalidateBBoxCache()
Invalidates the bounding box cache.
|
boolean |
isBaseTextDirectionSensitive()
Returns
true because the bounding boxes of object's
children may depend on its text direction. |
boolean |
isOriented()
This method delegates to the link supplied with the
setLink method. |
boolean |
isSensitive()
When returns
true, the AWT events are dispatched to the Swing
actions. |
boolean |
isSpline()
Returns
true if the link has spline routing functionality. |
boolean |
isValid()
Determines whether this composite is valid.
|
void |
localeChanged(ULocale oldLocale,
ULocale newLocale)
Called when the object is locale sensitive and the
locale has changed.
|
void |
moveObject(IlvGraphic graphic,
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
setLink method. |
boolean |
pointsInBBox()
This method delegates to the link supplied with the
setLink method. |
void |
reDrawObj(IlvGraphic obj)
Redraws a graphic object located in the bag.
|
void |
reDrawRegion(IlvRegion region)
Redraws a region of the bag.
|
void |
removeObject(IlvGraphic graphic,
boolean redraw)
You should not called this method directly
|
void |
removePoint(int index,
IlvTransformer t)
This method delegates to the link supplied with the
setLink method. |
void |
reshapeObject(IlvGraphic graphic,
IlvRect newrect,
boolean redraw)
Changes the size of a graphic object.
|
void |
setAlpha(float alpha)
Changes the alpha value of this object.
|
void |
setBaseTextDirection(int baseTextDirection)
Changes the base direction of the text.
|
protected void |
setBaseTextDirectionDuringConstruction(int baseTextDirection)
Changes the base direction of the text.
|
void |
setChildren(IlvGraphic[] children)
Sets a new collection of children for this object.
|
void |
setChildren(int index,
IlvGraphic child)
Adds the given child of this object at the supplied position.
|
void |
setConstraints(int index,
Object constraint)
Sets the attachments for the child at the given position of this object.
|
void |
setConstraints(Object[] attachments)
Sets the attachments for each child of this object.
|
void |
setEndCap(int endCap)
This method delegates to the link supplied with the
setLink method. |
void |
setForeground(Color c)
This method delegates to the link supplied with the
setLink method. |
void |
setGraphicBag(IlvGraphicBag bag)
Changes the bag that contains the object.
|
void |
setIntermediateLinkPoints(IlvPoint[] points,
int index,
int length)
This method delegates to the link supplied with the
setLink method. |
void |
setLabel(String label)
Changes the label of the object.
|
void |
setLineJoin(int lineJoin)
This method delegates to the link supplied with the
setLink method. |
void |
setLineStyle(float[] lineStyle)
This method delegates to the link supplied with the
setLink method. |
void |
setLineWidth(double lineWidth)
This method delegates to the link supplied with the
setLink method. |
void |
setLink(IlvLinkImage link)
Sets the link responsible for the rendering.
|
void |
setMaximumLineWidth(double maximumLineWidth)
This method delegates to the link supplied with the
setLink method. |
boolean |
setObjectName(IlvGraphic graphic,
String name)
Changes the name of a graphic object.
|
void |
setOriented(boolean oriented)
This method delegates to the link supplied with the
setLink method. |
void |
setSensitive(boolean sensitive)
When this property is set to
true, the object interactor
IlvCompositeInteractor
dispatches the AWT events to the Swing actions defined in the event maps. |
void |
setToolTipText(String text)
Sets the text to display in the tooltip of this object.
|
void |
setVisibilityThresholds(double[] thresholds)
Sets the zoom thresholds for each child above which the children are visible
|
void |
setVisibilityThresholds(int index,
double threshold)
This property defines above which zoom level the child at the supplied index
will be visible.
|
boolean |
supportMultiline()
Returns
true if the label can be a multiline label;
false otherwise. |
void |
write(IlvOutputStream stream)
Writes the object to an
IlvOutputStream. |
arrowBBox, arrowContains, drawArrow, finalize, getArrowSize, getFrom, getFromBoundingBox, getFromTransformer, getLinkConnectorConnectionPoint, getLinkPoints, getLocalTransformerOf, getOpposite, getTo, getToBoundingBox, getToTransformer, getVisibleFrom, getVisibleTo, isPersistent, makeSelection, setFrom, setLinkPoints, setTo, zoomableaddActionListener, addNamedPropertyListener, allViewsRemoved, blinkingStateOn, boundingBox, callDraw, getAndAssociateObjectInteractor, getBlinkingAction, getBlinkingObjectOwner, getBlinkingOffPeriod, getBlinkingOnPeriod, getCenter, getComponentOrientation, getDefaultInteractor, getGraphicBag, GetGraphicObject, getIntersectionWithOutline, getLocale, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getResolvedBaseTextDirection, getToolTipBaseTextDirection, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, getULocale, getZOrderIndex, hasProperty, inside, intersects, invalidateBidiCache, isComponentOrientationSensitive, isDataFlavorSupported, isEditable, isInApplyToObject, isLocaleSensitive, isMovable, isSelectable, isVisible, move, move, moveResize, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, reDraw, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBackground, setBlinkingAction, setBlinkingOffPeriod, setBlinkingOnPeriod, setEditable, setFillOn, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipBaseTextDirection, setVisible, setZOrderIndex, toString, translate, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemovedclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetGraphicBagpublic IlvCompositeLink()
IlvCompositeLink instance.public IlvCompositeLink(IlvGraphic from, IlvGraphic to, boolean oriented, IlvPoint[] points)
IlvCompositeLink instance.from - The origin object.to - The destination object.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 IlvCompositeLink(IlvGraphic from, IlvGraphic to, boolean oriented)
IlvCompositeLink instance with no intermediate points.from - The origin object.to - The destination object.oriented - If true, an arrow is
drawn at the
destination point.public IlvCompositeLink(IlvGraphic from, IlvGraphic to, boolean oriented, IlvLinkImage link)
IlvCompositeLink instance.from - The origin object.to - The destination object.oriented - If true, an arrow is
drawn at the
destination point.link - The link to be used for the rendering.public IlvCompositeLink(IlvInputStream stream) throws IlvReadFileException
IlvInputStream.stream - The input stream.IlvReadFileException - if the format is not correct.public IlvCompositeLink(IlvCompositeLink source)
IlvCompositeLink by copying an existing one.source - The origin of the copy.public IlvGraphic copy()
copy in class IlvPolylineLinkImageIlvGraphic instance.IlvGraphicpublic boolean isValid()
isValid in interface IlvCompositepublic void invalidate()
invalidate in interface IlvCompositepublic void addObject(IlvGraphic graphic, boolean redraw)
addObject in interface IlvGraphicBaggraphic - The graphic object.redraw - If true the object is redrawn.public void removeObject(IlvGraphic graphic, boolean redraw)
removeObject in interface IlvGraphicBaggraphic - The graphic object.redraw - If true the object is redrawn.public IlvGraphicEnumeration getObjects()
getObjects in interface IlvGraphicBagIlvGraphic objects, or
null.public void reDrawObj(IlvGraphic obj)
reDrawObj in interface IlvGraphicBagobj - The graphic object.public void reDrawRegion(IlvRegion region)
reDrawRegion in interface IlvGraphicBagregion - The region to redraw.public void reshapeObject(IlvGraphic graphic, IlvRect newrect, boolean redraw)
reshapeObject in interface IlvGraphicBaggraphic - The graphic object.newrect - The new desired bounding rectangle.redraw - If true the object is redrawn.public void moveObject(IlvGraphic graphic, double x, double y, boolean redraw)
moveObject in interface IlvGraphicBaggraphic - The graphic object.x - The new desired x position.y - The new desired y position.redraw - If true the object is redrawn.public void applyToObject(IlvGraphic graphic, IlvApplyObject f, Object arg, boolean redraw)
applyToObject in interface IlvGraphicBaggraphic - The graphic object.f - The method to apply.arg - The arguments passed to the method f.redraw - If true the object is redrawn.public boolean setObjectName(IlvGraphic graphic, String name)
setObjectName in interface IlvGraphicBaggraphic - The graphic object.name - The new name.true if the name can be changed.public 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(),
IlvGraphicprotected void drawCore(Graphics2D dst, IlvTransformer t)
draw(java.awt.Graphics, ilog.views.IlvTransformer) after processing the
alpha transparency. It can be overridden in subclasses.dst - The destination Graphics.t - The transformation used to draw the object.setAlpha(float)public 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(),
IlvGraphicpublic IlvRect getBaseBoundingBox(IlvTransformer t)
t - The transformer used to draw the object.public void doLayout()
doLayout in interface IlvCompositepublic void applyTransform(IlvTransformer t)
t to the
intermediate points of the link, if any.applyTransform in class IlvPolylineLinkImaget - The transformer to be applied.IlvGraphicpublic 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 String getToolTipText(IlvPoint p, IlvTransformer t)
getToolTipText in class IlvGraphicp - 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 tooltip
will be displayed (the view coordinates).p for transformation
t, or null if no tooltip should be displayed.IlvGraphic,
IlvGraphic.getToolTipText(),
IlvGraphic.setToolTipText(String)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(ilog.views.IlvManagerView).
setToolTipText in class IlvGraphictext - The tooltip string to display. If text is
null, the tooltip is turned off for this graphic
object.IlvToolTipManager,
IlvGraphic.getToolTipText(),
getToolTipText(IlvPoint, IlvTransformer)public void setChildren(IlvGraphic[] children)
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.children - Array of children to be added. The value null removes
all the children.public IlvGraphic[] getChildren()
null.
The returned value may be null if there is no children.getChildren in interface IlvCompositepublic void setChildren(int index,
IlvGraphic child)
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.index - The position of the child to be set.child - The child to be added. The value null removes the current
child at the supplied position.public IlvGraphic getChildren(int index)
getChildren in interface IlvCompositepublic void setConstraints(Object[] attachments)
attachments - Array of constraints for the layoutIlvAttachmentConstraint,
IlvLinkAttachmentLocation,
IlvAttachmentLayoutpublic Object[] getConstraints()
IlvAttachmentConstraint,
IlvLinkAttachmentLocation,
IlvAttachmentLayoutpublic void setConstraints(int index,
Object constraint)
index - The position of the child that the supplied constraint applies to.constraint - The constraint used by the layout for the childIlvAttachmentConstraint,
IlvLinkAttachmentLocation,
IlvAttachmentLayoutpublic Object getConstraints(int index)
public void setLink(IlvLinkImage link)
IlvCompositeLink instance.
Note that a call to this method can modify the bounding box of
this object.
For this reason, if the graphic set 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.public IlvLinkImage getLink()
public int getPointsCardinal()
setLink method.getPointsCardinal in interface IlvPolyPointsInterfacegetPointsCardinal in class IlvPolylineLinkImagesetLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.getPointsCardinal()public boolean allowsPointInsertion()
setLink method.allowsPointInsertion in interface IlvPolyPointsInterfaceallowsPointInsertion in class IlvPolylineLinkImagetrue.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.allowsPointInsertion()public boolean allowsPointRemoval()
setLink method.allowsPointRemoval in interface IlvPolyPointsInterfaceallowsPointRemoval in class IlvPolylineLinkImagetrue if at least one intermediate point exists
and false otherwise.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.allowsPointRemoval()public boolean allowsPointMove(int index)
setLink method.allowsPointMove in interface IlvPolyPointsInterfaceallowsPointMove in class IlvLinkImageindex - The index of the point.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.allowsPointMove(int)public void insertPoint(int index,
double x,
double y,
IlvTransformer t)
setLink method.insertPoint in interface IlvPolyPointsInterfaceinsertPoint in class IlvPolylineLinkImageindex - 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.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.insertPoint(int, double, double, ilog.views.IlvTransformer)public void removePoint(int index,
IlvTransformer t)
setLink method.removePoint in interface IlvPolyPointsInterfaceremovePoint in class IlvPolylineLinkImageindex - The index of the point to be removed.t - The transformer used to draw the link.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.removePoint(int, ilog.views.IlvTransformer)public IlvPoint getPointAt(int index, IlvTransformer t)
setLink method.getPointAt in interface IlvPolyPointsInterfacegetPointAt in class IlvPolylineLinkImageindex - The index of the point.t - The transformer through which the object is drawn.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.getPointAt(int, ilog.views.IlvTransformer)public void movePoint(int index,
double x,
double y,
IlvTransformer t)
setLink method.movePoint in interface IlvPolyPointsInterfacemovePoint in class IlvPolylineLinkImageindex - 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.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.movePoint(int, double, double, ilog.views.IlvTransformer)public void setIntermediateLinkPoints(IlvPoint[] points, int index, int length)
setLink method.setIntermediateLinkPoints in class IlvPolylineLinkImagepoints - 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.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.setIntermediateLinkPoints(ilog.views.IlvPoint[], int, int)public boolean pointsInBBox()
setLink method.pointsInBBox in interface IlvPolyPointsInterfacepointsInBBox in class IlvLinkImagesetLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.pointsInBBox()public IlvPoint getConnectionReferencePoint(boolean origin, IlvTransformer t)
setLink method.getConnectionReferencePoint in class IlvLinkImageorigin - 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.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.getConnectionReferencePoint(boolean, ilog.views.IlvTransformer)public void getConnectionPoints(IlvPoint src, IlvPoint dst, IlvTransformer t)
setLink method.getConnectionPoints in class IlvLinkImagesrc - A point for storing the origin.dst - A point for storing the destination.t - The transformer used to draw the link.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.getConnectionPoints(ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvTransformer)public boolean isOriented()
setLink method.isOriented in class IlvLinkImagesetLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.isOriented()public void setOriented(boolean oriented)
setLink method.setOriented in class IlvLinkImagesetLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.setOriented(boolean)public void setForeground(Color c)
setLink method.setForeground in class IlvLinkImagec - The new color.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.setForeground(java.awt.Color)public Color getForeground()
setLink method.getForeground in class IlvLinkImagesetLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.getForeground()public double getLineWidth()
setLink method.getLineWidth in class IlvLinkImagesetLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.getLineWidth()public double getLineWidth(IlvTransformer t)
setLink method.getLineWidth in class IlvLinkImaget - The transformer used to draw the link.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.getLineWidth(IlvTransformer)public void setLineWidth(double lineWidth)
setLink method.setLineWidth in class IlvLinkImagelineWidth - The new line width.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.setLineWidth(double)public int getEndCap()
setLink method.getEndCap in class IlvLinkImagesetLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.getEndCap()public void setEndCap(int endCap)
setLink method.setEndCap in class IlvLinkImageendCap - The new decoration style. The values
are defined in the class IlvStroke.
The default value is CAP_SQUARE.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.setEndCap(int)public int getLineJoin()
setLink method.getLineJoin in class IlvLinkImagesetLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.getLineJoin()public void setLineJoin(int lineJoin)
setLink method.setLineJoin in class IlvLinkImagelineJoin - The new decoration style. The values are defined
in the class IlvStroke.
The default value is JOIN_MITER.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.setLineJoin(int)public double getMaximumLineWidth()
setLink method.getMaximumLineWidth in class IlvLinkImagesetLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.getMaximumLineWidth()public void setMaximumLineWidth(double maximumLineWidth)
setLink method.setMaximumLineWidth in class IlvLinkImagemaximumLineWidth - The maximum line width, or 0 to indicate no limit.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.setMaximumLineWidth(double)public float[] getLineStyle()
setLink method.getLineStyle in class IlvLinkImagesetLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.getLineStyle()public void setLineStyle(float[] lineStyle)
setLink method.setLineStyle in class IlvLinkImagelineStyle - The new line style.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.setLineStyle(float[])public IlvPoint[] getLinkPoints(IlvTransformer t)
setLink method.getLinkPoints in class IlvPolylineLinkImaget - The transformer through which the object is drawn.setLink(ilog.views.IlvLinkImage),
getLink(),
IlvLinkImage.getLinkPoints(ilog.views.IlvTransformer)public IlvEventMap[] getEventMaps()
public Action getAction(int index, IlvMouseGesture gesture)
getAction in interface IlvCompositeindex - The position of the childgesture - The gesture whose action is required.Action,
IlvMouseGesturepublic IlvComposite getParent()
null. This object is always the root
in the hierarchy of composite graphics.getParent in interface IlvCompositepublic IlvComposite getRoot()
getRoot in interface IlvCompositepublic IlvGraphic getObject(String name)
null.getObject in interface IlvGraphicBagname - The graphic object name.public void setGraphicBag(IlvGraphicBag bag)
setGraphicBag in class IlvGraphicbag - The graphic bag.IlvGraphicpublic 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 IlvPersistentObjectwrite in class IlvPolylineLinkImagestream - The output stream.IOException - thrown when an exception occurs during
the write operation for this object.protected IlvCompositeGraphic createCompositeNode()
IlvCompositeGraphic instance used to lay out the childrenprotected IlvCompositeGraphic getCompositeNode()
IlvCompositeGraphic instance used to lay out the childrenpublic void setVisibilityThresholds(double[] thresholds)
thresholds - array of zoom factorssetVisibilityThresholds(int,double)public double[] getVisibilityThresholds()
public void setVisibilityThresholds(int index,
double threshold)
index - The position of the child.threshold - The zoom factor above which the child is visible. When 0,
the child is always visible.public double getVisibilityThresholds(int index)
public IlvAttachableGraphic getAttachableGraphic(IlvGraphic element)
IlvAttachableGraphic for the supplied IlvGraphicgetAttachableGraphic in interface IlvCompositepublic void setLabel(String label)
IlvLabelInterface. It sets the label of this
child.setLabel in interface IlvLabelInterfacepublic String getLabel()
IlvLabelInterface. It returns the label of this
child. It returns null if there is no such child.getLabel in interface IlvLabelInterfacepublic boolean supportMultiline()
true if the label can be a multiline label;
false otherwise.
This method works only if the composite link has a child that
implements the IlvLabelInterface. It returns whether this
child supports multilines.supportMultiline in interface IlvLabelInterfacepublic IlvRect getLabelBBox(IlvTransformer t)
IlvLabelInterface. It returns the area where this
child is displayed. It returns null if there is no such child.getLabelBBox in interface IlvLabelInterfacet - The transformer used to draw the graphic object.public boolean hasActions(int index)
false
Cannot define actions on composite links.hasActions in interface IlvCompositepublic void setSensitive(boolean sensitive)
true, the object interactor
IlvCompositeInteractor
dispatches the AWT events to the Swing actions defined in the event maps.IlvCompositeInteractor,
getAction(int, IlvMouseGesture),
getEventMaps()public boolean isSensitive()
true, the AWT events are dispatched to the Swing
actions.isSensitive in interface IlvCompositeIlvCompositeInteractor,
getAction(int, ilog.views.graphic.composite.IlvMouseGesture)public boolean isSpline()
true if the link has spline routing functionality.
The method checks whether the delegate link obtained via getLink()
has spline routing functionality.isSpline in class IlvLinkImagepublic void setAlpha(float alpha)
alpha - The new transparency level in the range [0.0, 1.0].getAlpha()public float getAlpha()
setAlpha(float)public void setBaseTextDirection(int baseTextDirection)
IlvBidiUtil.INHERITED_DIRECTION:
the base text direction is inherited from the
graphic bag that contains this object.
If this object is not contained in a graphic bag,
the base text direction is calculated from the
component orientation.
IlvBidiUtil.COMPONENT_DIRECTION:
the base text direction is calculated from the
component orientation.
IlvBidiUtil.LEFT_TO_RIGHT:
the base text direction is left-to-right.
IlvBidiUtil.RIGHT_TO_LEFT:
the base text direction is right-to-left.
IlvBidiUtil.CONTEXTUAL_DIRECTION:
the base test direction is determined from the text
that is displayed according to the standard Bidi
algorithm, if the text contains at least one character
with a strong left-to-right or right-to-left direction.
If the text doesn't contain any character with a strong
direction, the real text direction is determined from
the current component orientation of the object.
setBaseTextDirection in interface IlvBaseTextDirectionInterfacesetBaseTextDirection in class IlvGraphicbaseTextDirection - The base text directionIlvGraphic.baseTextDirectionChanged(int, int)protected void setBaseTextDirectionDuringConstruction(int baseTextDirection)
setBaseTextDirectionDuringConstruction in class IlvGraphicbaseTextDirection - The base text directionpublic int getBaseTextDirection()
IlvBidiUtil.INHERITED_DIRECTION:
the base text direction is inherited from the
graphic bag that contains this object.
If this object is not contained in a graphic bag,
the base text direction is calculated from the
component orientation.
IlvBidiUtil.COMPONENT_DIRECTION:
the base text direction is calculated from the
component orientation.
IlvBidiUtil.LEFT_TO_RIGHT:
the base text direction is left-to-right.
IlvBidiUtil.RIGHT_TO_LEFT:
the base text direction is right-to-left.
IlvBidiUtil.CONTEXTUAL_DIRECTION:
the base test direction is determined from the text
that is displayed according to the standard Bidi
algorithm, if the text contains at least one character
with a strong left-to-right or right-to-left direction.
If the text doesn't contain any character with a strong
direction, the real text direction is determined from
the current component orientation of the object.
getBaseTextDirection in interface IlvBaseTextDirectionInterfacegetBaseTextDirection in class IlvGraphicpublic boolean isBaseTextDirectionSensitive()
true because the bounding boxes of object's
children may depend on its text direction.
This method overrides the isBaseTextDirectionSensitive method
of the class IlvGraphic.isBaseTextDirectionSensitive in class IlvGraphicpublic void baseTextDirectionChanged(int oldBaseTextDirection,
int newBaseTextDirection)
baseTextDirectionChanged in class IlvGraphicoldBaseTextDirection - Resolved base text direction of this object before the change.newBaseTextDirection - Resolved base text direction of this object after the change.isBaseTextDirectionSensitive()public void componentOrientationChanged(ComponentOrientation oldOri, ComponentOrientation newOri)
componentOrientationChanged in class IlvGraphicoldOri - Orientation of this object before the orientation change.newOri - Orientation of this object after the orientation change.IlvGraphic.isComponentOrientationSensitive()public void localeChanged(ULocale oldLocale, ULocale newLocale)
localeChanged in class IlvGraphicoldLocale - Locale of this object before the locale change.newLocale - Locale of this object after the locale change.IlvGraphic.isLocaleSensitive()protected void invalidateBBoxCache()
invalidateBBoxCache in class IlvGraphic© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.