AnyLogic AnyLogic
Expand
Font size
All Implemented Interfaces:
AggregatableAnimationElement, HasLevel, LevelElement, LevelMarkup, MarkupPort, SVGElement, java.io.Serializable

public class LevelGate
extends AbstractLevelMarkup
implements MarkupPort
See Also:
Serialized Form

Constructor Summary

Constructors 
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

Method Summary

All Methods Instance Methods Concrete Methods 
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)
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

Methods inherited from class com.anylogic.engine.markup.AbstractLevelMarkup

getDrawMode, getLevel, setLevel

Methods inherited from class com.anylogic.engine.markup.MarkupShape

error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner

Methods inherited from class com.anylogic.engine.markup.AbstractMarkup

discardOwner, executeUserAction, findSVGElement, getName, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setVisible, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement

initializeInternal, onAggregatorVisibilityChanged, postInitialize

Methods inherited from interface com.anylogic.engine.markup.MarkupPort

getFullName, getLevel, getName

Constructor Detail

LevelGate

public LevelGate()

LevelGate

public LevelGate​(double x,
                 double y,
                 double dx,
                 double dy)

LevelGate

@AnyLogicInternalCodegenAPI
public LevelGate​(Agent owner,
                 ShapeDrawMode drawMode,
                 boolean isPublic,
                 double x,
                 double y,
                 double dx,
                 double dy)

Method Detail

getX

public double getX()
Returns the start x coordinate of the gate.
Returns:
the start x coordinate of the gate

setX

public void setX​(double x)
Sets the start x coordinate of the gate. The gate should be uninitialized
Parameters:
x - coordinate value

getY

public double getY()
Returns the start y coordinate of the gate.
Returns:
the start y coordinate of the gate

setY

public void setY​(double y)
Sets the start y coordinate of the gate. The gate should be uninitialized
Parameters:
y - coordinate value

getDx

public double getDx()
Returns the end x coordinate of the gate.
Returns:
the end x coordinate of the gate

setDx

public void setDx​(double dx)
Sets the end x coordinate of the gate. The gate should be uninitialized
Parameters:
x - coordinate value

getDy

public double getDy()
Returns the end y coordinate of the gate.
Returns:
the end y coordinate of the gate

setDy

public void setDy​(double dy)
Sets the end y coordinate of the gate. The gate should be uninitialized
Parameters:
y - coordinate value

getColor

public java.awt.Color getColor()
Returns the color of the level gate, or null if the level gate has no color.
Returns:
gate color

setColor

public void setColor​(java.awt.Color color)
Sets the color of the level gate
Parameters:
color - new color

getXYZ

public Point getXYZ()
Specified by:
getXYZ in interface MarkupPort

setPairedPort

public void setPairedPort​(MarkupPort pairedPort)
Description copied from interface: MarkupPort
Sets the paired port for this markup port.
Specified by:
setPairedPort in interface MarkupPort
Parameters:
pairedPort - - a markup port from another

getPairedPort

public MarkupPort getPairedPort()
Description copied from interface: MarkupPort
Returns the paired port for this markup port.
Specified by:
getPairedPort in interface MarkupPort
Returns:
the paired port for this markup port

contains

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 class MarkupShape
Parameters:
px - the x coordinate relative to this shape's container
py - the y coordinate relative to this shape's container
Returns:
true if the shape contains the point with the given coordinates

contains

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 coordinate
py - point y coordinate
distance - the distance tolerance to determine whether the given point lies within the gate proximity.

containsSq

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 coordinate
py - point y coordinate
distance - the square of distance tolerance to determine whether the given point lies within the gate proximity.

getLeft

@AnyLogicInternalAPI
public Point getLeft()

getRight

@AnyLogicInternalAPI
public Point getRight()

getCentroid

@AnyLogicInternalAPI
public Point getCentroid()

getBoundingRectangle

@AnyLogicInternalAPI
public BoundingRectangle getBoundingRectangle()
How can we improve this article?