Class BoundedVoronoiStylerAdapter

    • Constructor Detail

      • BoundedVoronoiStylerAdapter

        public BoundedVoronoiStylerAdapter()
        Constructs an instance that implements default behavior.
    • 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 g2d)
        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:
        g2d - the graphics surface for rendering
      • applyStylingForAreaFill

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

        public void applyStylingForLineDrawing​(Graphics2D g2d,
                                               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:
        g2d - the graphics surface for rendering
        polygon - a valid polygon instance
      • getVertexSymbol

        public IBoundedVoronoiVertexSymbol getVertexSymbol​(ThiessenPolygon polygon)
        Description copied from interface: IBoundedVoronoiStyler
        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)
        Description copied from interface: IBoundedVoronoiStyler
        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.