|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.wilmascope.control.GraphControl.GraphElementFacade org.wilmascope.control.GraphControl.Node org.wilmascope.control.GraphControl.Cluster
public class GraphControl.Cluster
the interface for clusters which are collections of nodes, note that a
cluster is also a node so you can add a cluster as a member to a cluster
using the addNode(GraphControl.Node)
method
Method Summary | |
---|---|
void |
add(GraphControl.GraphElementFacade e)
|
GraphControl.Cluster |
addCluster()
Create a new cluster and add it as a member of this cluster |
GraphControl.Cluster |
addCluster(java.lang.String viewType)
Create a new cluster and add it as a member of this cluster |
GraphControl.Cluster |
addCluster(java.util.Vector nodeFacades)
Create a new cluster and add it as a member of this cluster |
GraphControl.Edge |
addEdge(GraphControl.Node start,
GraphControl.Node end)
Add the new edge of the default type to the cluster |
GraphControl.Edge |
addEdge(GraphControl.Node start,
GraphControl.Node end,
EdgeView view)
Create a new edge between two nodes and add it to the cluster |
GraphControl.Edge |
addEdge(GraphControl.Node start,
GraphControl.Node end,
java.lang.String edgeType)
Add a new edge |
GraphControl.Edge |
addEdge(GraphControl.Node start,
GraphControl.Node end,
java.lang.String edgeType,
float radius)
|
GraphControl.Node |
addNode()
|
void |
addNode(GraphControl.Node n)
Add a pre-existing node to the cluster |
GraphControl.Node |
addNode(NodeView view)
create a new node and add it to the cluster |
GraphControl.Node |
addNode(java.lang.String nodeType)
|
void |
childrenPickable()
makes children pickable... |
void |
collapse()
|
void |
deleteAll()
|
void |
draw()
Cause this cluster and it's children to be redrawn |
void |
expand()
|
void |
freeze()
halts layout for this cluster |
Cluster |
getCluster()
|
GraphControl.Edge[] |
getEdges()
|
LayoutEngine |
getLayoutEngine()
|
GraphControl.Node[] |
getNodes()
|
boolean |
isExpanded()
|
void |
makeJustChildrenPickable()
make just the children of this cluster pickable, ie all other graph elements are not pickable, used for removing things from the cluster |
void |
makeNonChildrenPickable()
make just the graph elements other than this cluster pickable, used for adding things to the cluster. |
void |
moveToParent(GraphControl.Node n)
move a node out of this cluster and into the parent cluster |
void |
setAllPickable(boolean pickable)
kind of dodgy all access method for controlling the pick status of all nodes and edges in the graph, reverts clusters to their default colour (to indicate they are pickable again |
void |
setBalancedEventClient(BalancedEventClient client)
set the callback client for when the system reaches a balanced state |
void |
setLayoutEngine(LayoutEngine layoutEngine)
|
void |
showHiddenChildren()
|
void |
unfreeze()
Triggers the layout engine for this cluster and it's children |
Methods inherited from class org.wilmascope.control.GraphControl.Node |
---|
getDegree, getMass, getNode, getPosition, getProperties, getRadius, moveToCanvasPos, removeProperty, setMass, setPosition, setProperties, setProperty, setRadius, setTransparency, setView |
Methods inherited from class org.wilmascope.control.GraphControl.GraphElementFacade |
---|
addPickingClient, defaultColour, delete, getColour, getDefaultColour, getLabel, getUserData, getView, getViewType, hide, highlightColour, initView, isDefaultColour, setColour, setColour, setLabel, setLabel, setPickable, setUserData, show |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setBalancedEventClient(BalancedEventClient client)
client
- the class whose
BalancedEventClient.callback()
method will be called when the graph is balancedpublic void deleteAll()
public LayoutEngine getLayoutEngine()
public void setLayoutEngine(LayoutEngine layoutEngine)
public void addNode(GraphControl.Node n)
public void add(GraphControl.GraphElementFacade e)
public GraphControl.Node addNode()
public GraphControl.Node addNode(java.lang.String nodeType)
public GraphControl.Node addNode(NodeView view)
public GraphControl.Edge addEdge(GraphControl.Node start, GraphControl.Node end, EdgeView view)
start
- the start nodeend
- the end nodeview
- the view to use for the edge
public GraphControl.Edge addEdge(GraphControl.Node start, GraphControl.Node end, java.lang.String edgeType)
start
- the start nodeend
- the end nodeedgeType
- the type of edge to add, from the ViewManager
public GraphControl.Edge addEdge(GraphControl.Node start, GraphControl.Node end, java.lang.String edgeType, float radius)
public GraphControl.Edge addEdge(GraphControl.Node start, GraphControl.Node end)
start
- the start nodeend
- the end node
public GraphControl.Cluster addCluster()
public GraphControl.Cluster addCluster(java.lang.String viewType)
public GraphControl.Cluster addCluster(java.util.Vector nodeFacades)
public void moveToParent(GraphControl.Node n)
n
- node to movepublic void expand()
public void collapse()
public boolean isExpanded()
public void makeJustChildrenPickable()
public void makeNonChildrenPickable()
public void childrenPickable()
public void setAllPickable(boolean pickable)
public Cluster getCluster()
public void showHiddenChildren()
public GraphControl.Node[] getNodes()
public GraphControl.Edge[] getEdges()
public void freeze()
public void unfreeze()
public void draw()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |