/** * Updates the parents of the edges connected to the given cell and all its * descendants so that each edge is contained in the nearest common * ancestor. * * @param cell Cell whose edges should be checked and updated. */ public void updateEdgeParents(Object cell) { updateEdgeParents(cell, getRoot()); }
/** * Updates the parents of the edges connected to the given cell and all its * descendants so that each edge is contained in the nearest common * ancestor. * * @param cell Cell whose edges should be checked and updated. */ public void updateEdgeParents(Object cell) { updateEdgeParents(cell, getRoot()); }
public boolean contains(Object cell) { return isAncestor(getRoot(), cell); }
public boolean contains(Object cell) { return isAncestor(getRoot(), cell); }
/** * Encodes the given mxGraphModel by writing a (flat) XML sequence * of cell nodes as produced by the mxCellCodec. The sequence is * wrapped-up in a node with the name root. */ protected void encodeObject(mxCodec enc, Object obj, Node node) { if (obj instanceof mxGraphModel) { Node rootNode = enc.document.createElement("root"); mxGraphModel model = (mxGraphModel) obj; enc.encodeCell((mxICell) model.getRoot(), rootNode, true); node.appendChild(rootNode); } }
/** * Encodes the given mxGraphModel by writing a (flat) XML sequence * of cell nodes as produced by the mxCellCodec. The sequence is * wrapped-up in a node with the name root. */ protected void encodeObject(mxCodec enc, Object obj, Node node) { if (obj instanceof mxGraphModel) { Node rootNode = enc.document.createElement("root"); mxGraphModel model = (mxGraphModel) obj; enc.encodeCell((mxICell) model.getRoot(), rootNode, true); node.appendChild(rootNode); } }
public Object setTerminal(Object edge, Object terminal, boolean isSource) { boolean terminalChanged = terminal != getTerminal(edge, isSource); execute(new mxTerminalChange(this, edge, terminal, isSource)); if (maintainEdgeParent && terminalChanged) { updateEdgeParent(edge, getRoot()); } return terminal; }
public Object setTerminal(Object edge, Object terminal, boolean isSource) { boolean terminalChanged = terminal != getTerminal(edge, isSource); execute(new mxTerminalChange(this, edge, terminal, isSource)); if (maintainEdgeParent && terminalChanged) { updateEdgeParent(edge, getRoot()); } return terminal; }