/** * * @param cells */ public void setSelectionCells(Collection<Object> cells) { if (cells != null) { setSelectionCells(cells.toArray()); } }
/** * * @param cells */ public void setSelectionCells(Collection<Object> cells) { if (cells != null) { setSelectionCells(cells.toArray()); } }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { graph.setSelectionCells(graph.ungroupCells()); } }
/** * Selects the cells for the given event. */ public void selectCellsForEvent(Object[] cells, MouseEvent event) { if (isToggleEvent(event)) { graph.addSelectionCells(cells); } else { graph.setSelectionCells(cells); } }
/** * */ public void actionPerformed(ActionEvent e) { mxGraph graph = getGraph(e); if (graph != null) { graph.setSelectionCells(graph.ungroupCells()); } }
/** * Selects the cells for the given event. */ public void selectCellsForEvent(Object[] cells, MouseEvent event) { if (isToggleEvent(event)) { graph.addSelectionCells(cells); } else { graph.setSelectionCells(cells); } }
/** * Selects all children of the given parent cell or the children of the * default parent if no parent is specified. To select leaf vertices and/or * edges use <selectCells>. * * @param parent Optional <mxCell> whose children should be selected. * Default is <defaultParent>. */ public void selectAll(Object parent) { if (parent == null) { parent = getDefaultParent(); } Object[] children = mxGraphModel.getChildren(model, parent); if (children != null) { setSelectionCells(children); } }
/** * Selects all children of the given parent cell or the children of the * default parent if no parent is specified. To select leaf vertices and/or * edges use <selectCells>. * * @param parent Optional <mxCell> whose children should be selected. * Default is <defaultParent>. */ public void selectAll(Object parent) { if (parent == null) { parent = getDefaultParent(); } Object[] children = mxGraphModel.getChildren(model, parent); if (children != null) { setSelectionCells(children); } }
/** * Gets a drop target using getDropTarget and imports the cells using * mxGraph.splitEdge or mxGraphComponent.importCells depending on the * drop target and the return values of mxGraph.isSplitEnabled and * mxGraph.isSplitTarget. Selects and returns the cells that have been * imported. */ protected Object[] importCells(mxGraphComponent graphComponent, mxGraphTransferable gt, double dx, double dy) { Object target = getDropTarget(graphComponent, gt); mxGraph graph = graphComponent.getGraph(); Object[] cells = gt.getCells(); cells = graphComponent.getImportableCells(cells); if (graph.isSplitEnabled() && graph.isSplitTarget(target, cells)) { graph.splitEdge(target, cells, dx, dy); } else { cells = graphComponent.importCells(cells, dx, dy, target, location); graph.setSelectionCells(cells); } return cells; }
/** * Gets a drop target using getDropTarget and imports the cells using * mxGraph.splitEdge or mxGraphComponent.importCells depending on the * drop target and the return values of mxGraph.isSplitEnabled and * mxGraph.isSplitTarget. Selects and returns the cells that have been * imported. */ protected Object[] importCells(mxGraphComponent graphComponent, mxGraphTransferable gt, double dx, double dy) { Object target = getDropTarget(graphComponent, gt); mxGraph graph = graphComponent.getGraph(); Object[] cells = gt.getCells(); cells = graphComponent.getImportableCells(cells); if (graph.isSplitEnabled() && graph.isSplitTarget(target, cells)) { graph.splitEdge(target, cells, dx, dy); } else { cells = graphComponent.importCells(cells, dx, dy, target, location); graph.setSelectionCells(cells); } return cells; }
&& tmp.length == cells.length) graph.setSelectionCells(tmp);
&& tmp.length == cells.length) graph.setSelectionCells(tmp);
lGraph.setSelectionCells( result );
lGraph.setSelectionCells( result );
graph.setSelectionCells(result);
graph.setSelectionCells(result);
((BpmnGraph) graphComponent.getGraph()).refreshCellView((mxICell) cell); Object[] selcels = graphComponent.getGraph().getSelectionCells(); graphComponent.getGraph().setSelectionCells(selcels); ((BpmnGraph) graphComponent.getGraph()).refreshCellView((mxICell) cell); Object[] selcels = graphComponent.getGraph().getSelectionCells(); graphComponent.getGraph().setSelectionCells(selcels);