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

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

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

mxGraph.cellsOrdered介绍

[英]Moves the given cells to the front or back. This method fires mxEvent.CELLS_ORDERED while the transaction is in progress.
[中]将给定单元格向前或向后移动。此方法触发mxEvent。在事务处理过程中订购的单元格。

代码示例

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

  1. /**
  2. * Moves the given cells to the front or back. The change is carried out
  3. * using cellsOrdered. This method fires mxEvent.ORDER_CELLS while the
  4. * transaction is in progress.
  5. *
  6. * @param back Specifies if the cells should be moved to back.
  7. * @param cells Array of cells whose order should be changed. If null is
  8. * specified then the selection cells are used.
  9. */
  10. public Object[] orderCells(boolean back, Object[] cells)
  11. {
  12. if (cells == null)
  13. {
  14. cells = mxUtils.sortCells(getSelectionCells(), true);
  15. }
  16. model.beginUpdate();
  17. try
  18. {
  19. cellsOrdered(cells, back);
  20. fireEvent(new mxEventObject(mxEvent.ORDER_CELLS, "cells", cells,
  21. "back", back));
  22. }
  23. finally
  24. {
  25. model.endUpdate();
  26. }
  27. return cells;
  28. }

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

  1. /**
  2. * Moves the given cells to the front or back. The change is carried out
  3. * using cellsOrdered. This method fires mxEvent.ORDER_CELLS while the
  4. * transaction is in progress.
  5. *
  6. * @param back Specifies if the cells should be moved to back.
  7. * @param cells Array of cells whose order should be changed. If null is
  8. * specified then the selection cells are used.
  9. */
  10. public Object[] orderCells(boolean back, Object[] cells)
  11. {
  12. if (cells == null)
  13. {
  14. cells = mxUtils.sortCells(getSelectionCells(), true);
  15. }
  16. model.beginUpdate();
  17. try
  18. {
  19. cellsOrdered(cells, back);
  20. fireEvent(new mxEventObject(mxEvent.ORDER_CELLS, "cells", cells,
  21. "back", back));
  22. }
  23. finally
  24. {
  25. model.endUpdate();
  26. }
  27. return cells;
  28. }

相关文章

mxGraph类方法