|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
edu.uci.ics.jung.visualization.GraphDraw
VisualizationViewer
directly instead.
public class GraphDraw
A Swing-only component for drawing graphs. Allows a series of manipulations to access and show graphs, to set their various colors and lines, and to dynamically change values. This is a good starting place for getting a graph up quickly.
Nested Class Summary | |
---|---|
protected class |
GraphDraw.SliderChangeListener
Deprecated. |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected List |
allFilters
Deprecated. |
protected Filter |
mainFilter
Deprecated. |
protected List |
sliders
Deprecated. |
protected JLabel |
statusbar
Deprecated. |
protected JPanel |
toolbar
Deprecated. |
protected VisualizationViewer |
vv
Deprecated. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
GraphDraw(Graph g)
Deprecated. Creates a graph drawing environment that draws this graph object. |
|
GraphDraw(Layout layout)
Deprecated. Creates a graph drawing environment with the specified layout algorithm |
Method Summary | |
---|---|
void |
addGraphMouseListener(GraphMouseListener gel)
Deprecated. Use getVisualizationViewer.addMouseListener( new MouseListenerTranslator(gel, vv)); |
JSlider |
addSlider(LevelFilter l,
int low,
int high,
int defaultVal)
Deprecated. Use the PluggableRenderer's vertex and edge visibility predicates instead. See the release notes for version 1.6 for more information. |
void |
addStaticFilter(Filter f)
Deprecated. Use the PluggableRenderer's vertex and edge visibility predicates instead. See the release notes for version 1.6 for more information. |
void |
addTool(JComponent jc)
Deprecated. Use the PluggableRenderer's vertex and edge visibility predicates instead. See the release notes for version 1.6 for more information. |
void |
callBack(String status)
Deprecated. |
Layout |
getGraphLayout()
Deprecated. Use getVisualizationViewer().getGraphLayout() instead. |
Renderer |
getRender()
Deprecated. As of version 1.5.2, replaced by getRenderer. |
Renderer |
getRenderer()
Deprecated. Use getVisualizationViewer.getRenderer() instead. |
VisualizationViewer |
getVisualizationViewer()
Deprecated. Returns the visualizationviewer that actually does the graph drawing. |
void |
hideStatus()
Deprecated. Hides the status bar at bottom left |
void |
removeAllFilters()
Deprecated. Use the PluggableRenderer's vertex and edge visibility predicates instead. See the release notes for version 1.6 for more information. |
void |
resetRenderer()
Deprecated. |
void |
restartLayout()
Deprecated. Use getVisualizationViewer().restart() instead. |
void |
setBackground(Color bg)
Deprecated. |
void |
setEdgeColor(Color c)
Deprecated. Modify this property via the renderer instead. |
void |
setEdgeColorFunction(EdgeColorFunction ecf)
Deprecated. Modify this property via the renderer instead. |
void |
setEdgeThickness(int i)
Deprecated. Modify this property via the renderer instead. |
void |
setEdgeThicknessFunction(EdgeThicknessFunction etf)
Deprecated. Modify this property via the renderer instead. |
void |
setGraphLayout(Layout l)
Deprecated. Use getVisualizationViewer.setGraphLayout(l) instead. |
void |
setRenderer(Renderer r)
Deprecated. Use getVisualizationViewer().setRenderer(r) instead. |
void |
setVertexBGColor(Color vertexColor)
Deprecated. Modify this property via the renderer instead. |
void |
setVertexColorFunction(VertexColorFunction vcf)
Deprecated. Modify this property via the renderer instead. |
void |
setVertexForegroundColor(Color vertexColor)
Deprecated. Modify this property via the renderer instead. |
void |
setVertexPickedColor(Color vertexColor)
Deprecated. Modify this property via the renderer instead. |
void |
showStatus()
Deprecated. Shows the status bar at bottom left |
void |
stop()
Deprecated. Use getVisualizationViewer().stop() instead. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected VisualizationViewer vv
protected Filter mainFilter
protected List allFilters
protected List sliders
protected JPanel toolbar
protected JLabel statusbar
Constructor Detail |
---|
public GraphDraw(Graph g)
g
- public GraphDraw(Layout layout)
layout
- Method Detail |
---|
public VisualizationViewer getVisualizationViewer()
public void addGraphMouseListener(GraphMouseListener gel)
gel
- public void showStatus()
public void hideStatus()
public void setBackground(Color bg)
setBackground
in class JComponent
public void callBack(String status)
callBack
in interface StatusCallback
public void setRenderer(Renderer r)
r
- the new rendererpublic void resetRenderer()
public Renderer getRender()
public Renderer getRenderer()
public void setEdgeColor(Color c)
VisualizationViewer
. Has no effect if
the renderer is not an instance of PluggableRenderer
.
c
- the new edge colorpublic void setEdgeColorFunction(EdgeColorFunction ecf)
VisualizationViewer
. Has no effect if
the renderer is not an instance of PluggableRenderer
.
ecf
- the new EdgeColorFunction
public void setEdgeThickness(int i)
VisualizationViewer
. Has no effect if
the renderer is not an instance of PluggableRenderer
.
i
- the thickness of the edgepublic void setEdgeThicknessFunction(EdgeThicknessFunction etf)
VisualizationViewer
. Has no effect if
the renderer is not an instance of PluggableRenderer
.
etf
- the new EdgeThicknessFunction
public void setVertexForegroundColor(Color vertexColor)
VisualizationViewer
. Has no effect if
the renderer is not an instance of PluggableRenderer
.
Resets the background (fill) and the picked color to Color.RED
and Color.ORANGE, respectively; to modify all of these at once,
access the renderer directly (see PickableVertexPaintFunction
).
vertexColor
- the new foreground (draw) color of the verticespublic void setVertexPickedColor(Color vertexColor)
VisualizationViewer
. Has no effect if
the renderer is not an instance of PluggableRenderer
.
Resets the background (fill) and the foreground (draw) color to Color.RED
and Color.BLACK, respectively; to modify all of these at once,
access the renderer directly (see PickableVertexPaintFunction
).
vertexColor
- the new picked color of the verticespublic void setVertexBGColor(Color vertexColor)
VisualizationViewer
. Has no effect if
the renderer is not an instance of PluggableRenderer
.
Resets the picked color and the foreground (draw) color to Color.ORANGE
and Color.BLACK, respectively; to modify all of these at once,
access the renderer directly (see PickableVertexPaintFunction
).
vertexColor
- the background color of the vertex that is to be setpublic void setVertexColorFunction(VertexColorFunction vcf)
VisualizationViewer
. Has no effect if
the renderer is not an instance of PluggableRenderer
.
vcf
- the new VertexColorFunction
public void setGraphLayout(Layout l)
l
.
l
- the new graph layout algorithmpublic void removeAllFilters()
public void addStaticFilter(Filter f)
f
- public JSlider addSlider(LevelFilter l, int low, int high, int defaultVal)
TODO: The situation may not be entirely right until applyFilter has been called.
l
- The Filter to use.low
- The low value on the filter: this will be the low point on
the sliderhigh
- The high value on the filter: this will be the high point on
the sliderdefaultVal
- The starting point on the filter
public void addTool(JComponent jc)
jc
- the tool--any JComponent--to be added to the Toolbar on the
left sidepublic Layout getGraphLayout()
getVisualizationViewer().getGraphLayout()
instead.
public void restartLayout()
getVisualizationViewer().restart()
instead.
public void stop()
getVisualizationViewer().stop()
instead.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |