Class LineSymbol

java.lang.Object
com.esri.arcgisruntime.symbology.Symbol
com.esri.arcgisruntime.symbology.LineSymbol
All Implemented Interfaces:
JsonSerializable
Direct Known Subclasses:
SimpleLineSymbol

public abstract class LineSymbol extends Symbol
A base class for line symbols used to symbolize graphics and features (collectively referred to as geoelements) that have polyline geometry.

Symbols describe how graphics and features look on a map. Different symbols are used with different geometry types. Line symbols are used to display graphics and features that are based on polyline geometries such as boundaries, transportation routes and utility pipelines. Line symbols can also be used as an outline for fill symbols (FillSymbol.getOutline()) and marker symbols (SimpleMarkerSymbol.getOutline()).

Since:
100.0.0
See Also:
  • Property Details

    • color

      public ObjectProperty<Color> colorProperty
      The color of the line symbol.

      When getting the color (or tint color) from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.

      If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color (or tint color) for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.

      The default value is Color.LIGHTGRAY.

      Attempting to set the color to null will throw a NullPointerException exception.

      Since:
      200.0.0
      See Also:
  • Method Details

    • colorProperty

      public ObjectProperty<Color> colorProperty()
      The color of the line symbol.

      When getting the color (or tint color) from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.

      If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color (or tint color) for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.

      The default value is Color.LIGHTGRAY.

      Attempting to set the color to null will throw a NullPointerException exception.

      Returns:
      the color property
      Since:
      200.0.0
      See Also:
    • getColor

      public Color getColor()
      Gets the value of the color property.
      Property description:
      The color of the line symbol.

      When getting the color (or tint color) from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.

      If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color (or tint color) for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.

      The default value is Color.LIGHTGRAY.

      Attempting to set the color to null will throw a NullPointerException exception.

      Returns:
      the value of the color property
      Since:
      200.0.0
      See Also:
    • setColor

      public void setColor(Color color)
      Sets the value of the color property.
      Property description:
      The color of the line symbol.

      When getting the color (or tint color) from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.

      If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color (or tint color) for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.

      The default value is Color.LIGHTGRAY.

      Attempting to set the color to null will throw a NullPointerException exception.

      Parameters:
      color - the value for the color property
      Since:
      200.0.0
      See Also:
    • setColor

      @Deprecated(since="200.0.0", forRemoval=true) public void setColor(int color)
      Deprecated, for removal: This API element is subject to removal in a future version.
      as of 200.0.0, replaced by setColor(Color)
      Sets the color of this Symbol using a ARGB(alpha, red, green, blue) value.

      When getting the color (or tint color) from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.

      If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color (or tint color) for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.

      Parameters:
      color - an integer representing the background color as 0xAARRGGBB
      Since:
      100.0.0
    • getWidth

      public float getWidth()
      Gets the thickness of the line symbol outline in device-independent pixels (DIPs).

      The default value is 1.0.

      Returns:
      the width of this Symbol
      Since:
      100.0.0
      See Also:
    • setWidth

      public void setWidth(float width)
      Sets the thickness of the line symbol outline in device-independent pixels (DIPs).

      Setting a width of 0 or less will make this Symbol invisible.

      Parameters:
      width - the new width for this Symbol in dp, must be 0 or greater for Symbol to be visible.
      Since:
      100.0.0
    • isAntiAlias

      public boolean isAntiAlias()
      True if the line symbol is drawn with anti-aliasing, false otherwise.

      The default value is set to true.

      Returns:
      true if anti-alias is set; false otherwise.
      Since:
      100.0.0
      See Also:
    • setAntiAlias

      public void setAntiAlias(boolean antiAlias)
      Sets whether or not the line used for this Symbol should be drawn with anti-aliasing.

      Anti-aliasing helps to smooth out an image by providing better image quality but also increases the time it takes to render an image.

      Parameters:
      antiAlias - true turns anti-aliasing on, false turns it off
      Since:
      100.0.0