public class StdVisualizer extends java.lang.Object implements GraphVisualizer
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Object |
GUI_ADDED |
| Constructor and Description |
|---|
StdVisualizer(StdGraphLayouts layouts)
Creates an instance
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Iterable<java.lang.String> |
getLayoutKeys()
Enables iterating over all layout keys of the visualizer.
|
StdGraphLayouts |
getLayouts()
Returns all supported layouts
|
java.lang.String |
getVisualizerKey()
Returns the (unique) key of the visualizer.
|
<VertexType,EdgeType> |
visualizeGraph(GraphLibrary<VertexType,EdgeType> graph,
java.lang.String layoutKeyParams,
int initialWidth,
int initialHeight,
boolean enableManualUpdate,
boolean enableModification)
Visualizes the given graph.
|
public StdVisualizer(StdGraphLayouts layouts)
layouts - the collection of layouts. This class never modifies this list, it can therefore be used and
updated in other classespublic <VertexType,EdgeType> java.awt.Component visualizeGraph(GraphLibrary<VertexType,EdgeType> graph, java.lang.String layoutKeyParams, int initialWidth, int initialHeight, boolean enableManualUpdate, boolean enableModification) throws ArrangeException
GraphVisualizervisualizeGraph in interface GraphVisualizerVertexType - the type of the vertices of the graph.EdgeType - the type of the edges of the graph.graph - the graph to be visualized.layoutKeyParams - one string containing the arguments to manipulate the layout.initialWidth - the initial width of the output area.initialHeight - the initial height of the output area.enableManualUpdate - if true, then refreshing of the visualization must be done explicitly. Otherwise, the
visualizer will periodically refresh or refresh automatically whenever it is
necessary.enableModification - if true, then the user can modify the graph instance foor example by inserting and
deleting vertices.ArrangeException - if the vertices can not be arranged.public java.lang.String getVisualizerKey()
GraphVisualizergetVisualizerKey in interface GraphVisualizerpublic StdGraphLayouts getLayouts()
public java.lang.Iterable<java.lang.String> getLayoutKeys()
GraphVisualizergetLayoutKeys in interface GraphVisualizer