|
||||||||||
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
public class 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.
Field Summary | |
---|---|
protected Color |
edgeColor
Deprecated. |
protected EdgeColorFunction |
edgeColorFunction
Deprecated. |
protected int |
edgeThickness
Deprecated. |
protected EdgeThicknessFunction |
edgeThicknessFunction
Deprecated. |
protected Arrow |
mArrow
Deprecated. |
protected boolean |
mDrawLightBoxes
Deprecated. |
protected EdgeStringer |
mEdgeLabelFunction
Deprecated. |
protected int |
mLineHeight
Deprecated. |
protected boolean |
mShouldDrawArrowsDirected
Deprecated. |
protected boolean |
mShouldDrawArrowsUndirected
Deprecated. |
protected boolean |
mShouldDrawSelfLoops
Deprecated. |
protected StringLabeller |
mStringLabeller
Deprecated. |
protected static EdgePredicate |
self_loop
Deprecated. |
protected Color |
vertexBGColor
Deprecated. |
protected VertexColorFunction |
vertexColorFunction
Deprecated. |
protected Color |
vertexFGColor
Deprecated. |
protected Color |
vertexPickedColor
Deprecated. |
Constructor Summary | |
---|---|
SettableRenderer()
Deprecated. This variant simply renders vertices as small empty boxes without labels. |
|
SettableRenderer(StringLabeller sl)
Deprecated. Creates a SettableRenderer that will be drawn in the "heavy" style: a box around the label |
|
SettableRenderer(StringLabeller sl,
EdgeStringer el)
Deprecated. Creates a SettableRenderer that will label edges with the given EdgeStringer. |
Method Summary | |
---|---|
protected void |
drawArrowhead(Graphics2D g2d,
Edge e,
int xsource,
int ysource,
int xdest,
int ydest)
Deprecated. Draws an arrowhead on this edge in the direction from xsource,ysource to xend, yend |
protected void |
drawEdge(float edgeWidth,
Graphics g,
Edge e,
int x1,
int y1,
int x2,
int y2)
Deprecated. Draws the edge at the given width, then restores the previous stroke. |
protected void |
drawEdgeSimple(Graphics g,
Edge e,
int x1,
int y1,
int x2,
int y2)
Deprecated. |
protected String |
getLabel(Vertex v)
Deprecated. Simple label function returns the StringLabeller's notion of v's label. |
void |
labelEdge(Graphics2D g2d,
Edge e,
String label,
int x1,
int x2,
int y1,
int y2)
Deprecated. 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(Graphics g,
Edge e,
int x1,
int y1,
int x2,
int y2)
Deprecated. Paints the edge in the color specified by the EdgeColorFunction or the hard-set color, and at the thickness set with an EdgeThicknessFunction. |
protected void |
paintLightVertex(Graphics g,
Vertex v,
int x,
int y,
String label)
Deprecated. |
void |
paintVertex(Graphics g,
Vertex v,
int x,
int y)
Deprecated. Paints the vertex, using the settings above (VertexColors, etc). |
void |
setEdgeColor(Color c)
Deprecated. |
void |
setEdgeColorFunction(EdgeColorFunction ecf)
Deprecated. Edges are drawn by calling EdgeColorFunction with the edge, to decide how it is to be drawn. |
void |
setEdgeThickness(int i)
Deprecated. Forces all edges to draw with this thickness. |
void |
setEdgeThicknessFunction(EdgeThicknessFunction etf)
Deprecated. This version takes a function that dynamically chooses an edge thickness. |
void |
setLightDrawing(boolean b)
Deprecated. 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)
Deprecated. Sets whether the system should draw arrows on directed edges. |
void |
setShouldDrawSelfLoops(boolean b)
Deprecated. Sets whether the system should draw self-loops. |
void |
setShouldDrawUndirectedArrows(boolean b)
Deprecated. Sets whether the system should draw arrows on directed edges. |
void |
setStringLabeller(StringLabeller sl)
Deprecated. |
void |
setVertexBGColor(Color vertexColor)
Deprecated. Manually sets the color of an unpicked Vertex's background (i.e. its field). |
void |
setVertexColorFunction(VertexColorFunction vcf)
Deprecated. Finds the color of a vertex with a VertexColorFunction. |
void |
setVertexForegroundColor(Color vertexColor)
Deprecated. Manually sets the color of a Vertex's foreground (i.e. its text). |
void |
setVertexPickedColor(Color vertexColor)
Deprecated. Manually sets the color of a picked Vertex's background (i.e. its field). |
Methods inherited from class edu.uci.ics.jung.visualization.AbstractRenderer |
---|
getPickedKey, isPicked, isPicked, setPickedKey |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Color vertexFGColor
protected Color vertexPickedColor
protected Color vertexBGColor
protected VertexColorFunction vertexColorFunction
protected EdgeThicknessFunction edgeThicknessFunction
protected int edgeThickness
protected Color edgeColor
protected EdgeColorFunction edgeColorFunction
protected StringLabeller mStringLabeller
protected boolean mShouldDrawSelfLoops
protected boolean mDrawLightBoxes
protected boolean mShouldDrawArrowsUndirected
protected boolean mShouldDrawArrowsDirected
protected Arrow mArrow
protected EdgeStringer mEdgeLabelFunction
protected int mLineHeight
protected static EdgePredicate self_loop
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(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(Graphics g, Edge e, int x1, int y1, int x2, int y2)
paintEdge
in interface Renderer
paintEdge
in class AbstractRenderer
EdgeThicknessFunction
,
EdgeColorFunction
public void labelEdge(Graphics2D g2d, Edge e, String label, int x1, int x2, int y1, int y2)
g2d
- e
- label
- x1
- x2
- y1
- y2
- protected void drawArrowhead(Graphics2D g2d, Edge e, int xsource, int ysource, int xdest, int ydest)
protected void drawEdge(float edgeWidth, Graphics g, Edge e, int x1, int y1, int x2, int y2)
edgeWidth
- the width of the stroke.protected void drawEdgeSimple(Graphics g, Edge e, int x1, int y1, int x2, int y2)
public void setVertexForegroundColor(Color vertexColor)
vertexColor
- public void setVertexPickedColor(Color vertexColor)
vertexColor
- public void setVertexBGColor(Color vertexColor)
vertexColor
- public void setVertexColorFunction(VertexColorFunction vcf)
vcf
- protected String getLabel(Vertex v)
v
- a vertex
public void paintVertex(Graphics g, Vertex v, int x, int y)
paintVertex
in interface Renderer
paintVertex
in class AbstractRenderer
protected void paintLightVertex(Graphics g, Vertex v, int x, int y, String label)
g
- v
- x
- y
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |