|
||||||||||
| 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.ShapePixel
public class ShapePixel
Persistent pixel shape.
| Field Summary |
|---|
| Fields inherited from class com.xj.anylogic.engine.presentation.Shape |
|---|
UNKNOWN_NAME |
| Constructor Summary | |
|---|---|
ShapePixel()
Constructs a pixel with default attributes. |
|
ShapePixel(boolean ispublic,
double x,
double y,
java.awt.Color color)
Constructs a pixel with specific attributes. |
|
| Method Summary | |
|---|---|
ShapePixel |
clone()
Creates and returns a copy of this shape (i.e. new shape instance). |
boolean |
contains(double px,
double py)
Always returns false as pixel has no area and does not contain any point. |
void |
draw(Panel panel,
java.awt.Graphics2D g,
java.awt.geom.AffineTransform xform,
boolean publicOnly)
Draws the pixel in a given context |
java.awt.Color |
getColor()
Returns the color of the pixel. |
boolean |
onClickAt(double px,
double py,
boolean publicOnly)
Always returns false as pixel has no area and does not handle clicks. |
void |
setColor(java.awt.Color color)
Sets the color of the pixel. |
| 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 ShapePixel()
public ShapePixel(boolean ispublic,
double x,
double y,
java.awt.Color color)
ispublic - if true, the shape is visible on container's presentationx - the x coordinate of the pixely - the y coordinate of the pixelcolor - color of the pixel| Method Detail |
|---|
public void setColor(java.awt.Color color)
color - the new color, null = do not draw the pixelpublic java.awt.Color getColor()
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)
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 Shapeg - 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 publicpanel - the panel where the drawing is donepublic final ShapePixel clone()
Shape
clone in class Shape
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||