本文整理了Java中com.mxgraph.view.mxGraph.getCurrentRoot()
方法的一些代码示例,展示了mxGraph.getCurrentRoot()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.getCurrentRoot()
方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:getCurrentRoot
[英]Returns the current root of the displayed cell hierarchy. This is a shortcut to in .
[中]返回显示的单元格层次结构的当前根。这是进入的捷径。
代码示例来源:origin: Activiti/Activiti
double y0 = x0;
if (!moveTree || parent == graph.getDefaultParent() || parent == graph.getCurrentRoot()) {
mxGeometry g = model.getGeometry(root);
if (g.isRelative()) {
if (model.getParent(node.cell) != graph.getCurrentRoot() && model.getParent(node.cell) != graph.getDefaultParent()) {
moveNode(node, dx, dy);
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Uses the root of the model as the root of the displayed cell hierarchy
* and selects the previous root.
*/
public void home()
{
Object current = getCurrentRoot();
if (current != null)
{
view.setCurrentRoot(null);
mxCellState state = view.getState(current);
if (state != null)
{
setSelectionCell(current);
}
}
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Uses the root of the model as the root of the displayed cell hierarchy
* and selects the previous root.
*/
public void home()
{
Object current = getCurrentRoot();
if (current != null)
{
view.setCurrentRoot(null);
mxCellState state = view.getState(current);
if (state != null)
{
setSelectionCell(current);
}
}
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
*
*/
protected void cellDrawn(mxICanvas canvas, mxCellState state)
{
if (isFoldingEnabled() && canvas instanceof mxGraphics2DCanvas)
{
mxIGraphModel model = graph.getModel();
mxGraphics2DCanvas g2c = (mxGraphics2DCanvas) canvas;
Graphics2D g2 = g2c.getGraphics();
// Draws the collapse/expand icons
boolean isEdge = model.isEdge(state.getCell());
if (state.getCell() != graph.getCurrentRoot()
&& (model.isVertex(state.getCell()) || isEdge))
{
ImageIcon icon = getFoldingIcon(state);
if (icon != null)
{
Rectangle bounds = getFoldingIconBounds(state, icon);
g2.drawImage(icon.getImage(), bounds.x, bounds.y,
bounds.width, bounds.height, this);
}
}
}
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
*
*/
protected void cellDrawn(mxICanvas canvas, mxCellState state)
{
if (isFoldingEnabled() && canvas instanceof mxGraphics2DCanvas)
{
mxIGraphModel model = graph.getModel();
mxGraphics2DCanvas g2c = (mxGraphics2DCanvas) canvas;
Graphics2D g2 = g2c.getGraphics();
// Draws the collapse/expand icons
boolean isEdge = model.isEdge(state.getCell());
if (state.getCell() != graph.getCurrentRoot()
&& (model.isVertex(state.getCell()) || isEdge))
{
ImageIcon icon = getFoldingIcon(state);
if (icon != null)
{
Rectangle bounds = getFoldingIconBounds(state, icon);
g2.drawImage(icon.getImage(), bounds.x, bounds.y,
bounds.width, bounds.height, this);
}
}
}
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
Object current = getCurrentRoot();
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
Object current = getCurrentRoot();
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
if (parent == getDefaultParent() || parent == getCurrentRoot())
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
if (parent == getDefaultParent() || parent == getCurrentRoot())
代码示例来源:origin: com.bbossgroups.activiti/activiti-bpmn-layout
double y0 = x0;
if (!moveTree || parent == graph.getDefaultParent() || parent == graph.getCurrentRoot()) {
mxGeometry g = model.getGeometry(root);
if (g.isRelative()) {
if (model.getParent(node.cell) != graph.getCurrentRoot() && model.getParent(node.cell) != graph.getDefaultParent()) {
moveNode(node, dx, dy);
代码示例来源:origin: org.flowable/flowable-bpmn-layout
double y0 = x0;
if (!moveTree || parent == graph.getDefaultParent() || parent == graph.getCurrentRoot()) {
mxGeometry g = model.getGeometry(root);
if (g.isRelative()) {
if (model.getParent(node.cell) != graph.getCurrentRoot() && model.getParent(node.cell) != graph.getDefaultParent()) {
moveNode(node, dx, dy);
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
&& model.getGeometry(parent) != null)
if (getCurrentRoot() != parent)
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
&& model.getGeometry(parent) != null)
if (getCurrentRoot() != parent)
内容来源于网络,如有侵权,请联系作者删除!