/** * Hides the middle handle if the edge is not bendable. */ protected boolean isHandleVisible(int index) { return super.isHandleVisible(index) && (isSource(index) || isTarget(index) || isCellBendable()); }
/** * Hides the middle handle if the edge is not bendable. */ protected boolean isHandleVisible(int index) { return super.isHandleVisible(index) && (isSource(index) || isTarget(index) || isCellBendable()); }
if (isSource(index) || isTarget(index))
if (isSource(index) || isTarget(index))
if (isSource(index) || isTarget(index))
if (isSource(index) || isTarget(index))
/** * */ public void mousePressed(MouseEvent e) { super.mousePressed(e); boolean source = isSource(index); if (source || isTarget(index)) { mxGraph graph = graphComponent.getGraph(); mxIGraphModel model = graph.getModel(); Object terminal = model.getTerminal(state.getCell(), source); if ((terminal == null && !graph.isTerminalPointMovable( state.getCell(), source)) || (terminal != null && !graph.isCellDisconnectable( state.getCell(), terminal, source))) { first = null; } } }
/** * */ public void mousePressed(MouseEvent e) { super.mousePressed(e); boolean source = isSource(index); if (source || isTarget(index)) { mxGraph graph = graphComponent.getGraph(); mxIGraphModel model = graph.getModel(); Object terminal = model.getTerminal(state.getCell(), source); if ((terminal == null && !graph.isTerminalPointMovable( state.getCell(), source)) || (terminal != null && !graph.isCellDisconnectable( state.getCell(), terminal, source))) { first = null; } } }
boolean isTarget = isTarget(index);
/** * */ protected Color getHandleFillColor(int index) { boolean source = isSource(index); if (source || isTarget(index)) { mxGraph graph = graphComponent.getGraph(); Object terminal = graph.getModel().getTerminal(state.getCell(), source); if (terminal == null && !graphComponent.getGraph().isTerminalPointMovable( state.getCell(), source)) { return mxSwingConstants.LOCKED_HANDLE_FILLCOLOR; } else if (terminal != null) { return (graphComponent.getGraph().isCellDisconnectable( state.getCell(), terminal, source)) ? mxSwingConstants.CONNECT_HANDLE_FILLCOLOR : mxSwingConstants.LOCKED_HANDLE_FILLCOLOR; } } return super.getHandleFillColor(index); }
boolean isTarget = isTarget(index);
/** * */ protected Color getHandleFillColor(int index) { boolean source = isSource(index); if (source || isTarget(index)) { mxGraph graph = graphComponent.getGraph(); Object terminal = graph.getModel().getTerminal(state.getCell(), source); if (terminal == null && !graphComponent.getGraph().isTerminalPointMovable( state.getCell(), source)) { return mxSwingConstants.LOCKED_HANDLE_FILLCOLOR; } else if (terminal != null) { return (graphComponent.getGraph().isCellDisconnectable( state.getCell(), terminal, source)) ? mxSwingConstants.CONNECT_HANDLE_FILLCOLOR : mxSwingConstants.LOCKED_HANDLE_FILLCOLOR; } } return super.getHandleFillColor(index); }