|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iu.cnets.klatsch.gui.Widget
edu.iu.cnets.klatsch.gui.WidgetGraph
public class WidgetGraph
The graph widget displays a visual layout of a graph.
Nested Class Summary | |
---|---|
(package private) class |
WidgetGraph.Location
|
(package private) class |
WidgetGraph.Velocity
|
Field Summary | |
---|---|
(package private) Graph |
g
the graph we're showing |
(package private) java.util.Map<java.lang.Object,WidgetGraph.Location> |
layout
the current layout for the graph |
Fields inherited from class edu.iu.cnets.klatsch.gui.Widget |
---|
parent, x1, x2, y1, y2 |
Constructor Summary | |
---|---|
WidgetGraph(KlatschGui parent,
Graph g,
java.lang.String layout)
Initializes a new graph widget. |
Method Summary | |
---|---|
protected void |
draw()
Draws the current graph. |
(package private) void |
layoutEnergy()
Updates the layout using the Kamada-Kawai energy-based algorithm (or a crappy approximation to it). |
(package private) void |
layoutRadial()
Positions the nodes radially. |
(package private) void |
layoutRandom()
Positions the nodes randomly. |
Methods inherited from class edu.iu.cnets.klatsch.gui.Widget |
---|
clear, in, keyPressed, keyReleased, mouseDragged, mousePressed, mouseReleased |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
Graph g
java.util.Map<java.lang.Object,WidgetGraph.Location> layout
Constructor Detail |
---|
public WidgetGraph(KlatschGui parent, Graph g, java.lang.String layout)
Method Detail |
---|
protected void draw()
draw
in class Widget
void layoutEnergy()
void layoutRadial()
void layoutRandom()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |