Exemplo n.º 1
0
 public mxCell insertVertex(VertexValue value) {
   graph.getModel().beginUpdate();
   Object parent = graph.getDefaultParent();
   Object inserted;
   try {
     inserted = graph.insertVertex(parent, null, value, 0, 0, vertexWidth, vertexHeight);
     layout.execute(parent);
   } catch (Exception e) {
     e.printStackTrace();
     return null;
   } finally {
     graph.getModel().endUpdate();
   }
   return (mxCell) inserted;
 }
Exemplo n.º 2
0
 private void morphLayout() {
   panGraph.getModel().beginUpdate();
   layout.execute(graphParent);
   panGraph.getModel().endUpdate();
 }
Exemplo n.º 3
0
 public void executeLayout() {
   layout.execute(graph.getDefaultParent());
 }