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

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

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

mxGraph.moveCells介绍

[英]Moves the cells by the given amount. This is a shortcut method.
[中]按给定的数量移动单元格。这是一种快捷方式。

代码示例

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

  1. /**
  2. * Moves the cells by the given amount. This is a shortcut method.
  3. */
  4. public Object[] moveCells(Object[] cells, double dx, double dy)
  5. {
  6. return moveCells(cells, dx, dy, false);
  7. }

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

  1. /**
  2. * Clones and inserts the given cells into the graph using the move method
  3. * and returns the inserted cells. This shortcut is used if cells are
  4. * inserted via datatransfer.
  5. */
  6. public Object[] importCells(Object[] cells, double dx, double dy,
  7. Object target, Point location)
  8. {
  9. return graph.moveCells(cells, dx, dy, true, target, location);
  10. }

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

  1. /**
  2. * Moves the cells by the given amount. This is a shortcut method.
  3. */
  4. public Object[] moveCells(Object[] cells, double dx, double dy)
  5. {
  6. return moveCells(cells, dx, dy, false);
  7. }

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

  1. /**
  2. * Moves or clones the cells and moves the cells or clones by the given
  3. * amount. This is a shortcut method.
  4. */
  5. public Object[] moveCells(Object[] cells, double dx, double dy,
  6. boolean clone)
  7. {
  8. return moveCells(cells, dx, dy, clone, null, null);
  9. }

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

  1. /**
  2. * Moves or clones the cells and moves the cells or clones by the given
  3. * amount. This is a shortcut method.
  4. */
  5. public Object[] moveCells(Object[] cells, double dx, double dy,
  6. boolean clone)
  7. {
  8. return moveCells(cells, dx, dy, clone, null, null);
  9. }

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

  1. /**
  2. * Clones and inserts the given cells into the graph using the move method
  3. * and returns the inserted cells. This shortcut is used if cells are
  4. * inserted via datatransfer.
  5. */
  6. public Object[] importCells(Object[] cells, double dx, double dy,
  7. Object target, Point location)
  8. {
  9. return graph.moveCells(cells, dx, dy, true, target, location);
  10. }

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

  1. graph.moveCells(vertexArray, dx, dy);

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

  1. graph.moveCells(vertexArray, dx, dy);

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

  1. /**
  2. *
  3. */
  4. public Object[] stop(boolean commit, MouseEvent e, double dx, double dy,
  5. boolean clone, Object target)
  6. {
  7. Object[] cells = movingCells;
  8. reset();
  9. mxGraph graph = graphComponent.getGraph();
  10. graph.getModel().beginUpdate();
  11. try
  12. {
  13. if (commit)
  14. {
  15. double s = graph.getView().getScale();
  16. cells = graph.moveCells(cells, dx / s, dy / s, clone, target,
  17. e.getPoint());
  18. }
  19. fireEvent(new mxEventObject(mxEvent.STOP, "event", e, "commit",
  20. commit));
  21. }
  22. finally
  23. {
  24. graph.getModel().endUpdate();
  25. }
  26. return cells;
  27. }

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

  1. /**
  2. *
  3. */
  4. public Object[] stop(boolean commit, MouseEvent e, double dx, double dy,
  5. boolean clone, Object target)
  6. {
  7. Object[] cells = movingCells;
  8. reset();
  9. mxGraph graph = graphComponent.getGraph();
  10. graph.getModel().beginUpdate();
  11. try
  12. {
  13. if (commit)
  14. {
  15. double s = graph.getView().getScale();
  16. cells = graph.moveCells(cells, dx / s, dy / s, clone, target,
  17. e.getPoint());
  18. }
  19. fireEvent(new mxEventObject(mxEvent.STOP, "event", e, "commit",
  20. commit));
  21. }
  22. finally
  23. {
  24. graph.getModel().endUpdate();
  25. }
  26. return cells;
  27. }

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

  1. Object[] tmp = graph.moveCells(cells, dx, dy, clone, target,
  2. e.getPoint());

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

  1. Object[] tmp = graph.moveCells(cells, dx, dy, clone, target,
  2. e.getPoint());

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

  1. geometry.setHeight(bounds.getHeight() + 2 * border + top);
  2. graph.getModel().setGeometry(group, geometry);
  3. graph.moveCells(children, border + left - bounds.getX(),
  4. border + top - bounds.getY());

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

  1. geometry.setHeight(bounds.getHeight() + 2 * border + top);
  2. graph.getModel().setGeometry(group, geometry);
  3. graph.moveCells(children, border + left - bounds.getX(),
  4. border + top - bounds.getY());

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

  1. moveCells(children,
  2. -childBounds.getX() + size.getWidth()
  3. + border, -childBounds.getY()

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

  1. moveCells(children,
  2. -childBounds.getX() + size.getWidth()
  3. + border, -childBounds.getY()

相关文章

mxGraph类方法