public class BoundedVoronoiStylerDefault extends Object implements IBoundedVoronoiStyler
Constructor and Description |
---|
BoundedVoronoiStylerDefault()
Standard constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
applyStylingForAreaFill(Graphics2D g,
ThiessenPolygon polygon)
Applies styling for area fill operations.
|
void |
applyStylingForLineDrawing(Graphics2D g,
ThiessenPolygon polygon)
Applies styling for line drawing operations.
|
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.
|
void |
initializeRendering(Graphics2D g)
Called once at the beginning of rendering to set up the Graphics2D surface
for rendering.
|
boolean |
isAreaFillEnabled()
Indicates whether area-fill operations are enabled
|
boolean |
isFeatureTypeEnabled(BoundedVoronoiRenderingType type)
Indicates whether features of the specified type are enabled for rendering.
|
boolean |
isRenderingEnabled(ThiessenPolygon polygon,
BoundedVoronoiRenderingType type)
Indicates whether the specified type of rendering is enabled for the
specified polygon object.
|
void |
setAreaFillColor(Color color)
Set the area fill rendering to use a single, uniform color or paint for all
polygons.
|
void |
setAreaFillEnabled(boolean enabled)
Sets the option for enabling area fill operations
|
void |
setAreaFillPalette(Color[] paletteSpecification)
Set the area fill rendering to use a single, uniform color or paint for all
polygons.
|
void |
setLineColor(Color color)
Set the color for rendering lines
|
void |
setLineStroke(Stroke stroke)
Set the stroke for rendering lines
|
void |
setVertexColor(Color color)
Set the color for rendering vertices
|
void |
setVertexLabelingEnabled(boolean enabled)
Specifies whether vertex labeling is enabled.
|
void |
setVertexLabelingFont(Font font)
Sets the font for labeling vertices
|
void |
setVertexSymbolEnabled(boolean enabled)
Specifies whether vertex symbols are to be rendered.
|
void |
setVertexSymbolSize(double vertexSymbolSize)
Sets the size for rendering vertices.
|
public BoundedVoronoiStylerDefault()
public boolean isFeatureTypeEnabled(BoundedVoronoiRenderingType type)
IBoundedVoronoiStyler
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.
isFeatureTypeEnabled
in interface IBoundedVoronoiStyler
type
- a valid instance of a feature type enumerationpublic boolean isRenderingEnabled(ThiessenPolygon polygon, BoundedVoronoiRenderingType type)
IBoundedVoronoiStyler
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.
isRenderingEnabled
in interface IBoundedVoronoiStyler
polygon
- a valid polygontype
- a valid instance of a feature type enumerationpublic void initializeRendering(Graphics2D g)
IBoundedVoronoiStyler
initializeRendering
in interface IBoundedVoronoiStyler
g
- the graphics surface for renderingpublic void applyStylingForAreaFill(Graphics2D g, ThiessenPolygon polygon)
IBoundedVoronoiStyler
applyStylingForAreaFill
in interface IBoundedVoronoiStyler
g
- the graphics surface for renderingpolygon
- a valid polygon instancepublic void applyStylingForLineDrawing(Graphics2D g, ThiessenPolygon polygon)
IBoundedVoronoiStyler
applyStylingForLineDrawing
in interface IBoundedVoronoiStyler
g
- the graphics surface for renderingpolygon
- a valid polygon instancepublic void setLineColor(Color color)
color
- a valid color objectpublic void setLineStroke(Stroke stroke)
stroke
- a valid stroke objectpublic void setAreaFillColor(Color color)
color
- a valid Color or Paint objectpublic void setAreaFillPalette(Color[] paletteSpecification)
paletteSpecification
- a valid array of Color or Paint objectspublic void setVertexColor(Color color)
color
- a valid color objectpublic void setVertexLabelingFont(Font font)
font
- a valid fontpublic void setVertexLabelingEnabled(boolean enabled)
enabled
- true if vertices are to be labeled; otherwise, falsepublic void setVertexSymbolSize(double vertexSymbolSize)
vertexSymbolSize
- a value greater than zeropublic void setVertexSymbolEnabled(boolean enabled)
enabled
- true if vertex symbols are to be rendered; otherwise, falsepublic IBoundedVoronoiVertexSymbol getVertexSymbol(ThiessenPolygon polygon)
getVertexSymbol
in interface IBoundedVoronoiStyler
polygon
- a valid polygonpublic void setAreaFillEnabled(boolean enabled)
setAreaFillEnabled
in interface IBoundedVoronoiStyler
enabled
- true if the Theissen polygons (Voronoi cells) are to
be area-filled; otherwise, false.public boolean isAreaFillEnabled()
Copyright © 2021. All rights reserved.