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 IlvCrossingAwareObject.
Their purpose it to draws the crossings.
The abstract crossing graphic contains some useful utilities such as the caching of bounding boxes and the delegation of the drawing functionality to the crossing aware object that corresponds to this crossing graphic.
| Constructor and Description |
|---|
IlvAbstractCrossingGraphic(IlvAbstractCrossingGraphic source)
Creates a new
IlvAbstractCrossingGraphic by copying an
existing one. |
IlvAbstractCrossingGraphic(IlvCrossingAwareObject obj)
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)
Calculates the bounding box of the related crossing aware object.
|
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,
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.
|
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.
|
IlvCrossingAwareObject |
getRelatedObject()
Returns the crossing aware object that belongs to this crossing graphic.
|
boolean |
isInsideCalcBoundingBoxOfLink()
Returns
true if we are inside the method
calcBoundingBoxOfLink(ilog.views.IlvTransformer). |
void |
setBoundingBoxCacheSize(int size)
Sets the size of the bounding box cache.
|
void |
setGraphicBag(IlvGraphicBag bag)
Changes the bag that contains the object.
|
void |
setRelatedObject(IlvCrossingAwareObject obj)
Sets the crossing aware object 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, viewAddedOrRemovedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCrossingBound, drawCrossingpublic IlvAbstractCrossingGraphic(IlvCrossingAwareObject obj)
IlvAbstractCrossingGraphic.obj - The object this crossing graphic belongs to.public IlvAbstractCrossingGraphic(IlvAbstractCrossingGraphic source)
IlvAbstractCrossingGraphic by copying an
existing one. It does not copy the reference to the related crossing
aware object.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 IlvGraphicbag - The graphic bag.IlvGraphicpublic IlvCrossingAwareObject getRelatedObject()
public void setRelatedObject(IlvCrossingAwareObject obj)
public boolean zoomable()
false because the object is not zoomable.zoomable in class IlvGraphicIlvGraphic,
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer),
IlvGraphic.boundingBox(IlvTransformer),
IlvManagerpublic void draw(Graphics dst, IlvTransformer t)
draw in class IlvGraphicdst - The destination Graphics.t - The transformation used to draw the object.IlvCrossingAwareObject.drawCrossingGraphic(java.awt.Graphics, ilog.views.IlvTransformer)public boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
contains in class IlvGraphicp - 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.IlvCrossingAwareObject.containsAtCrossingGraphic(ilog.views.IlvPoint, ilog.views.IlvPoint, ilog.views.IlvTransformer)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 IlvCrossingGraphicp - 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.public IlvRect boundingBox(IlvTransformer t)
boundingBox in class IlvGraphict - The transformer used to draw the object.IlvCrossingAwareObject.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 object.t - The transformer to draw the related object.boundingBox(ilog.views.IlvTransformer),
setBoundingBoxCacheSize(int)protected IlvRect calcBoundingBoxOfLink(IlvTransformer t)
calcBoundingBox(ilog.views.IlvTransformer) if
the bounding box of the crossing graphic includes the bounding box of the
related crossing aware object.public boolean isInsideCalcBoundingBoxOfLink()
true if we are inside the method
calcBoundingBoxOfLink(ilog.views.IlvTransformer). This method exists for
internal reasons. You should not use it.public void crossingChanged()
crossingChanged in interface IlvCrossingGraphicpublic void applyTransform(IlvTransformer t)
applyTransform in class IlvGraphict - The transformer to be applied.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 IlvGraphicstream - The output stream.IOException - thrown when an exception occurs during
the write operation for this object.© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.