/** * Hook for subclassers to return tooltip texts for certain points on the * handle. */ public String getToolTipText(MouseEvent e) { int index = getIndexAt(e.getX(), e.getY()); if (index == 1) { return mxResources.get("doubleClickOrientation"); } return null; }
p = createPoints(state); Rectangle[] h = new Rectangle[4]; mxPoint pe = state.getAbsolutePoint(state.getAbsolutePointCount() - 1); h[0] = createHandle(p0.getPoint()); h[2] = createHandle(pe.getPoint()); h[1] = createHandle(pt); h[3] = createHandle(state.getAbsoluteOffset().getPoint(), mxConstants.LABEL_HANDLE_SIZE); if (isHandleVisible(3) && h[1].intersects(h[3])) h[1] = createHandle(pt, mxConstants.HANDLE_SIZE + 3);
/** * * @param state * Cell state for which a handler should be created. * @return Returns the handler to be used for the given cell state. */ public mxCellHandler createHandler(mxCellState state) { if (graph.getModel().isVertex(state.getCell())) { return new mxVertexHandler(this, state); } else if (graph.getModel().isEdge(state.getCell())) { mxEdgeStyleFunction style = graph.getView().getEdgeStyle(state, null, null, null); if (graph.isLoop(state) || style == mxEdgeStyle.ElbowConnector || style == mxEdgeStyle.SideToSide || style == mxEdgeStyle.TopToBottom) { return new mxElbowEdgeHandler(this, state); } return new mxEdgeHandler(this, state); } return new mxCellHandler(this, state); }
p = createPoints(state); Rectangle[] h = new Rectangle[4]; mxPoint pe = state.getAbsolutePoint(state.getAbsolutePointCount() - 1); h[0] = createHandle(p0.getPoint()); h[2] = createHandle(pe.getPoint()); h[1] = createHandle(pt); h[3] = createHandle(state.getAbsoluteOffset().getPoint(), mxConstants.LABEL_HANDLE_SIZE); if (isHandleVisible(3) && h[1].intersects(h[3])) h[1] = createHandle(pt, mxConstants.HANDLE_SIZE + 3);
/** * * @param state * Cell state for which a handler should be created. * @return Returns the handler to be used for the given cell state. */ public mxCellHandler createHandler(mxCellState state) { if (graph.getModel().isVertex(state.getCell())) { return new mxVertexHandler(this, state); } else if (graph.getModel().isEdge(state.getCell())) { mxEdgeStyleFunction style = graph.getView().getEdgeStyle(state, null, null, null); if (graph.isLoop(state) || style == mxEdgeStyle.ElbowConnector || style == mxEdgeStyle.SideToSide || style == mxEdgeStyle.TopToBottom) { return new mxElbowEdgeHandler(this, state); } return new mxEdgeHandler(this, state); } return new mxCellHandler(this, state); }
/** * Hook for subclassers to return tooltip texts for certain points on the * handle. */ public String getToolTipText(MouseEvent e) { int index = getIndexAt(e.getX(), e.getY()); if (index == 1) { return mxResources.get("doubleClickOrientation"); } return null; }