|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.uci.ics.jung.visualization.AbstractRenderer
edu.uci.ics.jung.visualization.graphdraw.SettableRenderer
A renderer with all sorts of buttons to press and dials to turn. In general, if a function is available to get an answer to questions of color. Otherwise, the set fields are used.
The default is to paint vertices with Black foreground text and Red backgrounds. Picked vertices are orange. [Whether a vertex is Picked is resolved with v.getUserDatum(_VisualizationViewer.VIS_KEY);
Note that setting a stroke width other than 1 is likely to slow down the visualization noticably, as is using transparency.
| Constructor Summary | |
SettableRenderer()
This variant simply renders vertices as small empty boxes without labels. |
|
SettableRenderer(StringLabeller sl)
Creates a SettableRenderer that will be drawn in the "heavy" style: a box around the label |
|
SettableRenderer(StringLabeller sl,
EdgeStringer el)
Creates a SettableRenderer that will label edges with the given EdgeStringer. |
|
| Method Summary | |
void |
labelEdge(java.awt.Graphics2D g2d,
Edge e,
java.lang.String label,
int x1,
int x2,
int y1,
int y2)
Labels the edge at the half-way point (if undirected) or three-quarters if directed or 15 pixels above the vertex if self-loop. |
void |
paintEdge(java.awt.Graphics g,
Edge e,
int x1,
int y1,
int x2,
int y2)
Paints the edge in the color specified by the EdgeColorFunction or the hard-set color, and at the thickness set with an EdgeThicknessFunction. |
void |
paintVertex(java.awt.Graphics g,
Vertex v,
int x,
int y)
Paints the vertex, using the settings above (VertexColors, etc). |
void |
setEdgeColor(java.awt.Color c)
|
void |
setEdgeColorFunction(EdgeColorFunction ecf)
Edges are drawn by calling EdgeColorFunction with the edge, to decide how it is to be drawn. |
void |
setEdgeThickness(int i)
Forces all edges to draw with this thickness. |
void |
setEdgeThicknessFunction(EdgeThicknessFunction etf)
This version takes a function that dynamically chooses an edge thickness. |
void |
setLightDrawing(boolean b)
Creates a SettableRenderer that will be drawn in the "light" style: a colored box next to text, instead of text overlaying the box. |
void |
setShouldDrawDirectedArrows(boolean b)
Sets whether the system should draw arrows on directed edges. |
void |
setShouldDrawSelfLoops(boolean b)
Sets whether the system should draw self-loops. |
void |
setShouldDrawUndirectedArrows(boolean b)
Sets whether the system should draw arrows on directed edges. |
void |
setStringLabeller(StringLabeller sl)
|
void |
setVertexBGColor(java.awt.Color vertexColor)
Manually sets the color of an unpicked Vertex's background (i.e. its field) |
void |
setVertexColorFunction(VertexColorFunction vcf)
Finds the color of a vertex with a VertexColorFunction |
void |
setVertexForegroundColor(java.awt.Color vertexColor)
Manually sets the color of a Vertex's foreground (i.e. its text) |
void |
setVertexPickedColor(java.awt.Color vertexColor)
Manually sets the color of a picked Vertex's background (i.e. its field) |
| Methods inherited from class edu.uci.ics.jung.visualization.AbstractRenderer |
setPickedKey, wiggleRoomX, wiggleRoomY |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SettableRenderer()
public SettableRenderer(StringLabeller sl)
sl -
public SettableRenderer(StringLabeller sl,
EdgeStringer el)
sl - el - | Method Detail |
public void setLightDrawing(boolean b)
public void setStringLabeller(StringLabeller sl)
public void setEdgeColor(java.awt.Color c)
public void setEdgeColorFunction(EdgeColorFunction ecf)
ecf - public void setEdgeThickness(int i)
i - public void setEdgeThicknessFunction(EdgeThicknessFunction etf)
etf - public void setShouldDrawDirectedArrows(boolean b)
b - public void setShouldDrawUndirectedArrows(boolean b)
b - public void setShouldDrawSelfLoops(boolean b)
b -
public void paintEdge(java.awt.Graphics g,
Edge e,
int x1,
int y1,
int x2,
int y2)
paintEdge in interface RendererpaintEdge in class AbstractRendererEdgeThicknessFunction,
EdgeColorFunction
public void labelEdge(java.awt.Graphics2D g2d,
Edge e,
java.lang.String label,
int x1,
int x2,
int y1,
int y2)
g2d - e - label - x1 - x2 - y1 - y2 - public void setVertexForegroundColor(java.awt.Color vertexColor)
vertexColor - public void setVertexPickedColor(java.awt.Color vertexColor)
vertexColor - public void setVertexBGColor(java.awt.Color vertexColor)
vertexColor - public void setVertexColorFunction(VertexColorFunction vcf)
vcf -
public void paintVertex(java.awt.Graphics g,
Vertex v,
int x,
int y)
paintVertex in interface RendererpaintVertex in class AbstractRenderer
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||