Package com.anylogic.engine.markup
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.AbstractLevelMarkup
- Methods inherited from class com.anylogic.engine.markup.MarkupShape
- Methods inherited from class com.anylogic.engine.markup.AbstractMarkup
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Methods inherited from interface com.anylogic.engine.markup.MarkupPort
- Constructor Detail
- Method Detail
- java.lang.Object
-
- com.anylogic.engine.markup.AbstractMarkup
-
- com.anylogic.engine.markup.MarkupShape
-
- com.anylogic.engine.markup.AbstractLevelMarkup
-
- com.anylogic.engine.markup.LevelGate
- All Implemented Interfaces:
AggregatableAnimationElement
,HasLevel
,LevelElement
,LevelMarkup
,MarkupPort
,SVGElement
,java.io.Serializable
public class LevelGate extends AbstractLevelMarkup implements MarkupPort
- See Also:
- Serialized Form
LevelGate() |
|
LevelGate(double x,
double y,
double dx,
double dy) |
|
LevelGate(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic,
double x,
double y,
double dx,
double dy) |
|
Constructor | Description |
---|
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.
|
boolean |
contains(double px,
double py,
double distance) |
Returns true if the gate contains the point with the given coordinates using the given distance tolerance;
returns false otherwise.
|
boolean |
containsSq(double px,
double py,
double squareDistance) |
Returns true if the gate contains the point with the given coordinates using the given square distance tolerance;
returns false otherwise.
|
BoundingRectangle |
getBoundingRectangle() |
|
Point |
getCentroid() |
|
java.awt.Color |
getColor() |
Returns the color of the level gate, or null if the level gate has no color.
|
double |
getDx() |
Returns the end x coordinate of the gate.
|
double |
getDy() |
Returns the end y coordinate of the gate.
|
Point |
getLeft() |
|
MarkupPort |
getPairedPort() |
Returns the paired port for this markup port.
|
Point |
getRight() |
|
double |
getX() |
Returns the start x coordinate of the gate.
|
Point |
getXYZ() |
|
double |
getY() |
Returns the start y coordinate of the gate.
|
void |
setColor(java.awt.Color color) |
Sets the color of the level gate
|
void |
setDx(double dx) |
Sets the end x coordinate of the gate.
|
void |
setDy(double dy) |
Sets the end y coordinate of the gate.
|
void |
setPairedPort(MarkupPort pairedPort) |
Sets the paired port for this markup port.
|
void |
setX(double x) |
Sets the start x coordinate of the gate.
|
void |
setY(double y) |
Sets the start y coordinate of the gate.
|
Modifier and Type | Method | Description |
---|
getDrawMode, getLevel, setLevel
error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner
discardOwner, executeUserAction, findSVGElement, getName, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setVisible, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeInternal, onAggregatorVisibilityChanged, postInitialize
getFullName, getLevel, getName
public LevelGate()
public LevelGate(double x, double y, double dx, double dy)
@AnyLogicInternalCodegenAPI public LevelGate(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double dx, double dy)
public double getX()
Returns the start x coordinate of the gate.
- Returns:
- the start x coordinate of the gate
public void setX(double x)
Sets the start x coordinate of the gate. The gate should be uninitialized
- Parameters:
x
- coordinate value
public double getY()
Returns the start y coordinate of the gate.
- Returns:
- the start y coordinate of the gate
public void setY(double y)
Sets the start y coordinate of the gate. The gate should be uninitialized
- Parameters:
y
- coordinate value
public double getDx()
Returns the end x coordinate of the gate.
- Returns:
- the end x coordinate of the gate
public void setDx(double dx)
Sets the end x coordinate of the gate. The gate should be uninitialized
- Parameters:
x
- coordinate value
public double getDy()
Returns the end y coordinate of the gate.
- Returns:
- the end y coordinate of the gate
public void setDy(double dy)
Sets the end y coordinate of the gate. The gate should be uninitialized
- Parameters:
y
- coordinate value
public java.awt.Color getColor()
Returns the color of the level gate, or null if the level gate has no color.
- Returns:
- gate color
public void setColor(java.awt.Color color)
Sets the color of the level gate
- Parameters:
color
- new color
public Point getXYZ()
- Specified by:
getXYZ
in interfaceMarkupPort
public void setPairedPort(MarkupPort pairedPort)
Description copied from interface:
MarkupPort
Sets the paired port for this markup port.
- Specified by:
setPairedPort
in interfaceMarkupPort
- Parameters:
pairedPort
- - a markup port from another
public MarkupPort getPairedPort()
Description copied from interface:
MarkupPort
Returns the paired port for this markup port.
- Specified by:
getPairedPort
in interfaceMarkupPort
- Returns:
- the paired port for this markup port
public boolean contains(double px, double py)
Description copied from class:
MarkupShape
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)
- Specified by:
contains
in classMarkupShape
- Parameters:
px
- the x coordinate relative to this shape's containerpy
- the y coordinate relative to this shape's container- Returns:
true
if the shape contains the point with the given coordinates
public boolean contains(double px, double py, double distance)
Returns true if the gate contains the point with the given coordinates using the given distance tolerance;
returns false otherwise.
- Parameters:
px
- point x coordinatepy
- point y coordinatedistance
- the distance tolerance to determine whether the given point lies within the gate proximity.
public boolean containsSq(double px, double py, double squareDistance)
Returns true if the gate contains the point with the given coordinates using the given square distance tolerance;
returns false otherwise.
- Parameters:
px
- point x coordinatepy
- point y coordinatedistance
- the square of distance tolerance to determine whether the given point lies within the gate proximity.
@AnyLogicInternalAPI public Point getLeft()
@AnyLogicInternalAPI public Point getRight()
@AnyLogicInternalAPI public Point getCentroid()
@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()
-
How can we improve this article?
-