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
,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, getTexture, getZHeight, getZOffset, length, postSVGShapeSpecificAttributes, randomPointInside, setColor, setColor, setContextReference_xjal, setDx, setDy, setDz, setEndX, setEndY, setEndZ, setLineStyle, setLineWidth, setZHeight
canHandleClick, getDrawMode, getScaleZ, getZ, setDrawMode, setPos, setPos, setPos, setRotation, setScale, setScale, setScaleZ, setZ
executeUserAction, findSVGElement, getGroup, getLevel, getName, getRotation, getScaleX, getScaleY, getSVGId, getX, getY, isJava2DSwingPresentation, isPublic_xjal, isSVGPresentation, isVisible, onAggregatorVisibilityChanged, onClick, randomPointInside, removeSVGFromOwner, removeSVGImage, resetSVGState, restoreOwner, setLevel, setPublic_xjal, setScale, setScaleX, setScaleY, setVisible, setX, setY, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
public 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_NONE
beginArrowOffset
- the offset of the start arrow (0..1, where 0=start of line), default value is0
beginArrowLength
- the length factor of the start arrow, it is multiplied by line width to obtain arrow figure length, default value is4
beginArrowWidth
- the width factor of the start arrow, it is multiplied by line width to obtain arrow figure width, default value is3
endArrowStyle
- the style of the start arrow, default value isARROW_NONE
endArrowOffset
- the offset of the start arrow (0..1, where 0=start of line), default value is0
endArrowLength
- the length factor of the start arrow, it is multiplied by line width to obtain arrow figure length, default value is4
endArrowWidth
- 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:
setBeginArrowStyle
in 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:
setBeginArrowOffset
in 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:
setBeginArrowLength
in classShapeLine
- Parameters:
beginArrowLength
- the begin arrow length.
public void setBeginArrowWidth(double beginArrowWidth)
Sets the end arrow width.
- Overrides:
setBeginArrowWidth
in classShapeLine
- Parameters:
endArrowWidth
- the end arrow width.
public void setEndArrowStyle(LineArrowStyle endArrowStyle)
Sets the end arrow style.
- Overrides:
setEndArrowStyle
in 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:
setEndArrowOffset
in 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:
setEndArrowLength
in classShapeLine
- Parameters:
endArrowLength
- the end arrow length.
public void setEndArrowWidth(double endArrowWidth)
Sets the end arrow width.
- Overrides:
setEndArrowWidth
in classShapeLine
- Parameters:
endArrowWidth
- the end arrow width.
public LineArrowStyle getBeginArrowStyle()
Returns the begin arrow style, one of
LineArrowStyle
.- Overrides:
getBeginArrowStyle
in classShapeLine
- Returns:
- the begin arrow style
public float getBeginArrowOffset()
Returns the begin arrow offset, 0..1.
- Overrides:
getBeginArrowOffset
in classShapeLine
- Returns:
- the begin arrow offset
public float getBeginArrowLength()
Returns the begin arrow length.
- Overrides:
getBeginArrowLength
in classShapeLine
- Returns:
- the begin arrow length
public float getBeginArrowWidth()
Returns the begin arrow width.
- Overrides:
getBeginArrowWidth
in classShapeLine
- Returns:
- the begin arrow width
public LineArrowStyle getEndArrowStyle()
Returns the end arrow style, one of
LineArrowStyle
.- Overrides:
getEndArrowStyle
in classShapeLine
- Returns:
- the end arrow style
public float getEndArrowOffset()
Returns the end arrow offset, 0..1.
- Overrides:
getEndArrowOffset
in classShapeLine
- Returns:
- the end arrow offset
public float getEndArrowLength()
Returns the end arrow length.
- Overrides:
getEndArrowLength
in classShapeLine
- Returns:
- the end arrow length
public float getEndArrowWidth()
Returns the end arrow width.
- Overrides:
getEndArrowWidth
in classShapeLine
- Returns:
- the end arrow width