public class IlvTunnelCrossings extends IlvAbstractCrossingGraphic
IlvTunnelCrossings
is an auxiliary graphic object that is
used in combination with an IlvSegmentedHyperEdge
.
The tunnel crossing graphic draws the tunnel shapes of the hyperedge
crossings.
It must be in a manager layer that is above all layers that contain
hyperedges.
Normally, the IlvSegmentedHyperEdge
take care of this
automatically.
Notice that each hyperedge needs its own crossing graphic. It cannot be shared among hyperedges. A new tunnel crossing graphic is automatically installed at a segmented hyperedge when the crossing mode is enabled.
IlvSegmentedHyperEdge
,
IlvCrossingAwareObject.getCrossingGraphic()
,
Serialized FormConstructor and Description |
---|
IlvTunnelCrossings(IlvInputStream stream)
Reads the object from an
IlvInputStream . |
IlvTunnelCrossings(IlvSegmentedHyperEdge edge)
Creates a new
IlvTunnelCrossings . |
IlvTunnelCrossings(IlvTunnelCrossings source)
Creates a new
IlvTunnelCrossings by copying an existing one. |
Modifier and Type | Method and Description |
---|---|
void |
addCrossingBound(IlvRect boundingRect,
IlvTransformer t,
IlvCrossingAwareObject obj1,
IlvCrossingAwareObject obj2,
IlvPoint p0,
IlvPoint p1,
IlvPoint p2,
IlvPoint p3,
double startGap,
double endGap,
double normalGap)
Adds the bound of the crossing to the input bounding rectangle.
|
protected IlvRect |
calcBoundingBox(IlvTransformer t)
Calculate the bounding rectangle of the object.
|
boolean |
containsAtCrossing(IlvPoint p,
IlvPoint tp,
IlvTransformer t,
IlvCrossingAwareObject obj1,
IlvCrossingAwareObject obj2,
IlvPoint p0,
IlvPoint p1,
IlvPoint p2,
IlvPoint p3,
double startGap,
double endGap,
double normalGap)
Tests if a point lies within the drawing of a crossing.
|
IlvGraphic |
copy()
Copies the crossing graphic.
|
void |
drawCrossing(Graphics dst,
IlvTransformer t,
IlvCrossingAwareObject obj1,
IlvCrossingAwareObject obj2,
IlvPoint p0,
IlvPoint p1,
IlvPoint p2,
IlvPoint p3,
double startGap,
double endGap,
double normalGap)
Draws the crossing between the input objects.
|
void |
write(IlvOutputStream stream)
Writes the object to an
IlvOutputStream . |
boolean |
zoomable()
Returns
true if the object is zoomable; otherwise it
returns false . |
applyTransform, boundingBox, calcBoundingBoxOfLink, contains, crossingChanged, draw, getBoundingBoxCacheSize, getRelatedObject, isInsideCalcBoundingBoxOfLink, setBoundingBoxCacheSize, setGraphicBag, setRelatedObject
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, getPopupMenu, getPopupMenuName, getProperty, getResolvedBaseTextDirection, getToolTipBaseTextDirection, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, getULocale, getZOrderIndex, hasProperty, inside, intersects, invalidateBBoxCache, invalidateBidiCache, isBaseTextDirectionSensitive, isComponentOrientationSensitive, isDataFlavorSupported, isEditable, isInApplyToObject, isLocaleSensitive, isMovable, isPersistent, isSelectable, isVisible, localeChanged, makeSelection, move, move, moveResize, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, reDraw, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBackground, setBaseTextDirection, setBaseTextDirectionDuringConstruction, setBlinkingAction, setBlinkingOffPeriod, setBlinkingOnPeriod, setEditable, setFillOn, setForeground, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipBaseTextDirection, setToolTipText, setVisible, setZOrderIndex, toString, translate, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemoved
public IlvTunnelCrossings(IlvSegmentedHyperEdge edge)
IlvTunnelCrossings
.edge
- The hyperedge this object belongs to.public IlvTunnelCrossings(IlvTunnelCrossings source)
IlvTunnelCrossings
by copying an existing one.
It does not copy the reference to the hyperedge this object belongs to.source
- The origin object for the copy.public IlvTunnelCrossings(IlvInputStream stream) throws IlvReadFileException
IlvInputStream
.stream
- The input stream.IlvReadFileException
- if the format is not correct.public IlvGraphic copy()
copy
in class IlvGraphic
IlvGraphic
public void drawCrossing(Graphics dst, IlvTransformer t, IlvCrossingAwareObject obj1, IlvCrossingAwareObject obj2, IlvPoint p0, IlvPoint p1, IlvPoint p2, IlvPoint p3, double startGap, double endGap, double normalGap)
dst
- The destination Graphics.t
- The transformation used to draw the first object.obj1
- The first object, which is the object containing this
crossing graphic.obj2
- The second object.p0
- The point before the start point of the crossing
picture inside the first object.p1
- The start point of the crossing picture inside the
first object.p2
- The end point of the crossing picture inside the
first object.p3
- The point after the end point of the crossing picture
inside the first object.startGap
- The real gap between start point and the crossing.endGap
- The real gap between end point and the crossing.normalGap
- The desired normal gap at the crossing. The start
gap and end gap may be smaller than the normal gap.public boolean containsAtCrossing(IlvPoint p, IlvPoint tp, IlvTransformer t, IlvCrossingAwareObject obj1, IlvCrossingAwareObject obj2, IlvPoint p0, IlvPoint p1, IlvPoint p2, IlvPoint p3, double startGap, double endGap, double normalGap)
containsAtCrossing
in interface IlvCrossingGraphic
containsAtCrossing
in class IlvAbstractCrossingGraphic
p
- The point to be tested. This point is untransformed.tp
- The point p
transformed by the
transformer t
.t
- The transformation used to draw the first object.obj1
- The first object, which is the object containing this
crossing graphic.obj2
- The second object.p0
- The point before the start point of the crossing
picture inside the first object.p1
- The start point of the crossing picture inside the
first object.p2
- The end point of the crossing picture inside the
first object.p3
- The point after the end point of the crossing picture
inside the first object.startGap
- The real gap between start point and the crossing.endGap
- The real gap between end point and the crossing.normalGap
- The desired normal gap at the crossing. The start
gap and end gap may be smaller than the normal gap.protected IlvRect calcBoundingBox(IlvTransformer t)
IlvAbstractCrossingGraphic.boundingBox(ilog.views.IlvTransformer)
when the bounding box for the input
transformer is not internally cached.calcBoundingBox
in class IlvAbstractCrossingGraphic
t
- The transformer to draw the related object.IlvAbstractCrossingGraphic.boundingBox(ilog.views.IlvTransformer)
,
IlvAbstractCrossingGraphic.setBoundingBoxCacheSize(int)
public void addCrossingBound(IlvRect boundingRect, IlvTransformer t, IlvCrossingAwareObject obj1, IlvCrossingAwareObject obj2, IlvPoint p0, IlvPoint p1, IlvPoint p2, IlvPoint p3, double startGap, double endGap, double normalGap)
boundingRect
- The bounding rectangle containing the result.t
- The transformation used to draw the first object.obj1
- The first object, which is the object containing this
crossing graphic.obj2
- The second object.p0
- The point before the start point of the crossing
picture inside the first object.p1
- The start point of the crossing picture inside the
first object.p2
- The end point of the crossing picture inside the
first object.p3
- The point after the end point of the crossing picture
inside the first object.startGap
- The real gap between start point and the crossing.endGap
- The real gap between end point and the crossing.normalGap
- The desired normal gap at the crossing. The start
gap and end gap may be smaller than the normal gap.public boolean zoomable()
true
if the object is zoomable; otherwise it
returns false
.
The object is zoomable if the related hyperedge is zoomable and the gap
is zoomable.zoomable
in class IlvAbstractCrossingGraphic
IlvSegmentedHyperEdge.isGapZoomable()
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 IlvAbstractCrossingGraphic
stream
- The output stream.IOException
- thrown when an exception occurs during
the write operation for this object.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.