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

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

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

mxGraph.getAllEdges介绍

[英]Returns all edges connected to the given cells or their descendants.
[中]返回连接到给定单元格或其子体的所有边。

代码示例

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

  1. /**
  2. * Returns an array with the given cells and all edges that are connected
  3. * to a cell or one of its descendants.
  4. */
  5. public Object[] addAllEdges(Object[] cells)
  6. {
  7. List<Object> allCells = new ArrayList<Object>(cells.length);
  8. allCells.addAll(Arrays.asList(cells));
  9. allCells.addAll(Arrays.asList(getAllEdges(cells)));
  10. return allCells.toArray();
  11. }

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

  1. /**
  2. * Returns an array with the given cells and all edges that are connected
  3. * to a cell or one of its descendants.
  4. */
  5. public Object[] addAllEdges(Object[] cells)
  6. {
  7. List<Object> allCells = new ArrayList<Object>(cells.length);
  8. allCells.addAll(Arrays.asList(cells));
  9. allCells.addAll(Arrays.asList(getAllEdges(cells)));
  10. return allCells.toArray();
  11. }

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

  1. /**
  2. * Returns all edges connected to the given cells or their descendants.
  3. */
  4. public Object[] getAllEdges(Object[] cells)
  5. {
  6. List<Object> edges = new ArrayList<Object>();
  7. if (cells != null)
  8. {
  9. for (int i = 0; i < cells.length; i++)
  10. {
  11. int edgeCount = model.getEdgeCount(cells[i]);
  12. for (int j = 0; j < edgeCount; j++)
  13. {
  14. edges.add(model.getEdgeAt(cells[i], j));
  15. }
  16. // Recurses
  17. Object[] children = mxGraphModel.getChildren(model, cells[i]);
  18. edges.addAll(Arrays.asList(getAllEdges(children)));
  19. }
  20. }
  21. return edges.toArray();
  22. }

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

  1. /**
  2. * Returns all edges connected to the given cells or their descendants.
  3. */
  4. public Object[] getAllEdges(Object[] cells)
  5. {
  6. List<Object> edges = new ArrayList<Object>();
  7. if (cells != null)
  8. {
  9. for (int i = 0; i < cells.length; i++)
  10. {
  11. int edgeCount = model.getEdgeCount(cells[i]);
  12. for (int j = 0; j < edgeCount; j++)
  13. {
  14. edges.add(model.getEdgeAt(cells[i], j));
  15. }
  16. // Recurses
  17. Object[] children = mxGraphModel.getChildren(model, cells[i]);
  18. edges.addAll(Arrays.asList(getAllEdges(children)));
  19. }
  20. }
  21. return edges.toArray();
  22. }

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

  1. Object[] edges = graph.getAllEdges(new Object[] { cell });

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

  1. Object[] edges = graph.getAllEdges(new Object[] { cell });

相关文章

mxGraph类方法