.getNextLayerConnectedCells(rankValue); .getPreviousLayerConnectedCells(rankValue); reservedPositions[cell.getGeneralPurposeVariable(rankValue)] = true; wrapper.cell.setGeneralPurposeVariable(rankValue, i);
if (cell.isVertex()) else if (cell.isEdge()) cell.setX(rankValue, localX); cell.setGeneralPurposeVariable(rankValue, (int) localX); localX += cell.width / 2.0; localX += intraCellSpacing;
cell.setX(j, cell.getGeneralPurposeVariable(j)); cell.setGeneralPurposeVariable(j, (int) cell.getX(j));
if (cell.isVertex()) .getPreviousLayerConnectedCells(i)) .toArray(new mxGraphAbstractHierarchyCell[cell .getPreviousLayerConnectedCells(i).size()]); -(int) currentCells[j].getX(currentRank)); Collection<mxGraphHierarchyEdge> connections; if (innerCell.isVertex()) currentCells = (cell.getNextLayerConnectedCells(i)) .toArray(new mxGraphAbstractHierarchyCell[cell .getNextLayerConnectedCells(i).size()]);
.getGeneralPurposeVariable(cell.minRank + 1); boolean edgeStraight = true; int refSegCount = 0; int x = cell.getGeneralPurposeVariable(i); double downXPositions[] = new double[numEdgeLayers - 1]; double currentX = cell.getX(cell.minRank + 1); double nextX = cell.getX(i + 1); currentX = cell.getX(cell.maxRank - 1); double nextX = cell.getX(i - 1); downXPositions[i - cell.minRank - 2] = cell.getX(i-1); currentX = nextX; cell.setX(i, (int) downXPositions[i - cell.minRank - 1]); cell.setX(i, (int) upXPositions[i - cell.minRank - 2]);
int rankPosition = cell.getGeneralPurposeVariable(i); Collection<mxGraphAbstractHierarchyCell> connectedCells = cell .getPreviousLayerConnectedCells(i); Iterator<mxGraphAbstractHierarchyCell> iter2 = connectedCells .iterator(); .getGeneralPurposeVariable(i - 1); connections[rankPosition][otherCellRankPosition] = 201207;
nestedBestRanks[j][cell.getGeneralPurposeVariable(j)] = cell; cell.setGeneralPurposeVariable(j, k);
/** * Utility method to display the x co-ords */ public void printStatus() { mxGraphHierarchyModel model = layout.getModel(); System.out.println("======Coord assignment debug======="); for (int j = 0; j < model.ranks.size(); j++) { System.out.print("Rank " + j + " : " ); mxGraphHierarchyRank rank = model.ranks .get(new Integer(j)); Iterator<mxGraphAbstractHierarchyCell> iter = rank .iterator(); while (iter.hasNext()) { mxGraphAbstractHierarchyCell cell = iter.next(); System.out.print(cell.getX(j) + " "); } System.out.println(); } System.out.println("===================================="); }
.getNextLayerConnectedCells(rankValue); .getPreviousLayerConnectedCells(rankValue); reservedPositions[cell.getGeneralPurposeVariable(rankValue)] = true; wrapper.cell.setGeneralPurposeVariable(rankValue, i);
if (cell.isVertex()) else if (cell.isEdge()) cell.setX(rankValue, localX); cell.setGeneralPurposeVariable(rankValue, (int) localX); localX += cell.width / 2.0; localX += intraCellSpacing;
cell.setX(j, cell.getGeneralPurposeVariable(j)); cell.setGeneralPurposeVariable(j, (int) cell.getX(j));
if (cell.isVertex()) .getPreviousLayerConnectedCells(i)) .toArray(new mxGraphAbstractHierarchyCell[cell .getPreviousLayerConnectedCells(i).size()]); -(int) currentCells[j].getX(currentRank)); Collection<mxGraphHierarchyEdge> connections; if (innerCell.isVertex()) currentCells = (cell.getNextLayerConnectedCells(i)) .toArray(new mxGraphAbstractHierarchyCell[cell .getNextLayerConnectedCells(i).size()]);
.getGeneralPurposeVariable(cell.minRank + 1); boolean edgeStraight = true; int refSegCount = 0; int x = cell.getGeneralPurposeVariable(i); double downXPositions[] = new double[numEdgeLayers - 1]; double currentX = cell.getX(cell.minRank + 1); double nextX = cell.getX(i + 1); currentX = cell.getX(cell.maxRank - 1); double nextX = cell.getX(i - 1); downXPositions[i - cell.minRank - 2] = cell.getX(i-1); currentX = nextX; cell.setX(i, (int) downXPositions[i - cell.minRank - 1]); cell.setX(i, (int) upXPositions[i - cell.minRank - 2]);
int rankPosition = cell.getGeneralPurposeVariable(i); Collection<mxGraphAbstractHierarchyCell> connectedCells = cell .getPreviousLayerConnectedCells(i); Iterator<mxGraphAbstractHierarchyCell> iter2 = connectedCells .iterator(); .getGeneralPurposeVariable(i - 1); connections[rankPosition][otherCellRankPosition] = 201207;
nestedBestRanks[j][cell.getGeneralPurposeVariable(j)] = cell; cell.setGeneralPurposeVariable(j, k);
/** * Utility method to display the x co-ords */ public void printStatus() { mxGraphHierarchyModel model = layout.getModel(); log.fine("======Coord assignment debug======="); for (int j = 0; j < model.ranks.size(); j++) { StringBuilder msg = new StringBuilder(); msg.append("Rank "); msg.append(j); msg.append(" : "); mxGraphHierarchyRank rank = model.ranks .get(new Integer(j)); Iterator<mxGraphAbstractHierarchyCell> iter = rank .iterator(); while (iter.hasNext()) { mxGraphAbstractHierarchyCell cell = iter.next(); msg.append(cell.getX(j)); msg.append(" "); } log.fine(msg.toString()); } log.fine("===================================="); }
orderedCells[cell.getGeneralPurposeVariable(i)] = cell; .getNextLayerConnectedCells(i); leftCellBelowConnections = leftCell .getPreviousLayerConnectedCells(i); .get(k).getGeneralPurposeVariable(i + 1); .get(k)).getGeneralPurposeVariable(i - 1); .getNextLayerConnectedCells(i); rightCellBelowConnections = rightCell .getPreviousLayerConnectedCells(i); .get(k)).getGeneralPurposeVariable(i + 1); .get(k)).getGeneralPurposeVariable(i - 1); || (totalSwitchedCrossings == totalCurrentCrossings && nudge)) int temp = leftCell.getGeneralPurposeVariable(i); leftCell.setGeneralPurposeVariable(i, rightCell .getGeneralPurposeVariable(i)); rightCell.setGeneralPurposeVariable(i, temp);
if (cell.isVertex()) else if (cell.isEdge()) cell.setX(rankValue, localX); cell.setGeneralPurposeVariable(rankValue, (int) localX); localX += cell.width / 2.0; localX += intraCellSpacing; cell.setY(rankValue, y);