mxIGraphModel model = state.getView().getGraph().getModel(); Rectangle bounds = null;
mxIGraphModel model = state.getView().getGraph().getModel(); Rectangle bounds = null;
public double getCost(mxCellState state) { //assumed future parameters if (state == null || state.getView() == null || state.getView().getGraph() == null) { return 1.0; } mxGraph graph = state.getView().getGraph(); Object cell = state.getCell(); Double edgeWeight = null; if(graph.getModel().getValue(cell) == null || graph.getModel().getValue(cell) == "") { return 1.0; } else if (graph.getModel().getValue(cell) instanceof String) { edgeWeight = Double.parseDouble((String) graph.getModel().getValue(cell)); } else { edgeWeight = (Double) graph.getModel().getValue(cell); } return edgeWeight; }; };
public double getCost(mxCellState state) { //assumed future parameters if (state == null || state.getView() == null || state.getView().getGraph() == null) { return 1.0; } mxGraph graph = state.getView().getGraph(); Object cell = state.getCell(); Double edgeWeight = null; if(graph.getModel().getValue(cell) == null || graph.getModel().getValue(cell) == "") { return 1.0; } else if (graph.getModel().getValue(cell) instanceof String) { edgeWeight = Double.parseDouble((String) graph.getModel().getValue(cell)); } else { edgeWeight = (Double) graph.getModel().getValue(cell); } return edgeWeight; }; };
mxGraph graph = view.getGraph(); mxPoint pt = (points != null && points.size() > 0) ? points .get(0) : null;
mxGraph graph = view.getGraph(); mxPoint pt = (points != null && points.size() > 0) ? points .get(0) : null;
/** * 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())); }
mxIGraphModel model = view.getGraph().getModel(); double segment = mxUtils.getDouble(state.getStyle(), mxConstants.STYLE_SEGMENT, mxConstants.ENTITY_SEGMENT)
public mxRectangle getBounds(mxCellState state) boolean isEdge = state.getView().getGraph().getModel() .isEdge(state.getCell()); double s = state.getView().getScale();
mxIGraphModel model = view.getGraph().getModel(); double segment = mxUtils.getDouble(state.getStyle(), mxConstants.STYLE_SEGMENT, mxConstants.ENTITY_SEGMENT)
if (sourcenode.getParent() != null) spos = adjustPoint(state.getView().getGraph(), sourcenode.getParent(), spos); if (targetnode.getParent() != null) tpos = adjustPoint(state.getView().getGraph(), targetnode.getParent(), tpos); if (sourcenode.getParent().getParent() != null) ppos = adjustPoint(state.getView().getGraph(), sourcenode.getParent().getParent(), ppos); if (vedge.getSource() != null && vedge.getEdgeParent() != null) res = adjustPoint(state.getView().getGraph(), vedge.getEdgeParent(), res);
public mxRectangle getBounds(mxCellState state) boolean isEdge = state.getView().getGraph().getModel() .isEdge(state.getCell()); double s = state.getView().getScale();