com.mxgraph.view.mxGraph.setSelectionCells()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(92)

本文整理了Java中com.mxgraph.view.mxGraph.setSelectionCells()方法的一些代码示例,展示了mxGraph.setSelectionCells()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.setSelectionCells()方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:setSelectionCells

mxGraph.setSelectionCells介绍

暂无

代码示例

代码示例来源:origin: org.tinyjee.jgraphx/jgraphx

  1. /**
  2. *
  3. * @param cells
  4. */
  5. public void setSelectionCells(Collection<Object> cells)
  6. {
  7. if (cells != null)
  8. {
  9. setSelectionCells(cells.toArray());
  10. }
  11. }

代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx

  1. /**
  2. *
  3. * @param cells
  4. */
  5. public void setSelectionCells(Collection<Object> cells)
  6. {
  7. if (cells != null)
  8. {
  9. setSelectionCells(cells.toArray());
  10. }
  11. }

代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx

  1. /**
  2. *
  3. */
  4. public void actionPerformed(ActionEvent e)
  5. {
  6. mxGraph graph = getGraph(e);
  7. if (graph != null)
  8. {
  9. graph.setSelectionCells(graph.ungroupCells());
  10. }
  11. }

代码示例来源:origin: org.tinyjee.jgraphx/jgraphx

  1. /**
  2. * Selects the cells for the given event.
  3. */
  4. public void selectCellsForEvent(Object[] cells, MouseEvent event)
  5. {
  6. if (isToggleEvent(event))
  7. {
  8. graph.addSelectionCells(cells);
  9. }
  10. else
  11. {
  12. graph.setSelectionCells(cells);
  13. }
  14. }

代码示例来源:origin: org.tinyjee.jgraphx/jgraphx

  1. /**
  2. *
  3. */
  4. public void actionPerformed(ActionEvent e)
  5. {
  6. mxGraph graph = getGraph(e);
  7. if (graph != null)
  8. {
  9. graph.setSelectionCells(graph.ungroupCells());
  10. }
  11. }

代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx

  1. /**
  2. * Selects the cells for the given event.
  3. */
  4. public void selectCellsForEvent(Object[] cells, MouseEvent event)
  5. {
  6. if (isToggleEvent(event))
  7. {
  8. graph.addSelectionCells(cells);
  9. }
  10. else
  11. {
  12. graph.setSelectionCells(cells);
  13. }
  14. }

代码示例来源:origin: org.tinyjee.jgraphx/jgraphx

  1. /**
  2. * Selects all children of the given parent cell or the children of the
  3. * default parent if no parent is specified. To select leaf vertices and/or
  4. * edges use <selectCells>.
  5. *
  6. * @param parent Optional <mxCell> whose children should be selected.
  7. * Default is <defaultParent>.
  8. */
  9. public void selectAll(Object parent)
  10. {
  11. if (parent == null)
  12. {
  13. parent = getDefaultParent();
  14. }
  15. Object[] children = mxGraphModel.getChildren(model, parent);
  16. if (children != null)
  17. {
  18. setSelectionCells(children);
  19. }
  20. }

代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx

  1. /**
  2. * Selects all children of the given parent cell or the children of the
  3. * default parent if no parent is specified. To select leaf vertices and/or
  4. * edges use <selectCells>.
  5. *
  6. * @param parent Optional <mxCell> whose children should be selected.
  7. * Default is <defaultParent>.
  8. */
  9. public void selectAll(Object parent)
  10. {
  11. if (parent == null)
  12. {
  13. parent = getDefaultParent();
  14. }
  15. Object[] children = mxGraphModel.getChildren(model, parent);
  16. if (children != null)
  17. {
  18. setSelectionCells(children);
  19. }
  20. }

代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx

  1. setSelectionCells(cells);

代码示例来源:origin: org.tinyjee.jgraphx/jgraphx

  1. setSelectionCells(cells);

代码示例来源:origin: org.tinyjee.jgraphx/jgraphx

  1. /**
  2. * Gets a drop target using getDropTarget and imports the cells using
  3. * mxGraph.splitEdge or mxGraphComponent.importCells depending on the
  4. * drop target and the return values of mxGraph.isSplitEnabled and
  5. * mxGraph.isSplitTarget. Selects and returns the cells that have been
  6. * imported.
  7. */
  8. protected Object[] importCells(mxGraphComponent graphComponent,
  9. mxGraphTransferable gt, double dx, double dy)
  10. {
  11. Object target = getDropTarget(graphComponent, gt);
  12. mxGraph graph = graphComponent.getGraph();
  13. Object[] cells = gt.getCells();
  14. cells = graphComponent.getImportableCells(cells);
  15. if (graph.isSplitEnabled() && graph.isSplitTarget(target, cells))
  16. {
  17. graph.splitEdge(target, cells, dx, dy);
  18. }
  19. else
  20. {
  21. cells = graphComponent.importCells(cells, dx, dy, target, location);
  22. graph.setSelectionCells(cells);
  23. }
  24. return cells;
  25. }

代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx

  1. /**
  2. * Gets a drop target using getDropTarget and imports the cells using
  3. * mxGraph.splitEdge or mxGraphComponent.importCells depending on the
  4. * drop target and the return values of mxGraph.isSplitEnabled and
  5. * mxGraph.isSplitTarget. Selects and returns the cells that have been
  6. * imported.
  7. */
  8. protected Object[] importCells(mxGraphComponent graphComponent,
  9. mxGraphTransferable gt, double dx, double dy)
  10. {
  11. Object target = getDropTarget(graphComponent, gt);
  12. mxGraph graph = graphComponent.getGraph();
  13. Object[] cells = gt.getCells();
  14. cells = graphComponent.getImportableCells(cells);
  15. if (graph.isSplitEnabled() && graph.isSplitTarget(target, cells))
  16. {
  17. graph.splitEdge(target, cells, dx, dy);
  18. }
  19. else
  20. {
  21. cells = graphComponent.importCells(cells, dx, dy, target, location);
  22. graph.setSelectionCells(cells);
  23. }
  24. return cells;
  25. }

代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx

  1. && tmp.length == cells.length)
  2. graph.setSelectionCells(tmp);

代码示例来源:origin: org.tinyjee.jgraphx/jgraphx

  1. && tmp.length == cells.length)
  2. graph.setSelectionCells(tmp);

代码示例来源:origin: sc.fiji/TrackMate_

  1. lGraph.setSelectionCells( result );

代码示例来源:origin: fiji/TrackMate

  1. lGraph.setSelectionCells( result );

代码示例来源:origin: org.tinyjee.jgraphx/jgraphx

  1. graph.setSelectionCells(result);

代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx

  1. graph.setSelectionCells(result);

代码示例来源:origin: org.activecomponents.jadex/jadex-editor-bpmn

  1. ((BpmnGraph) graphComponent.getGraph()).refreshCellView((mxICell) cell);
  2. Object[] selcels = graphComponent.getGraph().getSelectionCells();
  3. graphComponent.getGraph().setSelectionCells(selcels);
  4. ((BpmnGraph) graphComponent.getGraph()).refreshCellView((mxICell) cell);
  5. Object[] selcels = graphComponent.getGraph().getSelectionCells();
  6. graphComponent.getGraph().setSelectionCells(selcels);

相关文章

mxGraph类方法