public void execute(Object parent) { mxGraphView view = graph.getView(); mxIGraphModel model = graph.getModel(); // Gets all vertices and edges inside the parent List<Object> edges = new ArrayList<Object>(); List<Object> vertices = new ArrayList<Object>(); int childCount = model.getChildCount(parent); for (int i = 0; i < childCount; i++) { Object cell = model.getChildAt(parent, i); mxCellState state = view.getState(cell); if (state != null) { if (!isVertexIgnored(cell)) { vertices.add(state); } else if (!isEdgeIgnored(cell)) { edges.add(state); } } } placeLabels(vertices.toArray(), edges.toArray()); }
final mxOrthogonalLayout mxOrthogonalLayout = new mxOrthogonalLayout(graph); mxOrthogonalLayout.execute(parent); final mxEdgeLabelLayout labelLayout = new mxEdgeLabelLayout(graph); labelLayout.execute(parent); graph.getModel().endUpdate();
avoid(edge, vertex);
final mxOrthogonalLayout mxOrthogonalLayout = new mxOrthogonalLayout(graph); mxOrthogonalLayout.execute(parent); final mxEdgeLabelLayout labelLayout = new mxEdgeLabelLayout(graph); labelLayout.execute(parent); graph.getModel().endUpdate();
avoid(edge, vertex);
final mxOrthogonalLayout mxOrthogonalLayout = new mxOrthogonalLayout(graph); mxOrthogonalLayout.execute(parent); final mxEdgeLabelLayout labelLayout = new mxEdgeLabelLayout(graph); labelLayout.execute(parent); graph.getModel().endUpdate();
public void execute(Object parent) { mxGraphView view = graph.getView(); mxIGraphModel model = graph.getModel(); // Gets all vertices and edges inside the parent List<Object> edges = new ArrayList<Object>(); List<Object> vertices = new ArrayList<Object>(); int childCount = model.getChildCount(parent); for (int i = 0; i < childCount; i++) { Object cell = model.getChildAt(parent, i); mxCellState state = view.getState(cell); if (state != null) { if (!isVertexIgnored(cell)) { vertices.add(state); } else if (!isEdgeIgnored(cell)) { edges.add(state); } } } placeLabels(vertices.toArray(), edges.toArray()); }