Class SketchStyle


  • public final class SketchStyle
    extends java.lang.Object
    Defines a set of styles used for the visual appearance of the sketch geometry during editing. It controls the appearance of vertices, selections, line and fill symbols as well as feedback graphics. Where available the symbols can be MultilayerSymbol instances. The last value set for a particular symbol takes precedence i.e. calling setFillSymbol(FillSymbol) after setMultilayerFillSymbol(MultilayerPolygonSymbol) will cause the FillSymbol to replace the MultilayerPolygonSymbol and getMultilayerFillSymbol() will return null. By default the styles are not multilayer symbols.
    Since:
    100.1.0
    • Constructor Detail

      • SketchStyle

        public SketchStyle()
        Constructs the default SketchStyle object. By default, the symbols for sketch style are set as follows:
        • vertex symbol: a MarkerSymbol with square style, red color, size 14
        • middle vertex symbol: a MarkerSymbol with circle style, white color, light red outline, size 10
        • line symbol: a LineSymbol with solid style, red color, size 1
        • fill symbol: a FillSymbol with solid style, red color, the default line symbol as outline
        • feedback vertex symbol: a MarkerSymbol with circle style, red color, the default line symbol as outline, size 28
        • feedback line symbol: a LineSymbol with dash style, red color, size 1
        • feedback fill symbol: a FillSymbol with solid style, red color, the default feedback line symbol as outline
        Since:
        100.1.0
    • Method Detail

      • getSelectionColor

        @Deprecated
        public int getSelectionColor()
        Deprecated.
        As of 100.4.0, use SelectionProperties.getColor() from your MapView.
        Gets the selection color. The default value is 0xFF00FFFF.
        Returns:
        the selection color to highlight the selected geometries
        Since:
        100.1.0
      • setSelectionColor

        @Deprecated
        public void setSelectionColor​(int selectionColor)
        Deprecated.
        As of 100.4.0, use SelectionProperties.setColor(int) from your MapView.
        Sets the selection color which is used to highlight the selected geometries.
        Parameters:
        selectionColor - the selection color to highlight the selected geometries
        Since:
        100.1.0
      • isShowNumbersForVertices

        public boolean isShowNumbersForVertices()
        Indicates if every vertex in the sketch is labeled with a number.
        Returns:
        true if every vertex in the sketch is labeled with a sequential number, false otherwise
        Since:
        100.1.0
      • setShowNumbersForVertices

        public void setShowNumbersForVertices​(boolean showNumbersForVertices)
        Sets whether or not the vertices of the sketch geometry are labelled with numbers.
        Parameters:
        showNumbersForVertices - true to show vertices with number labels, false otherwise
        Since:
        100.1.0
      • getFillSymbol

        public FillSymbol getFillSymbol()
        Gets the symbol used to fill polygons. Will return null if a multilayer symbol is being used to symbolize this.
        Returns:
        the symbol used to fill a polygon geometry, or null
        Since:
        100.1.0
      • getMultilayerFillSymbol

        public MultilayerPolygonSymbol getMultilayerFillSymbol()
        Gets the multiayer symbol used to fill polygons. Will return null if a non-multilayer symbol is being used to symbolize this.
        Returns:
        the symbol used to fill a polygon geometry, or null
        Since:
        100.5.0
      • setFillSymbol

        public void setFillSymbol​(FillSymbol fillSymbol)
        Sets the symbol used to fill polygons.
        Parameters:
        fillSymbol - the symbol to fill a polygon geometry
        Throws:
        java.lang.IllegalArgumentException - if the fillSymbol is null
        Since:
        100.1.0
      • setMultilayerFillSymbol

        public void setMultilayerFillSymbol​(MultilayerPolygonSymbol fillSymbol)
        Sets the multilayer symbol used to fill polygons.
        Parameters:
        fillSymbol - the symbol to fill a polygon geometry
        Throws:
        java.lang.IllegalArgumentException - if the fillSymbol is null
        Since:
        100.5.0
      • getLineSymbol

        public LineSymbol getLineSymbol()
        Gets the symbol for symbolizing a line geometry. Will return null if a multilayer symbol is being used to symbolize this.
        Returns:
        the symbol for symbolizing a line geometry, or null
        Since:
        100.1.0
      • getMultilayerLineSymbol

        public MultilayerPolylineSymbol getMultilayerLineSymbol()
        Gets the multilayer symbol for symbolizing a line geometry. Will return null if a non-multilayer symbol is being used to symbolize this.
        Returns:
        the symbol for symbolizing a line geometry, or null
        Since:
        100.5.0
      • setLineSymbol

        public void setLineSymbol​(LineSymbol lineSymbol)
        Sets the symbol for symbolizing a line geometry.
        Parameters:
        lineSymbol - the symbol for symbolizing a line geometry
        Throws:
        java.lang.IllegalArgumentException - if the lineSymbol is null
        Since:
        100.1.0
      • setMultilayerLineSymbol

        public void setMultilayerLineSymbol​(MultilayerPolylineSymbol lineSymbol)
        Sets the multilayer symbol for symbolizing a line geometry.
        Parameters:
        lineSymbol - the symbol for symbolizing a line geometry
        Throws:
        java.lang.IllegalArgumentException - if the lineSymbol is null
        Since:
        100.5.0
      • getVertexSymbol

        public MarkerSymbol getVertexSymbol()
        Gets the symbol used to display the vertices. Will return null if a multilayer symbol is being used to symbolize this.
        Returns:
        the symbol to symbolize a point geometry, or null
        Since:
        100.1.0
      • getMultilayerVertexSymbol

        public MultilayerPointSymbol getMultilayerVertexSymbol()
        Gets the multilayer symbol used to display the vertices. Will return null if a non-multilayer symbol is being used to symbolize this.
        Returns:
        the symbol to symbolize a point geometry, or null
        Since:
        100.5.0
      • setVertexSymbol

        public void setVertexSymbol​(MarkerSymbol vertexSymbol)
        Sets the symbol used to display the vertices.
        Parameters:
        vertexSymbol - the symbol used to symbolize vertices
        Throws:
        java.lang.IllegalArgumentException - if the vertexSymbol is null
        Since:
        100.1.0
      • setMultilayerVertexSymbol

        public void setMultilayerVertexSymbol​(MultilayerPointSymbol vertexSymbol)
        Sets the multilayer symbol used to display the vertices.
        Parameters:
        vertexSymbol - the symbol used to symbolize vertices
        Throws:
        java.lang.IllegalArgumentException - if the vertexSymbol is null
        Since:
        100.5.0
      • getFeedbackFillSymbol

        public FillSymbol getFeedbackFillSymbol()
        Gets the symbol used to display feedback when editing polygon geometries. Will return null if a multilayer symbol is being used to symbolize this feedback.
        Returns:
        the symbol that is used to symbolize a polygon geometry for feedback, or null
        Since:
        100.1.0
      • getMultilayerFeedbackFillSymbol

        public MultilayerPolygonSymbol getMultilayerFeedbackFillSymbol()
        Gets the multilayer symbol used to display feedback when editing polygon geometries. Will return null if a non-multilayer symbol is being used to symbolize this feedback.
        Returns:
        the symbol that is used to symbolize a polygon geometry for feedback, or null
        Since:
        100.5.0
      • setFeedbackFillSymbol

        public void setFeedbackFillSymbol​(FillSymbol feedbackFillSymbol)
        Sets the symbol used to display feedback when editing polygon geometries.
        Parameters:
        feedbackFillSymbol - the symbol to symbolize a polygon geometry for feedback
        Throws:
        java.lang.IllegalArgumentException - if the feedbackFillSymbol is null
        Since:
        100.1.0
      • setMultilayerFeedbackFillSymbol

        public void setMultilayerFeedbackFillSymbol​(MultilayerPolygonSymbol feedbackFillSymbol)
        Sets the multilayer symbol used to display feedback when editing polygon geometries.
        Parameters:
        feedbackFillSymbol - the symbol to symbolize a polygon geometry for feedback
        Throws:
        java.lang.IllegalArgumentException - if the feedbackFillSymbol is null
        Since:
        100.5.0
      • getFeedbackLineSymbol

        public LineSymbol getFeedbackLineSymbol()
        Gets the symbol used to display feedback when editing line geometries. Will return null if a multilayer symbol is being used to symbolize this feedback.
        Returns:
        the symbol used to display feedback when editing line geometries, or null
        Since:
        100.1.0
      • getMultilayerFeedbackLineSymbol

        public MultilayerPolylineSymbol getMultilayerFeedbackLineSymbol()
        Gets the multilayer symbol used to display feedback when editing line geometries. Will return null if a non-multilayer symbol is being used to symbolize this feedback.
        Returns:
        the symbol used to display feedback when editing line geometries, or null
        Since:
        100.5.0
      • setFeedbackLineSymbol

        public void setFeedbackLineSymbol​(LineSymbol feedbackLineSymbol)
        Sets the symbol used to display feedback when editing line geometries.
        Parameters:
        feedbackLineSymbol - the symbol used to display feedback when editing line geometries
        Throws:
        java.lang.IllegalArgumentException - if the feedbackLineSymbol is null
        Since:
        100.1.0
      • setMultilayerFeedbackLineSymbol

        public void setMultilayerFeedbackLineSymbol​(MultilayerPolylineSymbol feedbackLineSymbol)
        Sets the multilayer symbol used to display feedback when editing line geometries.
        Parameters:
        feedbackLineSymbol - the symbol used to display feedback when editing line geometries
        Throws:
        java.lang.IllegalArgumentException - if the feedbackLineSymbol is null
        Since:
        100.5.0
      • getFeedbackVertexSymbol

        public MarkerSymbol getFeedbackVertexSymbol()
        Gets the symbol used to display feedback when editing point geometries. Will return null if a multilayer symbol is being used to symbolize this feedback.
        Returns:
        the symbol used to display feedback when editing point geometries, or null
        Since:
        100.1.0
      • getMultilayerFeedbackVertexSymbol

        public MultilayerPointSymbol getMultilayerFeedbackVertexSymbol()
        Gets the multilayer symbol used to display feedback when editing point geometries. Will return null if a non-multilayer symbol is being used to symbolize this feedback.
        Returns:
        the symbol used to display feedback when editing point geometries, or null
        Since:
        100.5.0
      • setFeedbackVertexSymbol

        public void setFeedbackVertexSymbol​(MarkerSymbol feedbackVertexSymbol)
        Sets the symbol used to display feedback when editing point geometries.
        Parameters:
        feedbackVertexSymbol - the symbol used to display feedback when editing point geometries
        Throws:
        java.lang.IllegalArgumentException - if the feedbackVertexSymbol is null
        Since:
        100.1.0
      • setMultilayerFeedbackVertexSymbol

        public void setMultilayerFeedbackVertexSymbol​(MultilayerPointSymbol feedbackVertexSymbol)
        Sets the multilayer symbol used to display feedback when editing point geometries.
        Parameters:
        feedbackVertexSymbol - the symbol used to display feedback when editing point geometries
        Throws:
        java.lang.IllegalArgumentException - if the feedbackVertexSymbol is null
        Since:
        100.5.0
      • getMidVertexSymbol

        public MarkerSymbol getMidVertexSymbol()
        Gets the symbol used to display middle point geometry between two vertices. Will return null if a multilayer symbol is being used to symbolize this.
        Returns:
        the symbol used to display the point between two vertices, or null
        Since:
        100.1.0
      • getMultilayerMidVertexSymbol

        public MultilayerPointSymbol getMultilayerMidVertexSymbol()
        Gets the multilayer symbol used to display middle point geometry between two vertices. Will return null if a non-multilayer symbol is being used to symbolize this.
        Returns:
        the symbol used to display the point between two vertices, or null
        Since:
        100.5.0
      • setMidVertexSymbol

        public void setMidVertexSymbol​(MarkerSymbol midVertexSymbol)
        Sets the symbol used to display the point between two vertices.
        Parameters:
        midVertexSymbol - the symbol used to display the point between two vertices
        Throws:
        java.lang.IllegalArgumentException - if the midVertexSymbol is null
        Since:
        100.1.0
      • setMultilayerMidVertexSymbol

        public void setMultilayerMidVertexSymbol​(MultilayerPointSymbol midVertexSymbol)
        Sets the multilayer symbol used to display the point between two vertices.
        Parameters:
        midVertexSymbol - the symbol used to display the point between two vertices
        Throws:
        java.lang.IllegalArgumentException - if the midVertexSymbol is null
        Since:
        100.5.0
      • getSelectedMidVertexSymbol

        public MarkerSymbol getSelectedMidVertexSymbol()
        Gets the symbol used to display the selected middle vertex. Will return null if a multilayer symbol is being used to symbolize this.
        Returns:
        the symbol used to display the selected middle vertex, or null
        Since:
        100.1.0
      • getMultilayerSelectedMidVertexSymbol

        public MultilayerPointSymbol getMultilayerSelectedMidVertexSymbol()
        Gets the multilayer symbol used to display the selected middle vertex. Will return null if a non-multilayer symbol is being used to symbolize this.
        Returns:
        the symbol used to display the selected middle vertex, or null
        Since:
        100.5.0
      • setSelectedMidVertexSymbol

        public void setSelectedMidVertexSymbol​(MarkerSymbol selectedMidVertexSymbol)
        Sets the symbol used to display the selected middle vertex.
        Parameters:
        selectedMidVertexSymbol - the symbol used to display the selected middle vertex
        Throws:
        java.lang.IllegalArgumentException - if the selectedMidVertexSymbol is null
        Since:
        100.1.0
      • setMultilayerSelectedMidVertexSymbol

        public void setMultilayerSelectedMidVertexSymbol​(MultilayerPointSymbol selectedMidVertexSymbol)
        Sets the multilayer symbol used to display the selected middle vertex.
        Parameters:
        selectedMidVertexSymbol - the symbol used to display the selected middle vertex
        Throws:
        java.lang.IllegalArgumentException - if the selectedMidVertexSymbol is null
        Since:
        100.5.0
      • getSelectedVertexSymbol

        public MarkerSymbol getSelectedVertexSymbol()
        Gets the symbol to display the selected vertex. Will return null if a multilayer symbol is being used to symbolize this.
        Returns:
        the symbol to display the selected vertex, or null
        Since:
        100.1.0
      • getMultilayerSelectedVertexSymbol

        public MultilayerPointSymbol getMultilayerSelectedVertexSymbol()
        Gets the multilayer symbol to display the selected vertex. Will return null if a non-multilayer symbol is being used to symbolize this.
        Returns:
        the symbol to display the selected vertex, or null
        Since:
        100.5.0
      • setSelectedVertexSymbol

        public void setSelectedVertexSymbol​(MarkerSymbol selectedVertexSymbol)
        Sets the symbol to display the selected vertex.
        Parameters:
        selectedVertexSymbol - the symbol to display the selected vertex
        Throws:
        java.lang.IllegalArgumentException - if the selectedVertexSymbol is null
        Since:
        100.1.0
      • setMultilayerSelectedVertexSymbol

        public void setMultilayerSelectedVertexSymbol​(MultilayerPointSymbol selectedVertexSymbol)
        Sets the multilayer symbol to display the selected vertex.
        Parameters:
        selectedVertexSymbol - the symbol to display the selected vertex
        Throws:
        java.lang.IllegalArgumentException - if the selectedVertexSymbol is null
        Since:
        100.5.0
      • getVertexTextSymbol

        public TextSymbol getVertexTextSymbol()
        Gets the symbol to display the text over vertices when number labeling is enabled for vertices.
        Returns:
        the symbol to display the text over vertices, or null
        Since:
        100.1.0
      • setVertexTextSymbol

        public void setVertexTextSymbol​(TextSymbol vertexTextSymbol)
        Sets the symbol to display the text over vertices when number labelling is enabled for vertices.
        Parameters:
        vertexTextSymbol - the symbol to display the text over vertices
        Throws:
        java.lang.IllegalArgumentException - if the vertexTextSymbol is null
        Since:
        100.1.0