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

public class Pathway
extends AbstractLevelMarkup
See Also:
Serialized Form

Constructor Summary

Constructors 
Pathway()  
Pathway​(Agent owner, ShapeDrawMode drawMode, boolean isPublic, java.awt.Color lineColor, MarkupSegmentLine... segments)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Constructor Description

Method Summary

All Methods Instance Methods Concrete Methods 
void addSegment​(MarkupSegmentLine segment)
Adds segment to this markup element
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.
BoundingRectangle getBoundingRectangle()  
java.awt.Color getLineColor()
Returns the color of the markup shape
MarkupSegment getSegment​(int index)
Returns the segment by its index in the path
int getSegmentCount()
Returns the number of segments in the path
java.util.List<MarkupSegmentLine> getSegments()
Returns the list of segments in this element.
void setLineColor​(java.awt.Color color)
Sets the color of the markup shape.
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

Constructor Detail

Pathway

public Pathway()

Pathway

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

Method Detail

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 java.util.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 java.awt.Color getLineColor()
Returns the color of the markup shape
Returns:
the color of the markup shape

setLineColor

public void setLineColor​(java.awt.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()
How can we improve this article?