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

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

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

mxGraph.cellsAdded介绍

[英]Adds the specified cells to the given parent. This method fires mxEvent.CELLS_ADDED while the transaction is in progress.
[中]将指定的单元格添加到给定的父单元格。此方法触发mxEvent。在事务处理过程中添加的单元格。

代码示例

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

  1. /**
  2. * Adds the specified cells to the given parent. This method fires
  3. * mxEvent.CELLS_ADDED while the transaction is in progress.
  4. */
  5. public void cellsAdded(Object[] cells, Object parent, Integer index,
  6. Object source, Object target, boolean absolute)
  7. {
  8. cellsAdded(cells, parent, index, source, target, absolute, true);
  9. }

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

  1. /**
  2. * Adds the specified cells to the given parent. This method fires
  3. * mxEvent.CELLS_ADDED while the transaction is in progress.
  4. */
  5. public void cellsAdded(Object[] cells, Object parent, Integer index,
  6. Object source, Object target, boolean absolute)
  7. {
  8. cellsAdded(cells, parent, index, source, target, absolute, true);
  9. }

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

  1. int index = model.getChildCount(parent);
  2. cellsAdded(children, parent, index, null, null, true);
  3. result.addAll(Arrays.asList(children));

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

  1. int index = model.getChildCount(parent);
  2. cellsAdded(children, parent, index, null, null, true);
  3. result.addAll(Arrays.asList(children));

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

  1. cellsAdded(cells, parent, model.getChildCount(parent), null, null,
  2. true);
  3. cellsAdded(new Object[] { newEdge }, parent,
  4. model.getChildCount(parent), source, cells[0], false);
  5. cellConnected(edge, cells[0], true, null);

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

  1. cellsAdded(cells, parent, model.getChildCount(parent), null, null,
  2. true);
  3. cellsAdded(new Object[] { newEdge }, parent,
  4. model.getChildCount(parent), source, cells[0], false);
  5. cellConnected(edge, cells[0], true, null);

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

  1. /**
  2. * Removes the specified cells from their parents and adds them to the
  3. * default parent.
  4. *
  5. * @param cells Array of cells to be removed from their parents.
  6. * @return Returns the cells that were removed from their parents.
  7. */
  8. public Object[] removeCellsFromParent(Object[] cells)
  9. {
  10. if (cells == null)
  11. {
  12. cells = getSelectionCells();
  13. }
  14. model.beginUpdate();
  15. try
  16. {
  17. Object parent = getDefaultParent();
  18. int index = model.getChildCount(parent);
  19. cellsAdded(cells, parent, index, null, null, true);
  20. fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,
  21. "cells", cells));
  22. }
  23. finally
  24. {
  25. model.endUpdate();
  26. }
  27. return cells;
  28. }

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

  1. try
  2. cellsAdded(cells, parent, index, source, target, false, true);
  3. fireEvent(new mxEventObject(mxEvent.ADD_CELLS, "cells", cells,
  4. "parent", parent, "index", index, "source", source,

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

  1. try
  2. cellsAdded(cells, parent, index, source, target, false, true);
  3. fireEvent(new mxEventObject(mxEvent.ADD_CELLS, "cells", cells,
  4. "parent", parent, "index", index, "source", source,

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

  1. /**
  2. * Removes the specified cells from their parents and adds them to the
  3. * default parent.
  4. *
  5. * @param cells Array of cells to be removed from their parents.
  6. * @return Returns the cells that were removed from their parents.
  7. */
  8. public Object[] removeCellsFromParent(Object[] cells)
  9. {
  10. if (cells == null)
  11. {
  12. cells = getSelectionCells();
  13. }
  14. model.beginUpdate();
  15. try
  16. {
  17. Object parent = getDefaultParent();
  18. int index = model.getChildCount(parent);
  19. cellsAdded(cells, parent, index, null, null, true);
  20. fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,
  21. "cells", cells));
  22. }
  23. finally
  24. {
  25. model.endUpdate();
  26. }
  27. return cells;
  28. }

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

  1. cellsAdded(cells, group, index, null, null, false);
  2. cellsMoved(cells, -bounds.getX(), -bounds.getY(), false, true);
  3. cellsAdded(new Object[] { group }, parent, index, null, null,
  4. false, false);
  5. cellsResized(new Object[] { group },

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

  1. cellsAdded(cells, group, index, null, null, false);
  2. cellsMoved(cells, -bounds.getX(), -bounds.getY(), false, true);
  3. cellsAdded(new Object[] { group }, parent, index, null, null,
  4. false, false);
  5. cellsResized(new Object[] { group },

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

  1. cellsAdded(cells, target, index, null, null, true);

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

  1. cellsAdded(cells, target, index, null, null, true);

相关文章

mxGraph类方法