Class ArrowLinesLayer
java.lang.Object
com.codename1.maps.layers.AbstractLayer
com.codename1.maps.layers.LinesLayer
com.codename1.maps.layers.ArrowLinesLayer
- All Implemented Interfaces:
Layer
This class is responsible for painting arrows that indicates direction
of walk on map.
-
Field Summary
Fields inherited from class LinesLayer
_lineColorFields inherited from class AbstractLayer
name, projection -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with default projection Mercator.ArrowLinesLayer(Projection p, String name) ArrowLinesLayer(String name) Constructor with default projection Mercator. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the arrow height in pixelsintGets the arrow segment lengthintGets the arrow width in pixelsprotected voidpaintSegment(Graphics g, Coord[] segment, Tile tile) Paints arrows on each segment.voidsetArrowHeight(int arrowHeight) Sets the arrow heightvoidsetArrowSegmentLength(int arrowSegmentLength) Sets the arrow segment lengthvoidsetArrowWidth(int arrowWidth) Sets the arrow widthMethods inherited from class LinesLayer
addLineSegment, boundingBox, lineColor, paintMethods inherited from class AbstractLayer
getName, getProjection
-
Constructor Details
-
ArrowLinesLayer
public ArrowLinesLayer()Constructor with default projection Mercator. -
ArrowLinesLayer
Constructor with default projection Mercator. -
ArrowLinesLayer
-
-
Method Details
-
paintSegment
Paints arrows on each segment. arrowSegmentLength decides how many arrows will be on each segment.
Parameters
-
g -
segment -
tile
- Overrides:
paintSegmentin classLinesLayer
-
-
getArrowHeight
public int getArrowHeight()Returns the arrow height in pixels
Returns
the arrow height
-
setArrowHeight
public void setArrowHeight(int arrowHeight) Sets the arrow height
Parameters
arrowHeight
-
getArrowSegmentLength
public int getArrowSegmentLength()Gets the arrow segment length
Returns
segment length
-
setArrowSegmentLength
public void setArrowSegmentLength(int arrowSegmentLength) Sets the arrow segment length
Parameters
arrowSegmentLength: to set
-
getArrowWidth
public int getArrowWidth()Gets the arrow width in pixels
Returns
the arrow width
-
setArrowWidth
public void setArrowWidth(int arrowWidth) Sets the arrow width
Parameters
arrowWidth: to set
-