java.lang.Object
io.jmix.mapsflowui.kit.component.model.MapObservableObject
io.jmix.mapsflowui.kit.component.model.style.stroke.Stroke
All Implemented Interfaces:
Serializable

public class Stroke extends MapObservableObject
Stroke style for vector features.

For more details see: Stroke() docs

See Also:
  • Field Details

    • color

      protected String color
    • lineCap

      protected LineCap lineCap
    • lineJoin

      protected LineJoin lineJoin
    • lineDash

      protected List<Double> lineDash
    • lineDashOffset

      protected Double lineDashOffset
    • miterLimit

      protected Double miterLimit
    • width

      protected Double width
  • Constructor Details

    • Stroke

      public Stroke()
  • Method Details

    • getType

      protected String getType()
      Specified by:
      getType in class MapObservableObject
    • getColor

      public String getColor()
      Returns:
      color value or null if not set
    • setColor

      public void setColor(String color)
      Sets the color. If not defined black will be used. Color is available in the following formats:
      • HEX "#5E4BD8"
      • RGB "rgb(205, 92, 92)"
      • RGBA "rgba(205, 92, 92, 0.4)".
      For more details see: setColor() docs
      Parameters:
      color - color value
    • withColor

      public Stroke withColor(String color)
      Parameters:
      color - color value
      Returns:
      current instance
    • getLineCap

      public LineCap getLineCap()
      Returns:
      line cap value or null if not set
    • setLineCap

      public void setLineCap(LineCap lineCap)
      Sets line cap style. The default value is LineCap.ROUND.

      For more details see: setLineCap() docs

      Parameters:
      lineCap - line cap value
    • withLineCap

      public Stroke withLineCap(LineCap lineCap)
      Parameters:
      lineCap - line cap value
      Returns:
      current instance
    • getLineJoin

      public LineJoin getLineJoin()
      Returns:
      line join value or null if not set
    • setLineJoin

      public void setLineJoin(LineJoin lineJoin)
      Sets line join style. The default value is LineJoin.ROUND.

      For more details see: setLineJoin() docs

      Parameters:
      lineJoin - line join value
    • withLineJoin

      public Stroke withLineJoin(LineJoin lineJoin)
      Parameters:
      lineJoin - line join value
      Returns:
      current instance
    • getLineDash

      public List<Double> getLineDash()
      Returns:
      line dash pattern or null if not set
    • setLineDash

      public void setLineDash(List<Double> lineDash)
      Sets the line dash pattern. By default, stroke without dash.

      For more details see: setLineDash() docs

      Parameters:
      lineDash - line dash pattern
    • withLineDash

      public Stroke withLineDash(List<Double> lineDash)
      Parameters:
      lineDash - line dash pattern
      Returns:
      current instance
    • getLineDashOffset

      public Double getLineDashOffset()
      Returns:
      line dash offset value or null if not set
    • setLineDashOffset

      public void setLineDashOffset(Double lineDashOffset)
      Sets the line dash offset. The default value is 0.

      For more details see: setLineDashOffset() docs

      Parameters:
      lineDashOffset - line dash offset value
    • withLineDashOffset

      public Stroke withLineDashOffset(Double lineDashOffset)
      Parameters:
      lineDashOffset - line dash offset value
      Returns:
      current instance
    • getMiterLimit

      public Double getMiterLimit()
      Returns:
      miter limit value or null if not set
    • setMiterLimit

      public void setMiterLimit(Double miterLimit)
      Sets the miter limit. It defines a limit on the ratio of the miter value to the setWidth(Double) used to draw a miter join. When the limit is exceeded, the join is converted from a miter to a bevel. Used with LineJoin.MITER. The default value is 10.

      For more details see: setMiterLimit() docs

      Parameters:
      miterLimit - miter limit value
    • withMiterLimit

      public Stroke withMiterLimit(Double miterLimit)
      Parameters:
      miterLimit - miter limit value
      Returns:
      current instance
    • getWidth

      public Double getWidth()
      Returns:
      stroke width or null if not set
    • setWidth

      public void setWidth(Double width)
      Sets stroke width.

      For more details see: setWidth() docs

      Parameters:
      width - stroke width
    • withWidth

      public Stroke withWidth(Double width)
      Parameters:
      width - stroke width
      Returns:
      current instance
    • setParent

      protected void setParent(MapObservableObject parent)
      Overrides:
      setParent in class MapObservableObject