Class BoundedVoronoiStylerDefault

    • Constructor Detail

      • BoundedVoronoiStylerDefault

        public BoundedVoronoiStylerDefault()
        Standard constructor.
    • Method Detail

      • isFeatureTypeEnabled

        public boolean isFeatureTypeEnabled​(BoundedVoronoiRenderingType type)
        Description copied from interface: IBoundedVoronoiStyler
        Indicates whether features of the specified type are enabled for rendering.

        This method is useful in cases where an application is required to control whether broad classes of feature types are rendered. For example, an application might be configured to draw line features, while suppressing area-fill features.

        Specified by:
        isFeatureTypeEnabled in interface IBoundedVoronoiStyler
        Parameters:
        type - a valid instance of a feature type enumeration
        Returns:
        true if the type is enabled for rendering; otherwise, false.
      • isRenderingEnabled

        public boolean isRenderingEnabled​(ThiessenPolygon polygon,
                                          BoundedVoronoiRenderingType type)
        Description copied from interface: IBoundedVoronoiStyler
        Indicates whether the specified type of rendering is enabled for the specified polygon object.

        This method is useful in cases where rendering of one type to be enabled for a specific polygon while rendering of another type is not. For example, an application may be configured to draw line features for most polygons while area-filling a specific polygon.

        Specified by:
        isRenderingEnabled in interface IBoundedVoronoiStyler
        Parameters:
        polygon - a valid polygon
        type - a valid instance of a feature type enumeration
        Returns:
        true if the polygon is enabled for the specified rendering type; otherwise, false.
      • initializeRendering

        public void initializeRendering​(Graphics2D g)
        Description copied from interface: IBoundedVoronoiStyler
        Called once at the beginning of rendering to set up the Graphics2D surface for rendering. One common use of this routine is to ensure that anti-aliasing is activated, though other settings may also be applied.
        Specified by:
        initializeRendering in interface IBoundedVoronoiStyler
        Parameters:
        g - the graphics surface for rendering
      • applyStylingForLineDrawing

        public void applyStylingForLineDrawing​(Graphics2D g,
                                               ThiessenPolygon polygon)
        Description copied from interface: IBoundedVoronoiStyler
        Applies styling for line drawing operations. Styling may include setting a Java Color or Paint, a Stroke, a Composite, clipping, etc.
        Specified by:
        applyStylingForLineDrawing in interface IBoundedVoronoiStyler
        Parameters:
        g - the graphics surface for rendering
        polygon - a valid polygon instance
      • setLineColor

        public void setLineColor​(Color color)
        Set the color for rendering lines
        Parameters:
        color - a valid color object
      • setLineStroke

        public void setLineStroke​(Stroke stroke)
        Set the stroke for rendering lines
        Parameters:
        stroke - a valid stroke object
      • setAreaFillColor

        public void setAreaFillColor​(Color color)
        Set the area fill rendering to use a single, uniform color or paint for all polygons.
        Parameters:
        color - a valid Color or Paint object
      • setAreaFillPalette

        public void setAreaFillPalette​(Color[] paletteSpecification)
        Set the area fill rendering to use a single, uniform color or paint for all polygons.
        Parameters:
        paletteSpecification - a valid array of Color or Paint objects
      • setVertexColor

        public void setVertexColor​(Color color)
        Set the color for rendering vertices
        Parameters:
        color - a valid color object
      • setVertexLabelingFont

        public void setVertexLabelingFont​(Font font)
        Sets the font for labeling vertices
        Parameters:
        font - a valid font
      • setVertexLabelingEnabled

        public void setVertexLabelingEnabled​(boolean enabled)
        Specifies whether vertex labeling is enabled.
        Parameters:
        enabled - true if vertices are to be labeled; otherwise, false
      • setVertexSymbolSize

        public void setVertexSymbolSize​(double vertexSymbolSize)
        Sets the size for rendering vertices. By default, vertices are rendered as a filled circle using the line color specification. The size is the diameter (width and height) of the circle. Applications using other presentations for vertices are free to interpret this value as appropriate.
        Parameters:
        vertexSymbolSize - a value greater than zero
      • setVertexSymbolEnabled

        public void setVertexSymbolEnabled​(boolean enabled)
        Specifies whether vertex symbols are to be rendered.
        Parameters:
        enabled - true if vertex symbols are to be rendered; otherwise, false
      • getVertexSymbol

        public IBoundedVoronoiVertexSymbol getVertexSymbol​(ThiessenPolygon polygon)
        Tests to see if the polygon is enabled for rendering a symbol at the vertex position and, if it is, returns a vertex symbol that can be used for rendering.
        Specified by:
        getVertexSymbol in interface IBoundedVoronoiStyler
        Parameters:
        polygon - a valid polygon
        Returns:
        if rendering is enabled, a valid symbol instance; otherwise, a null.
      • setAreaFillEnabled

        public void setAreaFillEnabled​(boolean enabled)
        Sets the option for enabling area fill operations
        Specified by:
        setAreaFillEnabled in interface IBoundedVoronoiStyler
        Parameters:
        enabled - true if the Theissen polygons (Voronoi cells) are to be area-filled; otherwise, false.
      • isAreaFillEnabled

        public boolean isAreaFillEnabled()
        Indicates whether area-fill operations are enabled
        Returns:
        true if the Theissen polygons (Voronoi cells) are to be area-filled; otherwise, false.