Пример #1
0
 public void constructLinkTo(final VNode node2) {
   VConsole.log("linked");
   final String name =
       linkNode.getName() + "_to_" + node2.getName() + "_" + new Random().nextInt(1000);
   final VEdge edge = VEdge.createAnEdge(null, this, graph, name, linkNode, node2, style);
   client.updateVariable(
       paintableId, "edgeCreated", new String[] {linkNode.getName(), node2.getName(), name}, true);
   graph.addEdge(edge);
 }
Пример #2
0
 @Override
 public void onDoubleClick(final DoubleClickEvent event) {
   VConsole.log("onDoubleClick");
   final int x = event.getX();
   final int y = event.getY();
   final VNode node = VNode.createANode(x, y, this, graph, style);
   graph.addNode(node);
   client.updateVariable(paintableId, "createdANode", new Object[] {node.getName(), x, y}, true);
 }
Пример #3
0
 public void deleteNode(final VNode node, final boolean immediate) {
   client.updateVariable(paintableId, "removedNode", node.getName(), immediate);
   graph.removeNode(node);
 }