Package org.tinfour.voronoi
Class BoundedVoronoiVertexSymbol
- java.lang.Object
-
- org.tinfour.voronoi.BoundedVoronoiVertexSymbol
-
- All Implemented Interfaces:
IBoundedVoronoiVertexSymbol
public class BoundedVoronoiVertexSymbol extends Object implements IBoundedVoronoiVertexSymbol
The default renderer for vertices in a drawing of a BoundedVoronoiDiagram instance.
-
-
Constructor Summary
Constructors Constructor Description BoundedVoronoiVertexSymbol()Standard constructorBoundedVoronoiVertexSymbol(double vertexSymbolSize)Constructs an instance with specified vertex symbol size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(Graphics g, double x, double y)Draw the icon for a vertex positioned at the indicated coordinatesvoidsetColor(Color color)Set the color for this symbol.voidsetFont(Font font)Sets the font to be used for labeling.voidsetLabel(String label)Sets the label for this symbol
-
-
-
Constructor Detail
-
BoundedVoronoiVertexSymbol
public BoundedVoronoiVertexSymbol()
Standard constructor
-
BoundedVoronoiVertexSymbol
public BoundedVoronoiVertexSymbol(double vertexSymbolSize)
Constructs an instance with specified vertex symbol size.- Parameters:
vertexSymbolSize- a symbol size in pixels.
-
-
Method Detail
-
setLabel
public void setLabel(String label)
Sets the label for this symbol- Parameters:
label- a valid, non-empty string; or a null if no label is required.
-
setFont
public void setFont(Font font)
Sets the font to be used for labeling. If not set, the currently color for the graphics surface will be used.- Parameters:
font- a valid font; or a null
-
setColor
public void setColor(Color color)
Set the color for this symbol. If not set, the currently color for the graphics surface will be used.- Parameters:
color- a valid color; or a null.
-
draw
public void draw(Graphics g, double x, double y)
Draw the icon for a vertex positioned at the indicated coordinates- Specified by:
drawin interfaceIBoundedVoronoiVertexSymbol- Parameters:
g- a valid Graphics surfacex- the user (pixel) x coordinate of the vertexy- the user (pixel) y coordinate of the vertex
-
-