/** * */ protected void cellsMoved(Object[] cells, Point location) { if (cells != null && location != null) { mxIGraphModel model = getGraph().getModel(); // Checks if a layout exists to take care of the moving for (int i = 0; i < cells.length; i++) { mxIGraphLayout layout = getLayout(model.getParent(cells[i])); if (layout != null) { layout.moveCell(cells[i], location.x, location.y); } } } }
/** * */ protected void cellsMoved(Object[] cells, Point location) { if (cells != null && location != null) { mxIGraphModel model = getGraph().getModel(); // Checks if a layout exists to take care of the moving for (int i = 0; i < cells.length; i++) { mxIGraphLayout layout = getLayout(model.getParent(cells[i])); if (layout != null) { layout.moveCell(cells[i], location.x, location.y); } } } }
/** * */ protected void layoutCells(Object[] cells) { if (cells.length > 0) { // Invokes the layouts while removing duplicates mxIGraphModel model = getGraph().getModel(); model.beginUpdate(); try { for (int i = 0; i < cells.length; i++) { if (cells[i] != model.getRoot()) { executeLayout(getLayout(cells[i]), cells[i]); } } fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS, "cells", cells)); } finally { model.endUpdate(); } } }
/** * */ protected void layoutCells(Object[] cells) { if (cells.length > 0) { // Invokes the layouts while removing duplicates mxIGraphModel model = getGraph().getModel(); model.beginUpdate(); try { for (int i = 0; i < cells.length; i++) { if (cells[i] != model.getRoot()) { executeLayout(getLayout(cells[i]), cells[i]); } } fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS, "cells", cells)); } finally { model.endUpdate(); } } }