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

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

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

mxGraph.cellSizeUpdated介绍

[英]Updates the size of the given cell in the model using getPreferredSizeForCell to get the new size.
[中]使用getPreferredSizeForCell更新模型中给定单元格的大小,以获得新大小。

代码示例

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

  1. /**
  2. * Updates the size of the given cell in the model using
  3. * getPreferredSizeForCell to get the new size. This function
  4. * fires mxEvent.UPDATE_CELL_SIZE.
  5. *
  6. * @param cell Cell for which the size should be changed.
  7. */
  8. public Object updateCellSize(Object cell, boolean ignoreChildren)
  9. {
  10. model.beginUpdate();
  11. try
  12. {
  13. cellSizeUpdated(cell, ignoreChildren);
  14. fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE, "cell", cell,
  15. "ignoreChildren", ignoreChildren));
  16. }
  17. finally
  18. {
  19. model.endUpdate();
  20. }
  21. return cell;
  22. }

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

  1. /**
  2. * Updates the size of the given cell in the model using
  3. * getPreferredSizeForCell to get the new size. This function
  4. * fires mxEvent.UPDATE_CELL_SIZE.
  5. *
  6. * @param cell Cell for which the size should be changed.
  7. */
  8. public Object updateCellSize(Object cell, boolean ignoreChildren)
  9. {
  10. model.beginUpdate();
  11. try
  12. {
  13. cellSizeUpdated(cell, ignoreChildren);
  14. fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE, "cell", cell,
  15. "ignoreChildren", ignoreChildren));
  16. }
  17. finally
  18. {
  19. model.endUpdate();
  20. }
  21. return cell;
  22. }

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

  1. /**
  2. * Sets the new label for a cell. If autoSize is true then
  3. * <cellSizeUpdated> will be called.
  4. *
  5. * @param cell Cell whose label should be changed.
  6. * @param value New label to be assigned.
  7. * @param autoSize Specifies if cellSizeUpdated should be called.
  8. */
  9. public void cellLabelChanged(Object cell, Object value, boolean autoSize)
  10. {
  11. model.beginUpdate();
  12. try
  13. {
  14. getModel().setValue(cell, value);
  15. if (autoSize)
  16. {
  17. cellSizeUpdated(cell, false);
  18. }
  19. }
  20. finally
  21. {
  22. model.endUpdate();
  23. }
  24. }

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

  1. /**
  2. * Sets the new label for a cell. If autoSize is true then
  3. * <cellSizeUpdated> will be called.
  4. *
  5. * @param cell Cell whose label should be changed.
  6. * @param value New label to be assigned.
  7. * @param autoSize Specifies if cellSizeUpdated should be called.
  8. */
  9. public void cellLabelChanged(Object cell, Object value, boolean autoSize)
  10. {
  11. model.beginUpdate();
  12. try
  13. {
  14. getModel().setValue(cell, value);
  15. if (autoSize)
  16. {
  17. cellSizeUpdated(cell, false);
  18. }
  19. }
  20. finally
  21. {
  22. model.endUpdate();
  23. }
  24. }

相关文章

mxGraph类方法