|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttwaver.gis.gadget.VoronoiDiagram
VoronoiDiagram is designed to create voronoi diagram and paint the diagram.
Field Summary | |
static int |
pointRadius
|
Constructor Summary | |
VoronoiDiagram()
Constructs VoronoiDiagram instance. |
Method Summary | |
void |
addSite(twaver.Element element)
Adds a site to the diagram. |
void |
clear()
Clears all the sites stored in the diagram. |
void |
draw(java.awt.Graphics g,
boolean withFill,
boolean withSites)
Draws the diagram. |
boolean |
isBoundsVisible()
Determines whether the bounds of the the diagram's visible part should be drawn. |
boolean |
isVisible()
Determines whether this diagram should be visible. |
void |
setAreaColorGenerator(twaver.Generator generator)
Sets the color generator to the diagram. |
void |
setBoundsVisible(boolean isBoundsVisible)
Makes the bounds of the diagram's visible part be drawn or not when the diagram is required to be draw. |
void |
setClipShape(java.awt.Shape area)
Defines the clip shape. |
void |
setVisible(boolean isVisible)
Makes the diagram visible or invisible. |
void |
setVisibleBounds(java.awt.geom.Rectangle2D bounds)
Sets the visible bounds of the diagram. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int pointRadius
Constructor Detail |
public VoronoiDiagram()
Method Detail |
public void addSite(twaver.Element element)
element
- the element object which will be seemed as a site of the diagram.public void clear()
public void draw(java.awt.Graphics g, boolean withFill, boolean withSites)
g
- the Graphics objectwithFill
- true to fill the polygon areas; false not to fill the areas.withSites
- true to draw the sites; false not to draw the sites.public boolean isBoundsVisible()
public boolean isVisible()
setVisible(boolean)
public void setAreaColorGenerator(twaver.Generator generator)
generator
- an instance of the Generator interface.public void setBoundsVisible(boolean isBoundsVisible)
isBoundsVisible
- true to make the bounds drawn; false not to make the bounds drawnpublic void setClipShape(java.awt.Shape area)
area
- the defined clip shape.public void setVisible(boolean isVisible)
isVisible
- true to make the diagram should be visible; false to make it invisiblepublic void setVisibleBounds(java.awt.geom.Rectangle2D bounds)
bounds
- the specified boundssetClipShape(Shape)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |