protected boolean isValidState(mxCellState state) { mxGraphView view = graphComponent.getGraph().getView(); mxIGraphModel model = graphComponent.getGraph().getModel(); Object edge = mxEdgeHandler.this.state.getCell(); boolean isSource = isSource(index); mxCellState other = view .getTerminalPort(state, view.getState(model.getTerminal(edge, !isSource)), !isSource); Object otherCell = (other != null) ? other.getCell() : null; Object source = (isSource) ? state.getCell() : otherCell; Object target = (isSource) ? otherCell : state.getCell(); error = validateConnection(source, target); return error == null; }
protected boolean isValidState(mxCellState state) { mxGraphView view = graphComponent.getGraph().getView(); mxIGraphModel model = graphComponent.getGraph().getModel(); Object edge = mxEdgeHandler.this.state.getCell(); boolean isSource = isSource(index); mxCellState other = view .getTerminalPort(state, view.getState(model.getTerminal(edge, !isSource)), !isSource); Object otherCell = (other != null) ? other.getCell() : null; Object source = (isSource) ? state.getCell() : otherCell; Object target = (isSource) ? otherCell : state.getCell(); error = validateConnection(source, target); return error == null; }