/** * */ protected boolean isCellOpaque(Object cell) { return startState != null && startState.getCell() == cell; }
/** * */ protected boolean isCellOpaque(Object cell) { return startState != null && startState.getCell() == cell; }
/** * Gets the initial editing value for the given cell. */ protected String getInitialValue(mxCellState state, EventObject trigger) { return graphComponent.getEditingValue(state.getCell(), trigger); }
/** */ protected boolean isValidState(mxCellState state) { return SValidation.getMoveValidationError(cells, state.getCell()) == null; } };
/** * Returns the visible source or target terminal cell. * * @param source Boolean that specifies if the source or target cell should be * returned. */ public Object getVisibleTerminal(boolean source) { mxCellState tmp = getVisibleTerminalState(source); return (tmp != null) ? tmp.getCell() : null; }
/** * Returns the visible source or target terminal cell. * * @param source Boolean that specifies if the source or target cell should be * returned. */ public Object getVisibleTerminal(boolean source) { mxCellState tmp = getVisibleTerminalState(source); return (tmp != null) ? tmp.getCell() : null; }
/** * Gets the initial editing value for the given cell. */ protected String getInitialValue(mxCellState state, EventObject trigger) { return graphComponent.getEditingValue(state.getCell(), trigger); }
/** * Returns the error message or an empty string if the connection for the * given source target pair is not valid. Otherwise it returns null. */ public String validateConnection(Object source, Object target) { return graphComponent.getGraph().getEdgeValidationError( state.getCell(), source, target); }
/** * */ protected boolean isCellBendable() { return graphComponent.getGraph().isCellBendable(state.getCell()); }
/** * Returns the error message or an empty string if the connection for the * given source target pair is not valid. Otherwise it returns null. */ public String validateConnection(Object source, Object target) { return graphComponent.getGraph().getEdgeValidationError( state.getCell(), source, target); }
/** * */ protected boolean isCellBendable() { return graphComponent.getGraph().isCellBendable(state.getCell()); }
/** * */ public boolean isStateHandled(mxCellState state) { return graphComponent.getGraph().getModel().isVertex(state.getCell()); }
/** * Draws the preview using the graphics canvas. */ protected void paintPreview(mxGraphics2DCanvas canvas) { graphComponent.getGraphControl().drawCell(graphComponent.getCanvas(), previewState.getCell()); }
protected Object getCell(MouseEvent e) { mxGraph graph = graphComponent.getGraph(); mxIGraphModel model = graph.getModel(); Object cell = super.getCell(e); if (cell == mxEdgeHandler.this.state.getCell() || (!graph.isConnectableEdges() && model.isEdge(cell))) { cell = null; } return cell; }
protected Object getCell(MouseEvent e) { mxGraph graph = graphComponent.getGraph(); mxIGraphModel model = graph.getModel(); Object cell = super.getCell(e); if (cell == mxEdgeHandler.this.state.getCell() || (!graph.isConnectableEdges() && model.isEdge(cell))) { cell = null; } return cell; }
/** * Returns true if the label bounds of the state should be used for the * editor. */ protected boolean useLabelBounds(mxCellState state) { mxIGraphModel model = state.getView().getGraph().getModel(); mxGeometry geometry = model.getGeometry(state.getCell()); return ((geometry != null && geometry.getOffset() != null && !geometry.isRelative() && (geometry.getOffset().getX() != 0 || geometry .getOffset().getY() != 0)) || model.isEdge(state.getCell())); }
/** * Returns true if the label bounds of the state should be used for the * editor. */ protected boolean useLabelBounds(mxCellState state) { mxIGraphModel model = state.getView().getGraph().getModel(); mxGeometry geometry = model.getGeometry(state.getCell()); return ((geometry != null && geometry.getOffset() != null && !geometry.isRelative() && (geometry.getOffset().getX() != 0 || geometry .getOffset().getY() != 0)) || model.isEdge(state.getCell())); }