Package com.anylogic.engine.presentation
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.presentation.ShapeLine
- Methods inherited from class com.anylogic.engine.presentation.Shape3D
- Methods inherited from class com.anylogic.engine.presentation.Shape
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Methods inherited from interface com.anylogic.engine.Segment2D
- Methods inherited from interface com.anylogic.engine.Segment3D
- Constructor Details
- Method Details
- java.lang.Object
- com.anylogic.engine.presentation.Shape
- com.anylogic.engine.presentation.Shape3D
- com.anylogic.engine.presentation.ShapeLine
- com.anylogic.engine.presentation.ShapeArrowLine
- All Implemented Interfaces:
com.anylogic.engine.internal.Child,Locatable2D,Locatable3D,AggregatableAnimationElement,HasLevel,LevelElement,SVGElement,UsdElement,Segment2D,Segment3D,Serializable,Cloneable
public class ShapeArrowLine extends ShapeLine
A line shape with optional arrows.
The arrows may be set at the beginning of the line, at the end, or both.
An arrow can optionally be offset from the beginning or end e.g. positioned in the middle.
The style and size of the arrows is set up manually and is not automatically adjusted to the line width.
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
| Constructor | Description |
|---|---|
ShapeArrowLine() |
Constructs an arrow line with the default attributes (no arrows).
|
ShapeArrowLine |
Constructs an arrow line with specific attributes and arrows.
|
| Modifier and Type | Method | Description |
|---|---|---|
float | getBeginArrowLength() |
Returns the begin arrow length.
|
float | getBeginArrowOffset() |
Returns the begin arrow offset, 0..1.
|
LineArrowStyle | getBeginArrowStyle() |
Returns the begin arrow style, one of
LineArrowStyle. |
float | getBeginArrowWidth() |
Returns the begin arrow width.
|
float | getEndArrowLength() |
Returns the end arrow length.
|
float | getEndArrowOffset() |
Returns the end arrow offset, 0..1.
|
LineArrowStyle | getEndArrowStyle() |
Returns the end arrow style, one of
LineArrowStyle. |
float | getEndArrowWidth() |
Returns the end arrow width.
|
void | setBeginArrowLength |
Sets the begin arrow length.
|
void | setBeginArrowOffset |
Sets the offset of the begin arrow from the beginning of the line
in the form of a fraction of the line length.
|
void | setBeginArrowStyle |
Sets the begin arrow style.
|
void | setBeginArrowWidth |
Sets the end arrow width.
|
void | setEndArrowLength |
Sets the end arrow length.
|
void | setEndArrowOffset |
Sets the offset of the end arrow from the beginning of the line
in the form of a fraction of the line length.
|
void | setEndArrowStyle |
Sets the end arrow style.
|
void | setEndArrowWidth |
Sets the end arrow width.
|
clone, contains, getColor, getDx, getDy, getDz, getEndX, getEndY, getEndZ, getLength, getLineStyle, getLineWidth, getPresentable, getSVGComponent, getTexture, getZHeight, getZOffset, length, postSVGShapeSpecificAttributes, randomPointInside, setColor, setColor, setContextReference_xjal, setDx, setDy, setDz, setEndX, setEndY, setEndZ, setLineStyle, setLineWidth, setZHeightcanHandleClick, getDrawMode, getScaleZ, getZ, setDrawMode, setPos, setPos, setPos, setRotation, setScale, setScale, setScaleZ, setZexecuteUserAction, findSVGElement, getGroup, getGroupOrOwner, getInspect, getLevel, getName, getOrGenerateUSDId, getRotation, getScaleX, getScaleY, getSVGId, getUsdVersion, getX, getY, isJava2DSwingPresentation, isOnly3D, isPublic_xjal, isSVGPresentation, isVisible, isVisibleCurrently, onAggregatorVisibilityChanged, onClick, randomPointInside, removeSVGFromOwner, removeSVGImage, resetSVGState, restoreOwner, setChangedUsdVersion, setInspect, setLevel, setNextChangedUsdVersion, setPublic_xjal, setScale, setScaleX, setScaleY, setVisible, setX, setY, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGPropertiespublic ShapeArrowLine()
Constructs an arrow line with the default attributes (no arrows).
public ShapeArrowLine(ShapeDrawMode drawMode, boolean ispublic, double x, double y, double z, Paint color, double dx, double dy, double dz, double width, double zHeight, LineStyle style, LineArrowStyle beginArrowStyle, double beginArrowOffset, double beginArrowLength, double beginArrowWidth, LineArrowStyle endArrowStyle, double endArrowOffset, double endArrowLength, double endArrowWidth)
Constructs an arrow line with specific attributes and arrows.
- Parameters:
drawMode- where to draw this shape: 2D, 3D or 2D+3Dispublic- iftrue, the shape is visible on container's presentationx- the x coordinate of the line start pointy- the y coordinate of the line start pointz- the z coordinate of the line start pointcolor- color (orTexture) of the linedx- the difference of x coordinates of the line end and start pointsdy- the difference of y coordinates of the line end and start pointsdz- the difference of z coordinates of the line end and start pointswidth- the line widthzHeight- the height of a line along Z-axisstyle- the line stroke style (only solid is supported)beginArrowStyle- the style of the start arrow, default value isARROW_NONEbeginArrowOffset- the offset of the start arrow (0..1, where 0=start of line), default value is0beginArrowLength- the length factor of the start arrow, it is multiplied by line width to obtain arrow figure length, default value is4beginArrowWidth- the width factor of the start arrow, it is multiplied by line width to obtain arrow figure width, default value is3endArrowStyle- the style of the start arrow, default value isARROW_NONEendArrowOffset- the offset of the start arrow (0..1, where 0=start of line), default value is0endArrowLength- the length factor of the start arrow, it is multiplied by line width to obtain arrow figure length, default value is4endArrowWidth- the width factor of the start arrow, it is multiplied by line width to obtain arrow figure width, default value is3
public void setBeginArrowStyle(LineArrowStyle beginArrowStyle)
Sets the begin arrow style.
- Overrides:
setBeginArrowStylein classShapeLine- Parameters:
beginArrowStyle- one ofLineArrowStyle
public void setBeginArrowOffset(double beginArrowOffset)
Sets the offset of the begin arrow from the beginning of the line
in the form of a fraction of the line length. The direction of
the arrow will be towards the beginning of the line regardless the
offset.
- Overrides:
setBeginArrowOffsetin classShapeLine- Parameters:
beginArrowOffset- the offset, 0..1
public void setBeginArrowLength(double beginArrowLength)
Sets the begin arrow length. If the total line length is less
than the arrow length, the arrow is not drawn.
- Overrides:
setBeginArrowLengthin classShapeLine- Parameters:
beginArrowLength- the begin arrow length.
public void setBeginArrowWidth(double beginArrowWidth)
Sets the end arrow width.
- Overrides:
setBeginArrowWidthin classShapeLine- Parameters:
endArrowWidth- the end arrow width.
public void setEndArrowStyle(LineArrowStyle endArrowStyle)
Sets the end arrow style.
- Overrides:
setEndArrowStylein classShapeLine- Parameters:
endArrowStyle- one ofLineArrowStyle
public void setEndArrowOffset(double endArrowOffset)
Sets the offset of the end arrow from the beginning of the line
in the form of a fraction of the line length. The direction of
the arrow will be towards the end of the line regardless the
offset.
- Overrides:
setEndArrowOffsetin classShapeLine- Parameters:
endArrowOffset- the offset, 0..1
public void setEndArrowLength(double endArrowLength)
Sets the end arrow length. If the total line length is less
than the arrow length, the arrow is not drawn.
- Overrides:
setEndArrowLengthin classShapeLine- Parameters:
endArrowLength- the end arrow length.
public void setEndArrowWidth(double endArrowWidth)
Sets the end arrow width.
- Overrides:
setEndArrowWidthin classShapeLine- Parameters:
endArrowWidth- the end arrow width.
public LineArrowStyle getBeginArrowStyle()
Returns the begin arrow style, one of
LineArrowStyle.- Overrides:
getBeginArrowStylein classShapeLine- Returns:
- the begin arrow style
public float getBeginArrowOffset()
Returns the begin arrow offset, 0..1.
- Overrides:
getBeginArrowOffsetin classShapeLine- Returns:
- the begin arrow offset
public float getBeginArrowLength()
Returns the begin arrow length.
- Overrides:
getBeginArrowLengthin classShapeLine- Returns:
- the begin arrow length
public float getBeginArrowWidth()
Returns the begin arrow width.
- Overrides:
getBeginArrowWidthin classShapeLine- Returns:
- the begin arrow width
public LineArrowStyle getEndArrowStyle()
Returns the end arrow style, one of
LineArrowStyle.- Overrides:
getEndArrowStylein classShapeLine- Returns:
- the end arrow style
public float getEndArrowOffset()
Returns the end arrow offset, 0..1.
- Overrides:
getEndArrowOffsetin classShapeLine- Returns:
- the end arrow offset
public float getEndArrowLength()
Returns the end arrow length.
- Overrides:
getEndArrowLengthin classShapeLine- Returns:
- the end arrow length
public float getEndArrowWidth()
Returns the end arrow width.
- Overrides:
getEndArrowWidthin classShapeLine- Returns:
- the end arrow width