/** * Returns a cell state that represents the source or target terminal or * port for the given edge. */ public mxCellState getTerminalPort(mxCellState state, mxCellState terminal, boolean source) { String key = (source) ? mxConstants.STYLE_SOURCE_PORT : mxConstants.STYLE_TARGET_PORT; String id = mxUtils.getString(state.style, key); if (id != null && graph.getModel() instanceof mxGraphModel) { mxCellState tmp = getState(((mxGraphModel) graph.getModel()) .getCell(id)); // Only uses ports where a cell state exists if (tmp != null) { terminal = tmp; } } return terminal; }
/** * Returns a cell state that represents the source or target terminal or * port for the given edge. */ public mxCellState getTerminalPort(mxCellState state, mxCellState terminal, boolean source) { String key = (source) ? mxConstants.STYLE_SOURCE_PORT : mxConstants.STYLE_TARGET_PORT; String id = mxUtils.getString(state.style, key); if (id != null && graph.getModel() instanceof mxGraphModel) { mxCellState tmp = getState(((mxGraphModel) graph.getModel()) .getCell(id)); // Only uses ports where a cell state exists if (tmp != null) { terminal = tmp; } } return terminal; }
mxICell target = (mxICell) ((id != null && (!isEdge(cell) || !cloneAllEdges)) ? getCell(id) : null);
mxICell target = (mxICell) ((id != null && (!isEdge(cell) || !cloneAllEdges)) ? getCell(id) : null);