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

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

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

mxGraph.getGraphBounds介绍

[英]Returns the bounds of the visible graph.
[中]返回可见图形的边界。

代码示例

代码示例来源:origin: kieker-monitoring/kieker

  1. @Override
  2. public void windowClosing(final WindowEvent e) {
  3. final Document doc = mxCellRenderer.createSvgDocument(KaxVizFrame.this.graph, null, 1d, Color.WHITE,
  4. KaxVizFrame.this.graph.getGraphBounds());
  5. try {
  6. mxUtils.writeFile(mxXmlUtils.getXml(doc), outFilename);
  7. } catch (final IOException ex) {
  8. LOGGER.error("Failed to save Visualization of kax-File.", ex);
  9. }
  10. }
  11. });

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

  1. /**
  2. * Returns the scaled preferred size for the current graph.
  3. */
  4. protected Dimension getScaledPreferredSizeForGraph()
  5. {
  6. mxRectangle bounds = graph.getGraphBounds();
  7. int border = graph.getBorder();
  8. return new Dimension(
  9. (int) Math.round(bounds.getX() + bounds.getWidth()) + border
  10. + 1, (int) Math.round(bounds.getY()
  11. + bounds.getHeight())
  12. + border + 1);
  13. }

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

  1. /**
  2. * Returns the scaled preferred size for the current graph.
  3. */
  4. protected Dimension getScaledPreferredSizeForGraph()
  5. {
  6. mxRectangle bounds = graph.getGraphBounds();
  7. int border = graph.getBorder();
  8. return new Dimension(
  9. (int) Math.round(bounds.getX() + bounds.getWidth()) + border
  10. + 1, (int) Math.round(bounds.getY()
  11. + bounds.getHeight())
  12. + border + 1);
  13. }

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

  1. /**
  2. * Checks if the triple buffer exists and creates a new one if it does not.
  3. * Also compares the size of the buffer with the size of the graph and drops
  4. * the buffer if it has a different size.
  5. */
  6. public void checkTripleBuffer()
  7. {
  8. mxRectangle bounds = graph.getGraphBounds();
  9. int width = (int) Math.ceil(bounds.getX() + bounds.getWidth() + 2);
  10. int height = (int) Math.ceil(bounds.getY() + bounds.getHeight() + 2);
  11. if (tripleBuffer != null)
  12. {
  13. if (tripleBuffer.getWidth() != width
  14. || tripleBuffer.getHeight() != height)
  15. {
  16. // Resizes the buffer (destroys existing and creates new)
  17. destroyTripleBuffer();
  18. }
  19. }
  20. if (tripleBuffer == null)
  21. {
  22. createTripleBuffer(width, height);
  23. }
  24. }

代码示例来源:origin: net.kieker-monitoring/kieker

  1. @Override
  2. public void windowClosing(final WindowEvent e) {
  3. final Document doc = mxCellRenderer.createSvgDocument(KaxVizFrame.this.graph, null, 1d, Color.WHITE,
  4. KaxVizFrame.this.graph.getGraphBounds());
  5. try {
  6. mxUtils.writeFile(mxXmlUtils.getXml(doc), outFilename);
  7. } catch (final IOException ex) {
  8. LOG.error("Failed to save Visualization of kax-File.", ex);
  9. }
  10. }
  11. });

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

  1. /**
  2. * Checks if the triple buffer exists and creates a new one if it does not.
  3. * Also compares the size of the buffer with the size of the graph and drops
  4. * the buffer if it has a different size.
  5. */
  6. public void checkTripleBuffer()
  7. {
  8. mxRectangle bounds = graph.getGraphBounds();
  9. int width = (int) Math.ceil(bounds.getX() + bounds.getWidth() + 2);
  10. int height = (int) Math.ceil(bounds.getY() + bounds.getHeight() + 2);
  11. if (tripleBuffer != null)
  12. {
  13. if (tripleBuffer.getWidth() != width
  14. || tripleBuffer.getHeight() != height)
  15. {
  16. // Resizes the buffer (destroys existing and creates new)
  17. destroyTripleBuffer();
  18. }
  19. }
  20. if (tripleBuffer == null)
  21. {
  22. createTripleBuffer(width, height);
  23. }
  24. }

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

  1. mxRectangle graphBounds = graph.getGraphBounds();
  2. Dimension pSize = new Dimension((int) Math.ceil(graphBounds.getX()
  3. + graphBounds.getWidth()) + 1, (int) Math.ceil(graphBounds

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

  1. mxRectangle graphBounds = graph.getGraphBounds();
  2. Dimension pSize = new Dimension((int) Math.ceil(graphBounds.getX()
  3. + graphBounds.getWidth()) + 1, (int) Math.ceil(graphBounds

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

  1. mxRectangle bounds = getGraphBounds();

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

  1. mxRectangle bounds = getGraphBounds();

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

  1. result = (ignoreDirty) ? null : getGraphBounds();

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

  1. result = (ignoreDirty) ? null : getGraphBounds();

相关文章

mxGraph类方法