Package com.anylogic.engine.markup
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.Node
- Methods inherited from class com.anylogic.engine.markup.NetworkMarkupElement
- 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.AnimationStaticLocationProvider
- Methods inherited from interface com.anylogic.engine.markup.HasLevel
- Methods inherited from interface com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor
- Methods inherited from interface com.anylogic.engine.markup.INetworkMarkupElement
- Methods inherited from interface com.anylogic.engine.markup.INode
- Methods inherited from interface com.anylogic.engine.markup.LevelElement
- Methods inherited from interface com.anylogic.engine.markup.MarkupPort
- Methods inherited from interface com.anylogic.engine.markup.NetworkPort
- Constructor Details
- Method Details
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkup
- com.anylogic.engine.markup.MarkupShape
- com.anylogic.engine.markup.NetworkMarkupElement
- com.anylogic.engine.markup.Node
- com.anylogic.engine.markup.NetworkPortImpl
- All Implemented Interfaces:
AggregatableAnimationElement
,AnimationStaticLocationProvider
,HasLevel
,IMarkupLibraryDescriptor
,INetworkMarkupElement
,INode<Node,
,Path> LevelElement
,LevelMarkup
,MarkupPort
,com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor
,com.anylogic.engine.markup.material_handling.INodeDescriptor<Agent>
,NetworkPort
,SVGElement
,Serializable
@AnyLogicInternalAPI public class NetworkPortImpl extends Node implements NetworkPort
- See Also:
- Serialized Form
Constructor | Description |
---|---|
NetworkPortImpl |
Modifier and Type | Method | Description |
---|---|---|
void | addConnection | |
boolean | contains |
Test if the shape contains the point with the given coordinates (relative
to this shape's container, i.e.
|
Color | getLineColor() |
Returns the line color of the markup element, or
null if markup element has no line color or
has textured line (in this case Node.getLineTexture() should be used instead) |
Texture | getLineTexture() |
Returns the line texture of the markup element, if the markup element has line texture
|
double | getNearestPoint |
Calculates (using the
output object) the point in this space markup element
nearest to the given (x, y, z) point. |
double | getNearestPoint |
Calculates (using the
output object) the point in this space markup element
nearest to the given (x, y) point. |
MarkupPort | getPairedPort() |
Returns the paired port for this markup port.
|
Position | getPosition() | |
Position | getPosition |
Returns the item position with the given index.
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1). |
Position | getPosition | |
Point | getXYZ() | |
Point | getXYZ | |
double | getZ() |
Returns the z coordinate of the node.
|
Point | randomPointInside |
Returns the randomly chosen point inside/along the given space markup element.
|
void | setLineColor |
Sets the line color of the markup element.
|
void | setLineColor |
Sets the line color (or
Texture ) of the markup element. |
void | setPairedPort |
Sets the paired port for this markup port.
|
getCompatibleAgentExtensionClass, getConnection, getConnectionsCount, getFillColor, getFillTexture, getMaterialLibraryDescriptor, getMaxSpeed, getNumberOfTransporters, getTransferDistance, getTransferPositionByPercent, getTransporter, getTransporters, isLimitSpeed, setFillColor, setFillColor, setLimitSpeed, setMaxSpeed
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
Methods inherited from interface com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor
getMarkup, setMarkup
@AnyLogicInternalAPI public NetworkPortImpl(Agent owner, ShapeDrawMode drawMode, boolean isPublic, PathEnd<Path> pathEnd)
@AnyLogicInternalCodegenAPI 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 void addConnection(Path path, PathEndType type)
- Specified by:
addConnection
in interfaceINode<Node,
Path> - Overrides:
addConnection
in classNode
public Point getXYZ()
- Specified by:
getXYZ
in interfaceMarkupPort
public Point getXYZ(Point out)
public Position getPosition()
public Position getPosition(Position out)
public Point randomPointInside(Random rng, Point out)
Description copied from interface:
INetworkMarkupElement
Returns the randomly chosen point inside/along the given space markup element.
This method utilises the given Random Number Generator.
- Specified by:
randomPointInside
in interfaceINetworkMarkupElement
- Parameters:
rng
- the random number generator.out
- output object to write to, may benull
- Returns:
- the randomly chosen point
public Position getPosition(int index, int totalNumber, Position out)
Description copied from interface:
AnimationStaticLocationProvider
Returns the item position with the given index.
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1).
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1).
- Specified by:
getPosition
in interfaceAnimationStaticLocationProvider
- Parameters:
index
- the index of some item positions, should be not negative and less thantotalNumber
totalNumber
- the total number of item positions, should be positiveout
- output object to write to, may benull
- Returns:
- the Position object with coordinates of the requested item position
public double getNearestPoint(double x, double y, Point output)
Description copied from class:
NetworkMarkupElement
Calculates (using the
output
object) the point in this space markup element
nearest to the given (x, y) point. Returns the square of distance to the point
(in the XY-projection).
All the calculations are performed in the horizontal projection (z-coordinates aren't used,
as if all of the z coordinates were zero).- Specified by:
getNearestPoint
in classNetworkMarkupElement
- Parameters:
x
- x coordinate of the pointy
- y coordinate of the pointoutput
- the output point to write result to. Note thatoutput.z
is left unchanged.- Returns:
- the square of distance to the nearest point in the horizontal (XY) projection
public double getNearestPoint(double x, double y, double z, Point output)
Description copied from class:
NetworkMarkupElement
Calculates (using the
output
object) the point in this space markup element
nearest to the given (x, y, z) point. Returns the square of distance to the point.- Specified by:
getNearestPoint
in classNetworkMarkupElement
- Parameters:
x
- x coordinate of the pointy
- y coordinate of the pointz
- z coordinate of the pointoutput
- the output point to write result to.- Returns:
- the square of distance to the nearest point
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 interfaceINetworkMarkupElement
- 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 double getZ()
Description copied from class:
Node
Returns the z coordinate of the node.
public void setLineColor(Color lineColor)
Description copied from class:
Node
Sets the line color of the markup element.
- Specified by:
setLineColor
in classNode
- Parameters:
lineColor
- the new line color, null = do not draw the markup element line
public void setLineColor(Paint lineColor)
Description copied from class:
Node
Sets the line color (or
Texture
) of the markup element.- Specified by:
setLineColor
in interfaceINode<Node,
Path> - Specified by:
setLineColor
in classNode
- Parameters:
lineColor
- the new line color, null = do not draw the markup element line
public Color getLineColor()
Description copied from class:
Node
Returns the line color of the markup element, or
null
if markup element has no line color or
has textured line (in this case Node.getLineTexture()
should be used instead)- Specified by:
getLineColor
in interfaceINode<Node,
Path> - Specified by:
getLineColor
in classNode
- Returns:
- the line color of the markup element
public Texture getLineTexture()
Description copied from class:
Node
Returns the line texture of the markup element, if the markup element has line texture
- Specified by:
getLineTexture
in interfaceINode<Node,
Path> - Specified by:
getLineTexture
in classNode
- Returns:
- the line texture of the markup element