/** * Creates and returns a cell state for the given cell. * * @param cell * Cell for which a new state should be created. * @return Returns a new state for the given cell. */ public mxCellState createState(Object cell) { return new mxCellState(this, cell, graph.getCellStyle(cell)); }
/** * Creates and returns a cell state for the given cell. * * @param cell * Cell for which a new state should be created. * @return Returns a new state for the given cell. */ public mxCellState createState(Object cell) { return new mxCellState(this, cell, graph.getCellStyle(cell)); }
.containsKey("height"))) mxCellState state = new mxCellState(null, null, attrs);
.containsKey("height"))) mxCellState state = new mxCellState(null, null, attrs);
mxCellState clone = new mxCellState(view, cell, style);
mxCellState clone = new mxCellState(view, cell, style);
Object target = aGraph.getTerminal(currEdge, false); double dist = (Double) distanceMap.get(source) + costFunction.getCost(new mxCellState(view, currEdge, null)); dist = (Double) distanceMap.get(target) + costFunction.getCost(new mxCellState(view, currEdge, null)); Object target = aGraph.getTerminal(currEdge, false); double dist = (Double) distanceMap.get(source) + costFunction.getCost(new mxCellState(view, currEdge, null));
Object target = aGraph.getTerminal(currEdge, false); double dist = (Double) distanceMap.get(source) + costFunction.getCost(new mxCellState(view, currEdge, null)); dist = (Double) distanceMap.get(target) + costFunction.getCost(new mxCellState(view, currEdge, null)); Object target = aGraph.getTerminal(currEdge, false); double dist = (Double) distanceMap.get(source) + costFunction.getCost(new mxCellState(view, currEdge, null));
currValue = (int) costFunction.getCost(new mxCellState(view, nextMove, null)); currCoords = getVertexGridCoords(xDim, yDim, currValue); oldMove = nextMove;
currValue = (int) costFunction.getCost(new mxCellState(view, nextMove, null)); currCoords = getVertexGridCoords(xDim, yDim, currValue); oldMove = nextMove;
int currValue = (int) costFunction.getCost(new mxCellState(view, possibleMoves[i], null)); int[] currCoords = getVertexGridCoords(xDim, yDim, currValue); int currMoveNum = getPossibleKnightMoveCount(aGraph, xDim, yDim, currCoords[0], currCoords[1]);
int currValue = (int) costFunction.getCost(new mxCellState(view, possibleMoves[i], null)); int[] currCoords = getVertexGridCoords(xDim, yDim, currValue); int currMoveNum = getPossibleKnightMoveCount(aGraph, xDim, yDim, currCoords[0], currCoords[1]);
/** * @param aGraph - the graph to search * @param value - desired value * @return the first vertex with the wanted value. If none are found, null is returned */ public static Object getVertexWithValue(mxAnalysisGraph aGraph, int value) { mxGraph graph = aGraph.getGraph(); Object[] vertices = aGraph.getChildVertices(aGraph.getGraph().getDefaultParent()); int childNum = vertices.length; int vertexValue = 0; mxCostFunction costFunction = aGraph.getGenerator().getCostFunction(); mxGraphView view = graph.getView(); for (int i = 0; i < childNum; i++) { Object currVertex = vertices[i]; vertexValue = (int) costFunction.getCost(new mxCellState(view, currVertex, null)); if (vertexValue == value) { return currVertex; } } return null; };
/** * @param aGraph - the graph to search * @param value - desired value * @return the first vertex with the wanted value. If none are found, null is returned */ public static Object getVertexWithValue(mxAnalysisGraph aGraph, int value) { mxGraph graph = aGraph.getGraph(); Object[] vertices = aGraph.getChildVertices(aGraph.getGraph().getDefaultParent()); int childNum = vertices.length; int vertexValue = 0; mxCostFunction costFunction = aGraph.getGenerator().getCostFunction(); mxGraphView view = graph.getView(); for (int i = 0; i < childNum; i++) { Object currVertex = vertices[i]; vertexValue = (int) costFunction.getCost(new mxCellState(view, currVertex, null)); if (vertexValue == value) { return currVertex; } } return null; };
mxGraphView view = graph.getView(); int srcValue = (int) costFunction.getCost(new mxCellState(view, aGraph.getTerminal(edge, true), null)); int destValue = (int) costFunction.getCost(new mxCellState(view, aGraph.getTerminal(edge, false), null)); mxGraphView viewCopy = graphCopy.getView(); int currSrcValue = (int) costFunctionCopy.getCost(new mxCellState(viewCopy, aGraphCopy.getTerminal(currEdge, true), null)); int currDestValue = (int) costFunctionCopy.getCost(new mxCellState(viewCopy, aGraphCopy.getTerminal(currEdge, false), null)); int i = 0;
mxGraphView view = graph.getView(); int srcValue = (int) costFunction.getCost(new mxCellState(view, aGraph.getTerminal(edge, true), null)); int destValue = (int) costFunction.getCost(new mxCellState(view, aGraph.getTerminal(edge, false), null)); mxGraphView viewCopy = graphCopy.getView(); int currSrcValue = (int) costFunctionCopy.getCost(new mxCellState(viewCopy, aGraphCopy.getTerminal(currEdge, true), null)); int currDestValue = (int) costFunctionCopy.getCost(new mxCellState(viewCopy, aGraphCopy.getTerminal(currEdge, false), null)); int i = 0;
source = new mxCellState(); source.setX(p0.getX()); source.setY(p0.getY()); target = new mxCellState(); target.setX(pe.getX()); target.setY(pe.getY());
source = new mxCellState(); source.setX(p0.getX()); source.setY(p0.getY()); target = new mxCellState(); target.setX(pe.getX()); target.setY(pe.getY());
(int) aGraph.getGenerator().getCostFunction().getCost(new mxCellState(graph.getView(), vertex, null)));
(int) aGraph.getGenerator().getCostFunction().getCost(new mxCellState(graph.getView(), vertex, null)));