public abstract class IlvAbstractCrossingGraphic extends IlvGraphic implements IlvCrossingGraphic
IlvAbstractCrossingGraphic
serves as the base class of
all classes of advanced crossing graphic objects
such as IlvTunnelCrossings
or IlvBridgeCrossings
.
These are auxiliary graphic objects
that are used in combination with IlvCrossingAwareLinkImage
.
Their purpose it to draws the crossings.
Constructor and Description |
---|
IlvAbstractCrossingGraphic(IlvAbstractCrossingGraphic source)
Creates a new
IlvAbstractCrossingGraphic by copying an
existing one. |
IlvAbstractCrossingGraphic(IlvCrossingAwareLinkImage link)
Creates a new
IlvAbstractCrossingGraphic . |
IlvAbstractCrossingGraphic(IlvInputStream stream)
Reads the object from an
IlvInputStream . |
Modifier and Type | Method and Description |
---|---|
void |
applyTransform(IlvTransformer t)
Applies a transformation to the shape of the object.
|
IlvRect |
boundingBox(IlvTransformer t)
Returns the bounding rectangle of the object.
|
protected IlvRect |
calcBoundingBox(IlvTransformer t)
Calculate the bounding rectangle of the object.
|
protected IlvRect |
calcBoundingBoxOfLink(IlvTransformer t)
Deprecated.
Since JViews 8.5, this is no longer needed.
|
boolean |
contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if a point lies within the outline of the object.
|
boolean |
containsAtCrossing(IlvPoint p,
IlvPoint tp,
IlvTransformer t,
IlvLinkImage link1,
IlvLinkImage link2,
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.
|
void |
crossingChanged()
This method is called whenever a crossing related to this crossing
graphic has changed.
|
void |
draw(Graphics dst,
IlvTransformer t)
Draws the object.
|
int |
getBoundingBoxCacheSize()
Returns the size of the bounding box cache.
|
IlvCrossingAwareLinkImage |
getRelatedLinkImage()
Returns the link image that belongs to this crossing graphic.
|
void |
setBoundingBoxCacheSize(int size)
Sets the size of the bounding box cache.
|
void |
setGraphicBag(IlvGraphicBag bag)
Changes the bag that contains the object.
|
void |
setRelatedLinkImage(IlvCrossingAwareLinkImage linkImage)
Sets the link image that belongs to this crossing graphic.
|
void |
write(IlvOutputStream stream)
Writes the object to an
IlvOutputStream . |
boolean |
zoomable()
Returns
false because the object is not zoomable. |
addActionListener, addNamedPropertyListener, allViewsRemoved, baseTextDirectionChanged, blinkingStateOn, boundingBox, callDraw, componentOrientationChanged, copy, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addCrossingBound, drawCrossing, expandLinkBoundingBox
public IlvAbstractCrossingGraphic(IlvCrossingAwareLinkImage link)
IlvAbstractCrossingGraphic
.
link
- The link this object belongs to.public IlvAbstractCrossingGraphic(IlvAbstractCrossingGraphic source)
IlvAbstractCrossingGraphic
by copying an
existing one. It does not copy the reference to the link this object
belongs to.
source
- The origin object for the copy.public IlvAbstractCrossingGraphic(IlvInputStream stream) throws IlvReadFileException
IlvInputStream
.
stream
- The input stream.IlvReadFileException
- if the format is not correct.public void setGraphicBag(IlvGraphicBag bag)
setGraphicBag
in class IlvGraphic
bag
- The graphic bag.IlvGraphic
public IlvCrossingAwareLinkImage getRelatedLinkImage()
public void setRelatedLinkImage(IlvCrossingAwareLinkImage linkImage)
public boolean zoomable()
false
because the object is not zoomable.zoomable
in class IlvGraphic
IlvGraphic
,
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer)
,
IlvGraphic.boundingBox(IlvTransformer)
,
IlvManager
public void draw(Graphics dst, IlvTransformer t)
draw
in class IlvGraphic
dst
- The destination Graphics.t
- The transformation used to draw the object.IlvCrossingAwareLinkImage.drawCrossingGraphic(java.awt.Graphics, ilog.views.IlvTransformer)
public boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
contains
in class IlvGraphic
p
- 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.IlvCrossingAwareLinkImage.containsAtCrossingGraphic(ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvTransformer)
public boolean containsAtCrossing(IlvPoint p, IlvPoint tp, IlvTransformer t, IlvLinkImage link1, IlvLinkImage link2, IlvPoint p0, IlvPoint p1, IlvPoint p2, IlvPoint p3, double startGap, double endGap, double normalGap)
containsAtCrossing
in interface IlvCrossingGraphic
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 link.link1
- The first link, which is the link containing this
crossing graphic.link2
- The second link.p0
- The point before the start point of the crossing
picture inside the first link.p1
- The start point of the crossing picture inside the
first link.p2
- The end point of the crossing picture inside the
first link.p3
- The point after the end point of the crossing picture
inside the first link.startGap
- The real gap between start point and the link crossing.endGap
- The real gap between end point and the link crossing.normalGap
- The desired normal gap at the link crossing. The start
gap and end gap may be smaller than the normal gap.public IlvRect boundingBox(IlvTransformer t)
boundingBox
in class IlvGraphic
t
- The transformer used to draw the object.IlvCrossingAwareLinkImage.boundingBoxCrossingGraphic(ilog.views.IlvTransformer)
,
calcBoundingBox(ilog.views.IlvTransformer)
,
setBoundingBoxCacheSize(int)
public void setBoundingBoxCacheSize(int size)
getBoundingBoxCacheSize()
public int getBoundingBoxCacheSize()
setBoundingBoxCacheSize(int)
protected IlvRect calcBoundingBox(IlvTransformer t)
boundingBox(ilog.views.IlvTransformer)
when the bounding box for the input
transformer is not internally cached.
It delegates to the related link image.t
- The transformer to draw the related link.boundingBox(ilog.views.IlvTransformer)
,
setBoundingBoxCacheSize(int)
@Deprecated protected IlvRect calcBoundingBoxOfLink(IlvTransformer t)
public void crossingChanged()
crossingChanged
in interface IlvCrossingGraphic
public void applyTransform(IlvTransformer t)
applyTransform
in class IlvGraphic
t
- The transformer to be applied.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 IlvGraphic
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.