Package com.anylogic.engine.markup
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.ConveyorMarkupElement
- 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.AnimationStaticLocationProvider
- Methods inherited from interface com.anylogic.engine.markup.INetworkMarkupElement
- Methods inherited from interface com.anylogic.engine.markup.INode
- Method Detail
- getNetwork
- getX
- getY
- getZ
- getXYZ
- setXYZ
- getIncomingPaths
- getOutgoingPaths
- getConnectionsCount
- getConnection
- getConnections
- addConnection
- getLineColor
- getLineTexture
- setLineColor
- setLineColor
- getFillColor
- getFillTexture
- setFillColor
- setFillColor
- getCompatibleAgentExtensionClass
- getTransferPositionByPercent
- postInitialize
- getNearestPoint
- randomPointInside
- getPosition
- contains
- java.lang.Object
-
- com.anylogic.engine.markup.AbstractMarkup
-
- com.anylogic.engine.markup.MarkupShape
-
- com.anylogic.engine.markup.ConveyorMarkupElement<T>
-
- com.anylogic.engine.markup.ConveyorNode<T>
- All Implemented Interfaces:
AggregatableAnimationElement
,AnimationStaticLocationProvider
,HasLevel
,INetworkMarkupElement
,INode<ConveyorNode<?>,ConveyorPath<?>>
,SVGElement
,java.io.Serializable
- Direct Known Subclasses:
ConveyorCustomStation
,ConveyorPointNode
,ConveyorPortImpl
,ConveyorTransitionalNode
public abstract class ConveyorNode<T extends Agent> extends ConveyorMarkupElement<T> implements INode<ConveyorNode<?>,ConveyorPath<?>>
- See Also:
- Serialized Form
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.
|
java.lang.Class<? extends ExtAgentWithSpatialMetrics> |
getCompatibleAgentExtensionClass() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
ConveyorPath<?> |
getConnection(int index) |
Returns connection of this node with another node by index.
|
java.util.List<ConveyorPath<?>> |
getConnections() |
Returns the list of ConveyorPath<?> objects connected to this node
|
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.
|
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.
|
Position |
getPosition(int index,
int totalNumber,
Position out) |
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 |
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.
it may be removed/renamed in future. |
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.
|
Modifier and Type | Method | Description |
---|
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
getSpace
getSpace, randomPointInside, randomPointInside, randomPointInside
getName, getTransferDistance
public ConveyorNetwork getNetwork()
- Specified by:
getNetwork
in interfaceINetworkMarkupElement
- Overrides:
getNetwork
in classConveyorMarkupElement<T extends Agent>
- Returns:
- network this markup element belongs to
or
null
if this element isn't a part of a network
public double getX()
Get X coordinate of this element
- Returns:
- X coordinate of this element
public double getY()
Get Y coordinate of this element
- Returns:
- Y coordinate of this element
public final double getZ()
Get Z coordinate of this element
- Returns:
- Z coordinate of this element
public Point getXYZ(Point out)
Returns the location of this element
- Parameters:
out
- output object to write to, may benull
- Returns:
- the Point object with coordinates of the node
public void setXYZ(double x, double y, double z)
Sets the location of this node. The node should be unitialized
- Parameters:
x
- X coordinatey
- Y coordinatez
- Z coordinate
public 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.
- Returns:
- the list of all incoming conveyors
public 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.
- Returns:
- the list of all outgoing conveyors
public int getConnectionsCount()
Description copied from interface:
INode
Amount of the node's connections to other nodes.
- Specified by:
getConnectionsCount
in interfaceINode<ConveyorNode<?>,ConveyorPath<?>>
- Returns:
- number of connections
public ConveyorPath<?> getConnection(int index)
Description copied from interface:
INode
Returns connection of this node with another node by index.
- Specified by:
getConnection
in interfaceINode<ConveyorNode<?>,ConveyorPath<?>>
- Parameters:
index
- the index of required connection in range (0
,this.getConnectionsCount() - 1
)- Returns:
- instance of
com.anylogic.engine.markup.IPath
interface
public java.util.List<ConveyorPath<?>> getConnections()
Returns the list of ConveyorPath<?> objects connected to this node
- Returns:
- the list of connections
public void addConnection(ConveyorPath<?> path, PathEndType type)
- Specified by:
addConnection
in interfaceINode<ConveyorNode<?>,ConveyorPath<?>>
public java.awt.Color getLineColor()
Description copied from interface:
INode
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)- Specified by:
getLineColor
in interfaceINode<ConveyorNode<?>,ConveyorPath<?>>
- Returns:
- the line color of the markup element
public Texture getLineTexture()
Description copied from interface:
INode
Returns the line texture of the markup element, if the markup element has line texture
- Specified by:
getLineTexture
in interfaceINode<ConveyorNode<?>,ConveyorPath<?>>
- Returns:
- the line texture of the markup element
public void setLineColor(java.awt.Color lineColor)
Sets the line color of the markup element.
- Parameters:
lineColor
- the new line color, null = do not draw the markup element line
public void setLineColor(java.awt.Paint lineColor)
Description copied from interface:
INode
Sets the line color (or
Texture
) of the markup element.- Specified by:
setLineColor
in interfaceINode<ConveyorNode<?>,ConveyorPath<?>>
- Parameters:
lineColor
- the new line color, null = do not draw the markup element line
public java.awt.Color getFillColor()
Description copied from interface:
INode
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)- Specified by:
getFillColor
in interfaceINode<ConveyorNode<?>,ConveyorPath<?>>
- Returns:
- the fill color of the shape
public Texture getFillTexture()
Description copied from interface:
INode
Returns the fill texture of the shape, if the shape has fill texture
- Specified by:
getFillTexture
in interfaceINode<ConveyorNode<?>,ConveyorPath<?>>
- Returns:
- the fill texture of the shape
public void setFillColor(java.awt.Color fillColor)
Sets the fill color of the shape.
- Parameters:
fillColor
- the new fill color, null = do not fill the shape
public void setFillColor(java.awt.Paint fillColor)
Description copied from interface:
INode
Sets the fill color (or
Texture
) of the shape.- Specified by:
setFillColor
in interfaceINode<ConveyorNode<?>,ConveyorPath<?>>
public java.lang.Class<? extends ExtAgentWithSpatialMetrics> getCompatibleAgentExtensionClass()
Description copied from interface:
INode
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Specified by:
getCompatibleAgentExtensionClass
in interfaceINode<ConveyorNode<?>,ConveyorPath<?>>
@AnyLogicInternalAPI public Position getTransferPositionByPercent(ConveyorPath<?> path1, ConveyorPath<?> path2, double percent, Position out)
- Specified by:
getTransferPositionByPercent
in interfaceINode<ConveyorNode<?>,ConveyorPath<?>>
@AnyLogicInternalAPI public void postInitialize()
Description copied from interface:
AggregatableAnimationElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Specified by:
postInitialize
in interfaceAggregatableAnimationElement
public double getNearestPoint(Point givenPoint, Point out)
Description copied from interface:
INetworkMarkupElement
Calculates (using the
output
object) the point in this space markup element
nearest to the given point. Returns the square of distance to the point.- Specified by:
getNearestPoint
in interfaceINetworkMarkupElement
- Parameters:
givenPoint
- given pointout
- the output point to write result to.- Returns:
- the square of distance to the nearest point
public Point randomPointInside(java.util.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 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
-
How can we improve this article?
-