|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvGraphic
ilog.views.graphic.IlvGraphicHandle
ilog.views.graphic.IlvGraphicHandleBag
ilog.views.graphic.IlvFixedSizeGraphic
public class IlvFixedSizeGraphic
The IlvFixedSizeGraphic class derives from the base graphic
handle class IlvGraphicHandle. It implements a handle that
references an object of the class IlvGraphic.
An instance of this class is drawn by applying a graphic transformation to
the referenced object so that the visible size of this object is not modified
by the zoom level. The transformation is internally computed. Note
that you should not have several instances of this class reference the same
object.
| Constructor Summary | |
|---|---|
IlvFixedSizeGraphic(IlvFixedSizeGraphic source)
Creates a new IlvFixedSizeGraphic by copying an existing one. |
|
IlvFixedSizeGraphic(IlvGraphic object,
int position,
IlvPoint point)
Creates a new IlvFixedSizeGraphic. |
|
IlvFixedSizeGraphic(IlvInputStream stream)
Reads the object from an IlvInputStream. |
|
| Method Summary | |
|---|---|
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. |
IlvPoint |
getPoint()
Returns the point that remains fixed. |
JPopupMenu |
getPopupMenu(IlvPoint p,
IlvTransformer t,
IlvManagerView view,
IlvPopupMenuManager popupManager)
Returns the Swing popup menu to display when the popup is triggered while the mouse pointer is at a specified location inside the graphic object. |
int |
getPosition()
Returns the position of the point that remains fixed. |
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. |
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. |
IlvSelection |
makeSelection()
Creates a selection object for this graphic object. |
void |
resize(float neww,
float newh)
Resizes the object. |
void |
rotate(IlvPoint center,
double angle)
Rotates the object. |
void |
setPoint(IlvPoint p)
Changes the point that remains fixed. |
void |
setPosition(int position)
Changes the position of the point that remains fixed. |
void |
write(IlvOutputStream stream)
Writes the object to an IlvOutputStream. |
boolean |
zoomable()
Returns true if the object is zoomable. |
| Methods inherited from class ilog.views.graphic.IlvGraphicHandle |
|---|
getObject, getOriginalPopupMenu, isPersistent, move, move, moveResize, scale, setBackground, setForeground, setOwner, translate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ilog.views.IlvGraphicBag |
|---|
getGraphicBag |
| Constructor Detail |
|---|
public IlvFixedSizeGraphic(IlvGraphic object,
int position,
IlvPoint point)
IlvFixedSizeGraphic.
object - The referenced object.position - Indicates the point in the referenced object (for example,
its center or the top-left corner of its bounding box) that must remain at
the same position when the object is zoomed in or out. See the class
IlvConstants for the valid values of this parameter.point - If non-null then it will be used to specify the
position of a fixed point when the object is zoomed in or out.
The position parameter is not taken into account if this
parameter is non-null.public IlvFixedSizeGraphic(IlvFixedSizeGraphic source)
IlvFixedSizeGraphic by copying an existing one.
public IlvFixedSizeGraphic(IlvInputStream stream)
throws IlvReadFileException
IlvInputStream.
stream - The input stream.
IlvReadFileException - if the format is not correct.| Method Detail |
|---|
public IlvGraphic copy()
copy in class IlvGraphicHandleBagIlvGraphicHandleBag.isOwner()public boolean zoomable()
true if the object is zoomable.
In this case (fixed-size graphic) it returns false.
zoomable in class IlvGraphicHandleIlvGraphic,
IlvGraphic.draw(java.awt.Graphics, ilog.views.IlvTransformer),
IlvGraphic.boundingBox(IlvTransformer),
IlvManagerpublic final int getPosition()
IlvConstants for the
return value of this method.setPosition(int),
IlvConstantspublic void setPosition(int position)
position - See the class IlvConstants for the
valid values of this parameter.getPosition(),
IlvConstantspublic final IlvPoint getPoint()
setPoint(ilog.views.IlvPoint)public void setPoint(IlvPoint p)
p - The point.getPoint()
public void draw(Graphics dst,
IlvTransformer t)
draw in class IlvGraphicHandledst - The destination Graphics.t - The transformation used to draw the object.IlvGraphic.boundingBox(ilog.views.IlvTransformer),
IlvGraphic.zoomable(),
IlvGraphicpublic IlvRect boundingBox(IlvTransformer t)
boundingBox on the referenced object.
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 in class IlvGraphicHandlet - The transformer to be applied.IlvGraphic
public boolean contains(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
contains on the referenced object.
contains in class IlvGraphicHandlep - 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.IlvGraphic
public boolean intersects(IlvRect rect,
IlvRect trect,
IlvTransformer t)
intersects on the referenced object.
intersects in class IlvGraphicHandlerect - The rectangle to be tested.trect - The rectangle rect transformed by the
transformer t.t - The transformation applied to the object when it
was drawn.
true if the rectangle overlaps this graphic object.IlvGraphic
public 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.IlvGraphic
public 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.IlvClippingLinkConnector
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 resize(float neww,
float newh)
applyTransform method.
resize in class IlvGraphicHandleneww - The new horizontal width.newh - The new horizontal height.IlvGraphic,
IlvGraphic.applyTransform(IlvTransformer)public IlvSelection makeSelection()
IlvUnresizeableDrawSelection.
makeSelection in class IlvGraphicIlvDrawSelection
public String getToolTipText(IlvPoint p,
IlvTransformer t)
Note that you must enable the tooltip mechanism for the manager view
by calling the static method
IlvToolTipManager.registerView(ilog.views.IlvManagerView).
getToolTipText in class IlvGraphicHandlep - The location of the mouse (in view coordinates).t - The transformer that converts the coordinate system of this object
(the manager coordinates) into the coordinate system of the
manager view in which the tooltip is about to be displayed
(the view coordinates).
p for transformation
t, or null if no tool tip should be displayed.IlvGraphic,
IlvGraphic.getToolTipText(),
IlvGraphic.setToolTipText(String)
public JPopupMenu getPopupMenu(IlvPoint p,
IlvTransformer t,
IlvManagerView view,
IlvPopupMenuManager popupManager)
Note that you must enable the popup menu mechanism for the manager view
by calling the static method
IlvPopupMenuManager.registerView(ilog.views.IlvManagerView).
getPopupMenu in class IlvGraphicHandlep - The location of the mouse (in view coordinates).t - The transformer that converts the coordinate system of this object
(the manager coordinates) into the coordinate system of the
manager view in which the tooltip is about to be displayed
(the view coordinates).view - The manager view that triggered the popup menu.popupManager - The popup menu manager.
null.IlvGraphic.getPopupMenu(IlvPoint, IlvTransformer, IlvManagerView, IlvPopupMenuManager)
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.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||