private static int laneX(PlotLane myLane) { final int p = myLane != null ? myLane.getPosition() : 0; return LEFT_PAD + LANE_WIDTH * p; }
private static void addBlockedPosition(BitSet blockedPositions, final PlotCommit rObj) { if (rObj != null) { PlotLane lane = rObj.getLane(); // Positions may be blocked by a commit on a lane. if (lane != null) blockedPositions.set(lane.getPosition()); // Positions may also be blocked by forking off and merging lanes. // We don't consider passing lanes, because every passing lane forks // off and merges at it ends. for (PlotLane l : rObj.forkingOffLanes) blockedPositions.set(l.getPosition()); for (PlotLane l : rObj.mergingLanes) blockedPositions.set(l.getPosition()); } }
@SuppressWarnings("unchecked") private void closeLane(PlotLane lane) { if (activeLanes.remove(lane)) { recycleLane((L) lane); laneLength.remove(lane); freePositions.add(Integer.valueOf(lane.getPosition())); } }
if (blockedPositions.get(laneToUse.getPosition())) { .getPosition())); laneToUse.position = newPos;
private static int laneX(PlotLane myLane) { final int p = myLane != null ? myLane.getPosition() : 0; return LEFT_PAD + LANE_WIDTH * p; }
private static int laneX(final PlotLane myLane) { final int p = myLane != null ? myLane.getPosition() : 0; return LEFT_PAD + LANE_WIDTH * p; }
private static void addBlockedPosition(BitSet blockedPositions, final PlotCommit rObj) { if (rObj != null) { PlotLane lane = rObj.getLane(); // Positions may be blocked by a commit on a lane. if (lane != null) blockedPositions.set(lane.getPosition()); // Positions may also be blocked by forking off and merging lanes. // We don't consider passing lanes, because every passing lane forks // off and merges at it ends. for (PlotLane l : rObj.forkingOffLanes) blockedPositions.set(l.getPosition()); for (PlotLane l : rObj.mergingLanes) blockedPositions.set(l.getPosition()); } }
private static void addBlockedPosition(BitSet blockedPositions, final PlotCommit rObj) { if (rObj != null) { PlotLane lane = rObj.getLane(); // Positions may be blocked by a commit on a lane. if (lane != null) blockedPositions.set(lane.getPosition()); // Positions may also be blocked by forking off and merging lanes. // We don't consider passing lanes, because every passing lane forks // off and merges at it ends. for (PlotLane l : rObj.forkingOffLanes) blockedPositions.set(l.getPosition()); for (PlotLane l : rObj.mergingLanes) blockedPositions.set(l.getPosition()); } }
@SuppressWarnings("unchecked") private void closeLane(PlotLane lane) { if (activeLanes.remove(lane)) { recycleLane((L) lane); laneLength.remove(lane); freePositions.add(Integer.valueOf(lane.getPosition())); } }
@SuppressWarnings("unchecked") private void closeLane(PlotLane lane) { if (activeLanes.remove(lane)) { recycleLane((L) lane); laneLength.remove(lane); freePositions.add(Integer.valueOf(lane.getPosition())); } }
if (blockedPositions.get(laneToUse.getPosition())) { .getPosition())); laneToUse.position = newPos;
if (blockedPositions.get(laneToUse.getPosition())) { .getPosition())); laneToUse.position = newPos;