本文整理了Java中com.mxgraph.view.mxGraph.getGraphBounds()
方法的一些代码示例,展示了mxGraph.getGraphBounds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.getGraphBounds()
方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:getGraphBounds
[英]Returns the bounds of the visible graph.
[中]返回可见图形的边界。
代码示例来源:origin: kieker-monitoring/kieker
@Override
public void windowClosing(final WindowEvent e) {
final Document doc = mxCellRenderer.createSvgDocument(KaxVizFrame.this.graph, null, 1d, Color.WHITE,
KaxVizFrame.this.graph.getGraphBounds());
try {
mxUtils.writeFile(mxXmlUtils.getXml(doc), outFilename);
} catch (final IOException ex) {
LOGGER.error("Failed to save Visualization of kax-File.", ex);
}
}
});
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns the scaled preferred size for the current graph.
*/
protected Dimension getScaledPreferredSizeForGraph()
{
mxRectangle bounds = graph.getGraphBounds();
int border = graph.getBorder();
return new Dimension(
(int) Math.round(bounds.getX() + bounds.getWidth()) + border
+ 1, (int) Math.round(bounds.getY()
+ bounds.getHeight())
+ border + 1);
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns the scaled preferred size for the current graph.
*/
protected Dimension getScaledPreferredSizeForGraph()
{
mxRectangle bounds = graph.getGraphBounds();
int border = graph.getBorder();
return new Dimension(
(int) Math.round(bounds.getX() + bounds.getWidth()) + border
+ 1, (int) Math.round(bounds.getY()
+ bounds.getHeight())
+ border + 1);
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Checks if the triple buffer exists and creates a new one if it does not.
* Also compares the size of the buffer with the size of the graph and drops
* the buffer if it has a different size.
*/
public void checkTripleBuffer()
{
mxRectangle bounds = graph.getGraphBounds();
int width = (int) Math.ceil(bounds.getX() + bounds.getWidth() + 2);
int height = (int) Math.ceil(bounds.getY() + bounds.getHeight() + 2);
if (tripleBuffer != null)
{
if (tripleBuffer.getWidth() != width
|| tripleBuffer.getHeight() != height)
{
// Resizes the buffer (destroys existing and creates new)
destroyTripleBuffer();
}
}
if (tripleBuffer == null)
{
createTripleBuffer(width, height);
}
}
代码示例来源:origin: net.kieker-monitoring/kieker
@Override
public void windowClosing(final WindowEvent e) {
final Document doc = mxCellRenderer.createSvgDocument(KaxVizFrame.this.graph, null, 1d, Color.WHITE,
KaxVizFrame.this.graph.getGraphBounds());
try {
mxUtils.writeFile(mxXmlUtils.getXml(doc), outFilename);
} catch (final IOException ex) {
LOG.error("Failed to save Visualization of kax-File.", ex);
}
}
});
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Checks if the triple buffer exists and creates a new one if it does not.
* Also compares the size of the buffer with the size of the graph and drops
* the buffer if it has a different size.
*/
public void checkTripleBuffer()
{
mxRectangle bounds = graph.getGraphBounds();
int width = (int) Math.ceil(bounds.getX() + bounds.getWidth() + 2);
int height = (int) Math.ceil(bounds.getY() + bounds.getHeight() + 2);
if (tripleBuffer != null)
{
if (tripleBuffer.getWidth() != width
|| tripleBuffer.getHeight() != height)
{
// Resizes the buffer (destroys existing and creates new)
destroyTripleBuffer();
}
}
if (tripleBuffer == null)
{
createTripleBuffer(width, height);
}
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
mxRectangle graphBounds = graph.getGraphBounds();
Dimension pSize = new Dimension((int) Math.ceil(graphBounds.getX()
+ graphBounds.getWidth()) + 1, (int) Math.ceil(graphBounds
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
mxRectangle graphBounds = graph.getGraphBounds();
Dimension pSize = new Dimension((int) Math.ceil(graphBounds.getX()
+ graphBounds.getWidth()) + 1, (int) Math.ceil(graphBounds
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
mxRectangle bounds = getGraphBounds();
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
mxRectangle bounds = getGraphBounds();
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
result = (ignoreDirty) ? null : getGraphBounds();
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
result = (ignoreDirty) ? null : getGraphBounds();
内容来源于网络,如有侵权,请联系作者删除!