|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xj.anylogic.engine.presentation.Shape
com.xj.anylogic.engine.presentation.ShapeLineFill
com.xj.anylogic.engine.presentation.ShapeOval
public class ShapeOval
Persistent oval shape.
| Field Summary |
|---|
| Fields inherited from class com.xj.anylogic.engine.presentation.Shape |
|---|
UNKNOWN_NAME |
| Constructor Summary | |
|---|---|
ShapeOval()
Constructs an oval with default attributes. |
|
ShapeOval(boolean ispublic,
double x,
double y,
double rotation,
java.awt.Color lineColor,
java.awt.Color fillColor,
double radiusX,
double radiusY,
double lineWidth,
int lineStyle)
Constructs an oval with specific attributes. |
|
ShapeOval(boolean ispublic,
double x,
double y,
double rotation,
java.lang.Object lineColor,
java.lang.Object fillColor,
double radiusX,
double radiusY,
double lineWidth,
int lineStyle)
Constructs an oval with specific attributes. |
|
| Method Summary | |
|---|---|
ShapeOval |
clone()
Creates and returns a copy of this shape (i.e. new shape instance). |
boolean |
contains(double px,
double py)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e. in the same system with the coordinates of this shape, x and y) |
void |
draw(Panel panel,
java.awt.Graphics2D g,
java.awt.geom.AffineTransform xform,
boolean publicOnly)
Draws the oval in a given context |
double |
getRadiusX()
Returns the "horizontal" radius of the oval. |
double |
getRadiusY()
Returns the "vertical" radius of the oval. |
boolean |
onClickAt(double px,
double py,
boolean publicOnly)
Tests if the oval contains the point with the given coordinates and, if yes, executes the shape's reaction on click at that point. |
void |
setRadius(double radius)
Sets both radiuses of the oval to the same given value, i.e. makes it a circle. |
void |
setRadiusX(double radiusX)
Sets the "horizontal" radius of the oval. |
void |
setRadiusY(double radiusY)
Sets the "vertical" radius of the oval. |
| Methods inherited from class com.xj.anylogic.engine.presentation.ShapeLineFill |
|---|
getFillColor, getFillTexture, getLineColor, getLineStyle, getLineTexture, getLineWidth, setFillColor, setFillColor, setLineColor, setLineColor, setLineStyle, setLineWidth |
| Methods inherited from class com.xj.anylogic.engine.presentation.Shape |
|---|
canHandleClick, getGroup, getName, getPresentable, getRotation, getScaleX, getScaleY, getX, getY, isVisible, onClick, restoreOwner, setPos, setRotation, setScale, setScale, setScaleX, setScaleY, setVisible, setX, setY |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShapeOval()
public ShapeOval(boolean ispublic,
double x,
double y,
double rotation,
java.awt.Color lineColor,
java.awt.Color fillColor,
double radiusX,
double radiusY,
double lineWidth,
int lineStyle)
ispublic - if true, the shape is visible on container's presentationx - the x coordinate of the oval centery - the y coordinate of the oval centerrotation - the rotation of the oval in radianslineColor - line color of the ovalfillColor - fill color of the ovalradiusX - "horizontal" radius of the ovalradiusY - "vertical" radius of the ovallineWidth - the line width of the ovallineStyle - the line stroke style of the oval (solid, dotted, dashed)
public ShapeOval(boolean ispublic,
double x,
double y,
double rotation,
java.lang.Object lineColor,
java.lang.Object fillColor,
double radiusX,
double radiusY,
double lineWidth,
int lineStyle)
ispublic - if true, the shape is visible on container's presentationx - the x coordinate of the oval centery - the y coordinate of the oval centerrotation - the rotation of the oval in radianslineColor - line color (or Texture) of the ovalfillColor - fill color (or Texture) of the ovalradiusX - "horizontal" radius of the ovalradiusY - "vertical" radius of the ovallineWidth - the line width of the ovallineStyle - the line stroke style of the oval (solid, dotted, dashed)| Method Detail |
|---|
public void setRadiusX(double radiusX)
radiusX - the "horizontal" radius of the ovalpublic double getRadiusX()
public void setRadius(double radius)
radius - the circle radiuspublic void setRadiusY(double radiusY)
radiusY - the "vertical" radius of the ovalpublic double getRadiusY()
public boolean onClickAt(double px,
double py,
boolean publicOnly)
onClickAt in class Shapepx - the x coordinate of the clickpy - the y coordinate of the clickpublicOnly - if true, not public shape returns false
public boolean contains(double px,
double py)
Shape
contains in class Shapepx - the x coordinate relative to this shape's containerpy - the y coordinate relative to this shape's container
public void draw(Panel panel,
java.awt.Graphics2D g,
java.awt.geom.AffineTransform xform,
boolean publicOnly)
draw in class Shapepanel - the panel where the drawing is doneg - the graphics where the drawing takes placexform - the "original" transform that must be restored before drawingpublicOnly - if true, the shape is only drawn if it is publicpublic ShapeOval clone()
Shape
clone in class Shape
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||