Package com.anylogic.engine.markup
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.ConveyorPathPart
- 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.AggregatableAnimationElement
- Methods inherited from interface com.anylogic.engine.markup.INetworkMarkupElement
- Methods inherited from interface com.anylogic.engine.markup.MarkupPort
- Methods inherited from interface com.anylogic.engine.markup.NetworkPort
- Constructor Details
- Method Details
- getConnectedPath
- isOnRightSide
- setOnRightSide
- getItemEnterOffset
- getItemEnterOffset
- getMergeLength
- getMergeLength
- getConnectionAngle
- setPairedPort
- getTransition
- setOffset
- getPairedPort
- getXYZ
- getNearestPoint
- randomPointInside
- contains
- setLineColor
- setFillColor
- getLineColor
- getLineTexture
- getFillColor
- getFillTexture
- isSplit
- isMerge
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkup
- com.anylogic.engine.markup.MarkupShape
- com.anylogic.engine.markup.ConveyorMarkupElement<T>
- com.anylogic.engine.markup.ConveyorPathPart<T>
- com.anylogic.engine.markup.ConveyorSpur<T>
- All Implemented Interfaces:
AggregatableAnimationElement
,HasLevel
,INetworkMarkupElement
,MarkupPort
,NetworkPort
,SVGElement
,Serializable
public class ConveyorSpur<T extends Agent> extends ConveyorPathPart<T> implements NetworkPort
- See Also:
- Serialized Form
Constructor | Description |
---|---|
ConveyorSpur |
Modifier and Type | Method | Description |
---|---|---|
boolean | contains |
Test if the shape contains the point with the given coordinates (relative
to this shape's container, i.e.
|
ConveyorPath<?> | getConnectedPath() | |
double | getConnectionAngle() | |
Color | getFillColor() |
Returns the fill color of the shape, or
null if the shape has no color or uses a texture (in this case use
getLineTexture() to get the shape's texture). |
Texture | getFillTexture() |
Returns the fill texture of the shape or
null if the shape has no texture but uses a color (in this case use
getLineColor() to get the shape's color). |
double | getItemEnterOffset() | |
double | getItemEnterOffset | |
Color | getLineColor() |
Returns the line color of the shape, or
null if the shape has no color or uses a texture (in this case use
getLineTexture() to get the shape's texture). |
Texture | getLineTexture() |
Returns the line texture of the shape or
null if the shape has no texture but uses a color (in this case use
getLineColor() to get the shape's color). |
double | getMergeLength() | |
double | getMergeLength | |
double | getNearestPoint |
Calculates the distance to the
givenPoint and writes the nearest point (same as spur coordinates)
to the output Point object. |
MarkupPort | getPairedPort() |
Returns the paired port for this conveyor spur.
|
ConveyorPath<T> | getTransition() | |
Point | getXYZ() |
Returns the
Point where the spur connects to main conveyor. |
boolean | isMerge() | |
boolean | isOnRightSide() |
Returns
true if the conveyor spur is situated on the right-hand side of the main conveyor. |
boolean | isSplit() | |
Point | randomPointInside | |
void | setFillColor |
Sets the fill color (or texture) of the shape.
|
void | setLineColor |
Sets the line color (or texture) of the shape.
|
void | setOffset |
Sets the distance from the starting point of the main conveyor to the center of the conveyor spur element (in the specified length units).
|
void | setOnRightSide |
Sets the conveyor spur element on the right-hand side of the main conveyor.
|
void | setPairedPort |
Sets the paired port for this conveyor spur.
|
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
public ConveyorSpur(ConveyorPath<? extends T> conveyor, ShapeDrawMode drawMode, boolean isPublic, double offsetInPixels, boolean isOnRightSide, Paint lineColor, Paint fillColor)
@AnyLogicInternalAPI public ConveyorPath<?> getConnectedPath()
public boolean isOnRightSide()
Returns
true
if the conveyor spur is situated on the right-hand side of the main conveyor. Otherwise returns false
.- Returns:
true
if the conveyor spur is situated on the right-hand side of the main conveyor. Otherwise returnsfalse
public void setOnRightSide(boolean isOnRigthSide)
Sets the conveyor spur element on the right-hand side of the main conveyor.
- Parameters:
isOnRigthSide
- -true
if the conveyor spur should be situated on the right-hand side of the main conveyor andfalse
otherwise
@AnyLogicInternalLibraryAPI public double getItemEnterOffset()
@AnyLogicInternalLibraryAPI public double getItemEnterOffset(LengthUnits units)
@AnyLogicInternalLibraryAPI public double getMergeLength()
@AnyLogicInternalLibraryAPI public double getMergeLength(LengthUnits units)
@AnyLogicInternalLibraryAPI public double getConnectionAngle()
public void setPairedPort(MarkupPort pairedPort)
Sets the paired port for this conveyor spur.
- Specified by:
setPairedPort
in interfaceMarkupPort
- Parameters:
pairedPort
- - a network port from another network
@AnyLogicInternalLibraryAPI public ConveyorPath<T> getTransition()
public void setOffset(double offset, LengthUnits units)
Sets the distance from the starting point of the main conveyor to the center of the conveyor spur element (in the specified length units).
- Overrides:
setOffset
in classConveyorPathPart<T extends Agent>
- Parameters:
offset
- - a new distance valueunits
- - one of the length unit constants
public MarkupPort getPairedPort()
Returns the paired port for this conveyor spur.
- Specified by:
getPairedPort
in interfaceMarkupPort
- Returns:
- the paired port for this conveyor spur
public Point getXYZ()
Returns the
Point
where the spur connects to main conveyor.- Specified by:
getXYZ
in interfaceMarkupPort
- Returns:
- the
Point
where the spur connects to main conveyor
public double getNearestPoint(Point givenPoint, Point out)
Calculates the distance to the
givenPoint
and writes the nearest point (same as spur coordinates)
to the output Point
object. Returns the square of the distance to the point. All calculations are performed in
the horizontal XY-projection (i.e. z-coordinates are treated as zeros).- Specified by:
getNearestPoint
in interfaceINetworkMarkupElement
- Parameters:
givenPoint
- - the point to calculate distance toout
- - the output point to write result to, may benull
- Returns:
- the square of distance to the nearest point
public Point randomPointInside(Random rng, Point out)
- Specified by:
randomPointInside
in interfaceINetworkMarkupElement
- Parameters:
rng
- - unused, may benull
out
- - the output point to write result to, may benull
- Returns:
- the randomly chosen 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 void setLineColor(Paint lineColor)
Sets the line color (or texture) of the shape.
- Parameters:
lineColor
- -Color
orPaint
if you want to use texture, may benull
public void setFillColor(Paint fillColor)
Sets the fill color (or texture) of the shape.
- Parameters:
lineColor
- -Color
orPaint
if you want to use texture, may benull
public Color getLineColor()
Returns the line color of the shape, or
null
if the shape has no color or uses a texture (in this case use
getLineTexture() to get the shape's texture).- Returns:
- the line color of the shape
public Texture getLineTexture()
Returns the line texture of the shape or
null
if the shape has no texture but uses a color (in this case use
getLineColor() to get the shape's color).- Returns:
- the line texture
public Color getFillColor()
Returns the fill color of the shape, or
null
if the shape has no color or uses a texture (in this case use
getLineTexture() to get the shape's texture).- Returns:
- the fill color of the shape
public Texture getFillTexture()
Returns the fill texture of the shape or
null
if the shape has no texture but uses a color (in this case use
getLineColor() to get the shape's color).- Returns:
- the fill texture
@AnyLogicInternalAPI public boolean isSplit()
@AnyLogicInternalAPI public boolean isMerge()