예제 #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;
 }
예제 #2
0
 private void morphLayout() {
   panGraph.getModel().beginUpdate();
   layout.execute(graphParent);
   panGraph.getModel().endUpdate();
 }
예제 #3
0
 public void executeLayout() {
   layout.execute(graph.getDefaultParent());
 }