public abstract class ConveyorNode<T extends Agent> extends ConveyorMarkupElement<T> implements INode<ConveyorNode<?>,ConveyorPath<?>>
Modifier and Type | Method and Description |
---|---|
void |
addConnection(ConveyorPath<?> path,
PathEndType type) |
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)
|
java.lang.Class<? extends ExtAgentWithSpatialMetrics> |
getCompatibleAgentExtensionClass()
This method is internal and shouldn't be called by user.
|
ConveyorPath<?> |
getConnection(int index)
Returns connection of this node with another node by index.
|
java.util.List<ConveyorPath<?>> |
getConnections()
Returns the list of ConveyorPath<?
|
int |
getConnectionsCount()
Amount of the node's connections to other nodes.
|
java.awt.Color |
getFillColor()
Returns the fill color of the shape, or
null if shape has no fill color or
has textured fill (in this case INode.getFillTexture() should be used instead) |
Texture |
getFillTexture()
Returns the fill texture of the shape, if the shape has fill texture
|
java.util.List<ConveyorPath<?>> |
getIncomingPaths()
Returns the list of all incoming conveyors, i.e. the conveyors, transferring agents (material items) to the transfer table, returns null if none.
|
java.awt.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 INode.getLineTexture() should be used instead) |
Texture |
getLineTexture()
Returns the line texture of the markup element, if the markup element has line texture
|
double |
getNearestPoint(Point givenPoint,
Point out)
Calculates (using the
output object) the point in this space markup element
nearest to the given point. |
ConveyorNetwork |
getNetwork() |
java.util.List<ConveyorPath<?>> |
getOutgoingPaths()
Returns the list of all outgoing conveyors, i.e. the conveyors, accepting agents (material items) from the transfer table, returns null if none.
|
Position |
getPosition(int index,
int totalNumber,
Position out)
Returns the item position with the given index.
|
Position |
getTransferPositionByPercent(ConveyorPath<?> path1,
ConveyorPath<?> path2,
double percent,
Position out) |
double |
getX()
Get X coordinate of this element
|
Point |
getXYZ(Point out)
Returns the location of this element
|
double |
getY()
Get Y coordinate of this element
|
double |
getZ()
Get Z coordinate of this element
|
void |
postInitialize()
This method is internal and shouldn't be called by user.
|
Point |
randomPointInside(java.util.Random rng,
Point out)
Returns the randomly chosen point inside/along the given space markup element.
|
void |
setFillColor(java.awt.Color fillColor)
Sets the fill color of the shape.
|
void |
setFillColor(java.awt.Paint fillColor)
Sets the fill color (or
Texture ) of the shape. |
void |
setLineColor(java.awt.Color lineColor)
Sets the line color of the markup element.
|
void |
setLineColor(java.awt.Paint lineColor)
Sets the line color (or
Texture ) of the markup element. |
void |
setXYZ(double x,
double y,
double z)
Sets the location of this node.
|
getLevel, setNetwork
error, getDrawMode, 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
getName, getTransferDistance
getSpace, randomPointInside, randomPointInside, randomPointInside
getSpace
public ConveyorNetwork getNetwork()
getNetwork
in interface INetworkMarkupElement
getNetwork
in class ConveyorMarkupElement<T extends Agent>
null
if this element isn't a part of a networkpublic double getX()
public double getY()
public final double getZ()
public Point getXYZ(Point out)
out
- output object to write to, may be null
public void setXYZ(double x, double y, double z)
x
- X coordinatey
- Y coordinatez
- Z coordinatepublic java.util.List<ConveyorPath<?>> getIncomingPaths()
public java.util.List<ConveyorPath<?>> getOutgoingPaths()
public int getConnectionsCount()
INode
getConnectionsCount
in interface INode<ConveyorNode<?>,ConveyorPath<?>>
public ConveyorPath<?> getConnection(int index)
INode
getConnection
in interface INode<ConveyorNode<?>,ConveyorPath<?>>
index
- the index of required connection in range (0
, this.getConnectionsCount() - 1
)com.anylogic.engine.markup.IPath
interfacepublic java.util.List<ConveyorPath<?>> getConnections()
public void addConnection(ConveyorPath<?> path, PathEndType type)
addConnection
in interface INode<ConveyorNode<?>,ConveyorPath<?>>
public java.awt.Color getLineColor()
INode
null
if markup element has no line color or
has textured line (in this case INode.getLineTexture()
should be used instead)getLineColor
in interface INode<ConveyorNode<?>,ConveyorPath<?>>
public Texture getLineTexture()
INode
getLineTexture
in interface INode<ConveyorNode<?>,ConveyorPath<?>>
public void setLineColor(java.awt.Color lineColor)
lineColor
- the new line color, null = do not draw the markup element linepublic void setLineColor(java.awt.Paint lineColor)
INode
Texture
) of the markup element.setLineColor
in interface INode<ConveyorNode<?>,ConveyorPath<?>>
lineColor
- the new line color, null = do not draw the markup element linepublic java.awt.Color getFillColor()
INode
null
if shape has no fill color or
has textured fill (in this case INode.getFillTexture()
should be used instead)getFillColor
in interface INode<ConveyorNode<?>,ConveyorPath<?>>
public Texture getFillTexture()
INode
getFillTexture
in interface INode<ConveyorNode<?>,ConveyorPath<?>>
public void setFillColor(java.awt.Color fillColor)
fillColor
- the new fill color, null = do not fill the shapepublic void setFillColor(java.awt.Paint fillColor)
INode
Texture
) of the shape.setFillColor
in interface INode<ConveyorNode<?>,ConveyorPath<?>>
public java.lang.Class<? extends ExtAgentWithSpatialMetrics> getCompatibleAgentExtensionClass()
INode
getCompatibleAgentExtensionClass
in interface INode<ConveyorNode<?>,ConveyorPath<?>>
@AnyLogicInternalAPI public Position getTransferPositionByPercent(ConveyorPath<?> path1, ConveyorPath<?> path2, double percent, Position out)
getTransferPositionByPercent
in interface INode<ConveyorNode<?>,ConveyorPath<?>>
@AnyLogicInternalAPI public void postInitialize()
AggregatableAnimationElement
postInitialize
in interface AggregatableAnimationElement
public double getNearestPoint(Point givenPoint, Point out)
INetworkMarkupElement
output
object) the point in this space markup element
nearest to the given point. Returns the square of distance to the point.getNearestPoint
in interface INetworkMarkupElement
givenPoint
- given pointout
- the output point to write result to.public Point randomPointInside(java.util.Random rng, Point out)
INetworkMarkupElement
randomPointInside
in interface INetworkMarkupElement
rng
- the random number generator.out
- output object to write to, may be null
public Position getPosition(int index, int totalNumber, Position out)
AnimationStaticLocationProvider
getPosition
in interface AnimationStaticLocationProvider
index
- the index of some item positions, should be not negative and less than totalNumber
totalNumber
- the total number of item positions, should be positiveout
- output object to write to, may be null
public boolean contains(double px, double py)
MarkupShape
contains
in interface INetworkMarkupElement
contains
in class MarkupShape
px
- the x coordinate relative to this shape's containerpy
- the y coordinate relative to this shape's containertrue
if the shape contains the point with the given
coordinatesCopyright © AnyLogic North America, LLC. All Rights Reserved.