public class IlvTransformedGraphic extends IlvGraphicHandle
IlvTransformedGraphic derives from the base class
IlvGraphicHandle. Objects of this class are handles
that reference an object of the class IlvGraphic.
An IlvTransformedGraphic is drawn by applying
a graphic transformation to the object it references.
This object can be used to have the same object represented in different
places or with different sizes without copying or transforming
the original object.| Constructor and Description |
|---|
IlvTransformedGraphic(IlvGraphic object,
IlvTransformer t,
boolean owner)
Creates a new
IlvTransformedGraphic. |
IlvTransformedGraphic(IlvInputStream stream)
Reads the object from an
IlvInputStream. |
IlvTransformedGraphic(IlvTransformedGraphic source)
Creates a new
IlvTransformedGraphic by copying an existing one. |
| 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.
|
boolean |
contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests whether a point lies within the outline of the object.
|
IlvGraphic |
copy()
Copies the object.
|
void |
draw(Graphics dst,
IlvTransformer t)
Draws the object.
|
IlvPoint |
getIntersectionWithOutline(IlvPoint innerPoint,
IlvPoint outerPoint,
IlvTransformer t)
Returns the intersection of the line segment from inner point to outer
point with the shape of the graphic object.
|
IlvTransformer |
getTransformer()
Returns the transformation used to draw the referenced object.
|
boolean |
inside(IlvRect rect,
IlvRect trect,
IlvTransformer t)
Tests whether a rectangle contains the object.
|
boolean |
intersects(IlvRect rect,
IlvRect trect,
IlvTransformer t)
Tests whether a rectangle overlaps the object.
|
void |
move(double x,
double y)
Moves the object.
|
void |
move(IlvPoint p)
Moves the object.
|
void |
moveResize(IlvRect size)
Resizes the object.
|
void |
resize(double neww,
double newh)
Resizes the object.
|
void |
rotate(IlvPoint center,
double angle)
Rotates the object.
|
void |
scale(double scalex,
double scaley)
Resizes the object.
|
void |
setTransformer(IlvTransformer t)
Changes the transformation used to draw the referenced object.
|
void |
translate(double dx,
double dy)
Translates the object.
|
void |
write(IlvOutputStream stream)
Writes the object to an
IlvOutputStream. |
baseTextDirectionChanged, componentOrientationChanged, getBaseTextDirection, getObject, getOriginalPopupMenu, getPopupMenu, getResolvedBaseTextDirection, getToolTipText, isBaseTextDirectionSensitive, isOwner, isPersistent, localeChanged, setBackground, setBaseTextDirection, setDelegateMoveResize, setForeground, setObject, setOwner, usesBidiMarkers, zoomableaddActionListener, addNamedPropertyListener, allViewsRemoved, blinkingStateOn, boundingBox, callDraw, getAndAssociateObjectInteractor, getBlinkingAction, getBlinkingObjectOwner, getBlinkingOffPeriod, getBlinkingOnPeriod, getCenter, getComponentOrientation, getDefaultInteractor, getGraphicBag, GetGraphicObject, getLocale, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenuName, getProperty, getToolTipBaseTextDirection, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, getULocale, getZOrderIndex, hasProperty, invalidateBBoxCache, invalidateBidiCache, isComponentOrientationSensitive, isDataFlavorSupported, isEditable, isInApplyToObject, isLocaleSensitive, isMovable, isSelectable, isVisible, makeSelection, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, reDraw, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, setBaseTextDirectionDuringConstruction, setBlinkingAction, setBlinkingOffPeriod, setBlinkingOnPeriod, setEditable, setFillOn, setGraphicBag, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipBaseTextDirection, setToolTipText, setVisible, setZOrderIndex, toString, updateNeedsViewNotification, viewAddedOrRemovedpublic IlvTransformedGraphic(IlvGraphic object, IlvTransformer t, boolean owner)
IlvTransformedGraphic.object - the referenced object.t - the transformation used to draw the referenced object.owner - if true, the referenced object will be copied
when the instance is copied, otherwise the copy of this instance will
reference the same object.public IlvTransformedGraphic(IlvTransformedGraphic source)
IlvTransformedGraphic by copying an existing one.
Note that the referenced object will be copied
only if the object is owner of the reference.source - the copied object.public IlvTransformedGraphic(IlvInputStream stream) throws IlvReadFileException
IlvInputStream.stream - the input stream.IlvReadFileException - if the format is not correct.public IlvGraphic copy()
copy in class IlvGraphicHandleIlvGraphicHandle.isOwner()public IlvTransformer getTransformer()
public void setTransformer(IlvTransformer t)
public void draw(Graphics dst, IlvTransformer t)
draw on the referenced object after composing the
transformation of the object with the transformation passed as a parameter.draw in class IlvGraphicHandledst - the destination Graphics.t - the transformation used to draw the object.IlvGraphic.callDraw(Graphics,IlvTransformer),
IlvGraphic.boundingBox(IlvTransformer),
IlvGraphic.zoomable(),
IlvGraphicpublic IlvRect boundingBox(IlvTransformer t)
boundingBox on the referenced object with the composition
of the transformation of the object with the transformation
passed as a parameter.boundingBox in class IlvGraphicHandlet - the transformer used to draw the object.IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer),
IlvGraphic.zoomable(),
IlvGraphicpublic void applyTransform(IlvTransformer t)
applyTransform
is NOT called on the referenced object.applyTransform in class IlvGraphicHandlet - the transformer to be applied.IlvGraphicpublic boolean contains(IlvPoint p, IlvPoint tp, IlvTransformer t)
contains in class IlvGraphicHandlep - the point to be tested.tp - the point p transformed by the transformer t.t - the transformation applied to the object when it
was drawn.true if the point lies inside this graphic object.IlvGraphicpublic boolean intersects(IlvRect rect, IlvRect trect, IlvTransformer t)
intersects in class IlvGraphicHandlerect - the rectangle to be tested.trect - the rectangle rect transformed by the transformer t.t - the transformation that was applied to the object when it
was drawn.true if the rectangle overlaps this graphic object.IlvGraphicpublic boolean inside(IlvRect rect, IlvRect trect, IlvTransformer t)
inside on the referenced object.inside in class IlvGraphicHandlerect - the rectangle to be tested.trect - the rectangle rect transformed by the transformer t.t - the transformation that was applied to the object when it
was drawn.IlvGraphicpublic IlvPoint getIntersectionWithOutline(IlvPoint innerPoint, IlvPoint outerPoint, IlvTransformer t)
innerPoint is not inside the graphic object,
or if outerPoint is not outside the graphic object, it
must return a valid point. For instance, if there is no intersection,
it can return the start point.getIntersectionWithOutline in class IlvGraphicHandleinnerPoint - A point usually inside the graphic object, given in
manager view coordinates.outerPoint - A point usually outside of the graphic object, given in
manager view coordinates.t - The transformation used to draw the object.IlvClippingLinkConnectorpublic void move(double x,
double y)
applyTransform method.move in class IlvGraphicHandlex - The new horizontal position.y - The new vertical position.IlvGraphic,
IlvGraphic.applyTransform(IlvTransformer)public void move(IlvPoint p)
applyTransform method.move in class IlvGraphicHandlep - The new position of the top-left corner.IlvGraphic,
IlvGraphic.applyTransform(IlvTransformer)public void moveResize(IlvRect size)
applyTransform method.moveResize in class IlvGraphicHandlesize - The new bounding rectangle for this object.IlvGraphic,
IlvGraphic.applyTransform(IlvTransformer)public void translate(double dx,
double dy)
applyTransform method.translate in class IlvGraphicHandledx - The horizontal translation factor.dy - The vertical translation factor.IlvGraphic,
IlvGraphic.applyTransform(IlvTransformer)public void rotate(IlvPoint center, double angle)
applyTransform method.rotate in class IlvGraphicHandlecenter - The center of the rotation.angle - The rotation angle in degrees.IlvGraphic,
IlvGraphic.applyTransform(IlvTransformer)public void scale(double scalex,
double scaley)
applyTransform method.scale in class IlvGraphicHandlescalex - The horizontal scaling factor.scaley - The vertical scaling factor.IlvGraphic,
IlvGraphic.applyTransform(IlvTransformer)public void resize(double neww,
double newh)
applyTransform method.resize in class IlvGraphicHandleneww - The new horizontal width.newh - The new horizontal height.IlvGraphic,
IlvGraphic.applyTransform(IlvTransformer)public void write(IlvOutputStream stream) throws IOException
IlvOutputStream.write in interface IlvPersistentObjectwrite in class IlvGraphicHandlestream - 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.