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

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

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

mxGraph.updateCellSize介绍

[英]Updates the size of the given cell in the model using getPreferredSizeForCell to get the new size. This function fires beforeUpdateSize and afterUpdateSize events.
[中]使用getPreferredSizeForCell更新模型中给定单元格的大小,以获得新大小。此函数激发beforeUpdateSize和afterUpdateSize事件。

代码示例

代码示例来源: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 beforeUpdateSize and afterUpdateSize events.
  5. *
  6. * @param cell <mxCell> for which the size should be changed.
  7. */
  8. public Object updateCellSize(Object cell)
  9. {
  10. return updateCellSize(cell, false);
  11. }

代码示例来源: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 beforeUpdateSize and afterUpdateSize events.
  5. *
  6. * @param cell <mxCell> for which the size should be changed.
  7. */
  8. public Object updateCellSize(Object cell)
  9. {
  10. return updateCellSize(cell, false);
  11. }

代码示例来源:origin: arquillian/arquillian-cube

  1. private void updateGraph(mxGraph graph, Object parent, Map<String, Object> insertedVertex, String containerId, CubeContainer cubeContainer) {
  2. if (insertedVertex.containsKey(containerId)) {
  3. // container is already added, probably because a direct link from another container
  4. // now we need to add direct links of this one that before were transitive
  5. Object currentContainer = insertedVertex.get(containerId);
  6. createDirectLinks(graph, parent, insertedVertex, cubeContainer, currentContainer);
  7. } else {
  8. // create new cube and possible direct link (not transitive ones)
  9. Object currentContainer = graph.insertVertex(parent, null, containerId, 0, 0, 80, 30);
  10. graph.updateCellSize(currentContainer);
  11. insertedVertex.put(containerId, currentContainer);
  12. createDirectLinks(graph, parent, insertedVertex, cubeContainer, currentContainer);
  13. }
  14. }

代码示例来源:origin: arquillian/arquillian-cube

  1. private void createDirectLinks(mxGraph graph, Object parent, Map<String, Object> insertedVertex, CubeContainer cubeContainer, Object currentContainer) {
  2. // create relation to all direct links
  3. if (cubeContainer.getLinks() != null) {
  4. for (Link link : cubeContainer.getLinks()) {
  5. final String linkId = link.getName();
  6. Object linkContainer = null;
  7. if (insertedVertex.containsKey(linkId)) {
  8. linkContainer = insertedVertex.get(linkId);
  9. } else {
  10. linkContainer = graph.insertVertex(parent, null, linkId, 0, 0, 80, 30);
  11. }
  12. graph.updateCellSize(currentContainer);
  13. graph.insertEdge(parent, null, link.getAlias(), currentContainer, linkContainer);
  14. insertedVertex.put(linkId, linkContainer);
  15. }
  16. }
  17. }

代码示例来源:origin: arquillian/arquillian-cube

  1. graph.setCellStyles(mxConstants.STYLE_FILLCOLOR, "#00FF00", new Object[]{nwName});
  2. graph.updateCellSize(nwName);
  3. graph.insertEdge(parent, null, nw, containerName, nwName);
  4. insertedVertex.put(nw, nwName);

代码示例来源:origin: org.opensingular/server-commons

  1. private static Object insertVertex(mxGraph graph, MTask<?> task) {
  2. final Object v = graph.insertVertex(graph.getDefaultParent(), task.getAbbreviation(), formatarNome(task.getName()),
  3. 20, 20, 20, 20);
  4. graph.updateCellSize(v);
  5. if (task.isWait()) {
  6. setStyle(v, "TIMER");
  7. } else if (task.isEnd()) {
  8. setStyle(v, "END");
  9. } else if (task.isJava()) {
  10. if (task.getName().startsWith("Notificar")) {
  11. setStyle(v, "MESSAGE");
  12. } else {
  13. setStyle(v, "JAVA");
  14. }
  15. }
  16. return v;
  17. }

代码示例来源:origin: org.opensingular/singular-requirement-commons

  1. private static Object insertVertex(mxGraph graph, STask<?> task) {
  2. final Object v = graph.insertVertex(graph.getDefaultParent(), task.getAbbreviation(), formatName(task.getName()),
  3. 20, 20, 20, 20);
  4. graph.updateCellSize(v);
  5. if (task.isWait()) {
  6. setStyle(v, "TIMER");
  7. } else if (task.isEnd()) {
  8. setStyle(v, "END");
  9. } else if (task.isPeople()) {
  10. setStyle(v, "HUMAN");
  11. } else if (task.isJava()) {
  12. if (task.getName().startsWith("Notificar")) {
  13. setStyle(v, "MESSAGE");
  14. } else {
  15. setStyle(v, "JAVA");
  16. }
  17. }
  18. return v;
  19. }

代码示例来源:origin: org.opensingular/singular-server-commons

  1. private static Object insertVertex(mxGraph graph, STask<?> task) {
  2. final Object v = graph.insertVertex(graph.getDefaultParent(), task.getAbbreviation(), formatName(task.getName()),
  3. 20, 20, 20, 20);
  4. graph.updateCellSize(v);
  5. if (task.isWait()) {
  6. setStyle(v, "TIMER");
  7. } else if (task.isEnd()) {
  8. setStyle(v, "END");
  9. } else if (task.isPeople()) {
  10. setStyle(v, "HUMAN");
  11. } else if (task.isJava()) {
  12. if (task.getName().startsWith("Notificar")) {
  13. setStyle(v, "MESSAGE");
  14. } else {
  15. setStyle(v, "JAVA");
  16. }
  17. }
  18. return v;
  19. }

代码示例来源:origin: org.opensingular/singular-requirement-module

  1. private static Object insertVertex(mxGraph graph, STask<?> task) {
  2. final Object v = graph.insertVertex(graph.getDefaultParent(), task.getAbbreviation(), formatName(task.getName()),
  3. 20, 20, 20, 20);
  4. graph.updateCellSize(v);
  5. if (task.isWait()) {
  6. setStyle(v, "TIMER");
  7. } else if (task.isEnd()) {
  8. setStyle(v, "END");
  9. } else if (task.isPeople()) {
  10. setStyle(v, "HUMAN");
  11. } else if (task.isJava()) {
  12. if (task.getName().startsWith("Notificar")) {
  13. setStyle(v, "MESSAGE");
  14. } else {
  15. setStyle(v, "JAVA");
  16. }
  17. }
  18. return v;
  19. }

相关文章

mxGraph类方法