AnyLogic
Expand
Font size
All Implemented Interfaces:
AggregatableAnimationElement, HasLevel, LevelElement, LevelMarkup, SVGElement, Serializable

public class Pathway
extends AbstractLevelMarkup
See Also:
Serialized Form

Constructor Summary

ConstructorDescription
Pathway() 
Pathway(Agent owner, ShapeDrawMode drawMode, boolean isPublic, Color lineColor, MarkupSegmentLine... segments)
Deprecated.
deprecated in version 8.4, will be removed in the future releases

Method Summary

Modifier and TypeMethodDescription
voidaddSegment(MarkupSegmentLine segment)
Adds segment to this markup element
booleancontains(double px, double py)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e.
BoundingRectanglegetBoundingRectangle() 
ColorgetLineColor()
Returns the color of the markup shape
MarkupSegmentgetSegment(int index)
Returns the segment by its index in the path
intgetSegmentCount()
Returns the number of segments in the path
List<MarkupSegmentLine>getSegments()
Returns the list of segments in this element.
voidsetLineColor(Color color)
Sets the color of the markup shape.

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 java.lang.Object

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

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

initializeInternal, onAggregatorVisibilityChanged, postInitialize

Constructor Details

Pathway

public Pathway()

Pathway

@Deprecated
public Pathway(Agent owner,
 ShapeDrawMode drawMode,
 boolean isPublic,
 Color lineColor,
 MarkupSegmentLine... segments)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Parameters:
owner -
drawMode -
isPublic -
lineColor -
segments -

Method Details

addSegment

public void addSegment(MarkupSegmentLine segment)
Adds segment to this markup element
Parameters:
segment - the segment, should be initialized if was created using no-argument constructor

getSegments

public List<MarkupSegmentLine> getSegments()
Returns the list of segments in this element. The element should be initialized

getSegmentCount

public int getSegmentCount()
Returns the number of segments in the path
Returns:
the number of segments in the path

getSegment

public MarkupSegment getSegment(int index)
Returns the segment by its index in the path
Parameters:
index - the segment index, [0 .. getSegmentCount() - 1]
Returns:
the path segment

getLineColor

public Color getLineColor()
Returns the color of the markup shape
Returns:
the color of the markup shape

setLineColor

public void setLineColor(Color color)
Sets the color of the markup shape.
Parameters:
color - the new color, null = do not draw the markup shape

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

getBoundingRectangle

@AnyLogicInternalAPI
public BoundingRectangle getBoundingRectangle()