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);
/** * 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); } } }
/** * 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); } } }
/** * */ 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); } } } }
/** * */ 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); } } } }
Object current = getCurrentRoot();
Object current = getCurrentRoot();
if (parent == getDefaultParent() || parent == getCurrentRoot())
if (parent == getDefaultParent() || parent == getCurrentRoot())
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);
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);
&& model.getGeometry(parent) != null) if (getCurrentRoot() != parent)
&& model.getGeometry(parent) != null) if (getCurrentRoot() != parent)