Index: trunk/src/org/expeditee/gui/DisplayController.java
===================================================================
--- trunk/src/org/expeditee/gui/DisplayController.java	(revision 1157)
+++ trunk/src/org/expeditee/gui/DisplayController.java	(revision 1171)
@@ -170,5 +170,7 @@
 	private static void fireFrameChanged()
 	{
-		for (DisplayObserver observer : _displayObservers) observer.frameChanged();
+		for (DisplayObserver observer : _displayObservers) {
+			observer.frameChanged();
+		}
 	}
 
@@ -187,5 +189,7 @@
 	public static void addDisplayObserver(DisplayObserver observer)
 	{
-		if (observer == null) throw new NullPointerException("observer");
+		if (observer == null) {
+			throw new NullPointerException("observer");
+		}
 		
 		_displayObservers.add(observer);
@@ -205,5 +209,7 @@
 	public static void removeDisplayObserver(DisplayObserver observer)
 	{
-		if (observer == null) throw new NullPointerException("observer");
+		if (observer == null) {
+			throw new NullPointerException("observer");
+		}
 		
 		_displayObservers.remove(observer);
@@ -231,5 +237,7 @@
 		int size = Math.round(text.getSize());
 		
-		if (allowClearSelection && !isShiftDown && text.hasSelection()) text.clearSelection();
+		if (allowClearSelection && !isShiftDown && text.hasSelection()) {
+			text.clearSelection();
+		}
 
 		Point newMouse = text.moveCursor(cursorMovement, DisplayController.getFloatMouseX(), EcosystemManager.getInputManager().getCursorPosition().getY(), isShiftDown, isCtrlDown);
@@ -257,6 +265,7 @@
 
 		if (!newSize && _cursorType == Item.TEXT_CURSOR) {
-			if (cursorMovement != 0)
+			if (cursorMovement != 0) {
 				DisplayController.setCursorPosition(newMouse, false);
+			}
 			return;
 		}
@@ -330,5 +339,7 @@
 	{
 		// Avoid flicker when not changing
-		if (type == _cursorType) return;
+		if (type == _cursorType) {
+			return;
+		}
 
 		_cursorType = type;
@@ -463,5 +474,7 @@
 
 		// check that the stack is not empty
-		if (visitedFrames.size() > 0) return visitedFrames.peek();
+		if (visitedFrames.size() > 0) {
+			return visitedFrames.peek();
+		}
 
 		// if the stack is empty, return null
@@ -472,5 +485,7 @@
 	public static void setTransition(Frame frame, FrameTransition transition)
 	{
-		if (frame == null) return;
+		if (frame == null) {
+			return;
+		}
 		TwinFramesSide side = getSideFrameIsOn(frame);
 		setTransition(side, transition);
@@ -480,5 +495,7 @@
 	private static void setTransition(TwinFramesSide side, FrameTransition transition)
 	{
-		if (side == null) return;
+		if (side == null) {
+			return;
+		}
 		
 		_transitions[side.ordinal()] = transition;
@@ -488,5 +505,7 @@
 	private static FrameTransition getTransition(TwinFramesSide side)
 	{
-		if (side == null) return null;
+		if (side == null) {
+			return null;
+		}
 		
 		return _transitions[side.ordinal()];
@@ -499,5 +518,7 @@
 	public static void setCurrentFrame(Frame frame, boolean incrementStats)
 	{
-		if (frame == null) return;
+		if (frame == null) {
+			return;
+		}
 
 		// If one of the sides doesn't have a frame yet, give it this one
@@ -520,5 +541,7 @@
 		
 		// Update stats
-		if (incrementStats) SessionStats.AccessedFrame();
+		if (incrementStats) {
+			SessionStats.AccessedFrame();
+		}
 
 		// Invalidate free items
@@ -571,6 +594,7 @@
 			// Get all overlayed frames seen by the next frame
 			for (Overlay o : frame.getOverlays()) {
-				if (!nextOnlyOverlays.contains(o.Frame))
+				if (!nextOnlyOverlays.contains(o.Frame)) {
 					nextOnlyOverlays.add(o.Frame);
+				}
 			}
 
@@ -578,6 +602,7 @@
 			if (getCurrentFrame() != null) {
 				for (Overlay o : getCurrentFrame().getOverlays()) {
-					if (!currentOnlyOverlays.contains(o.Frame))
+					if (!currentOnlyOverlays.contains(o.Frame)) {
 						currentOnlyOverlays.add(o.Frame);
+					}
 				}
 			}
@@ -605,6 +630,7 @@
 				// possible non-shared overlays
 				items = getCurrentFrame().getAllItems();
-				for (Frame f : seen)
+				for (Frame f : seen) {
 					items.removeAll(f.getAllItems());
+				}
 
 				// Notify items that they are hidden
@@ -687,5 +713,7 @@
 		
 		// If there's only a right frame, that's the current side
-		if (!sideHasFrame(LEFT) && sideHasFrame(RIGHT)) return RIGHT;
+		if (!sideHasFrame(LEFT) && sideHasFrame(RIGHT)) {
+			return RIGHT;
+		}
 
 		// In any other case the left side is the current side
@@ -696,5 +724,7 @@
 	private static TwinFramesSide getOppositeSide()
 	{
-		if (getCurrentSide() == LEFT) return RIGHT;
+		if (getCurrentSide() == LEFT) {
+			return RIGHT;
+		}
 
 		return LEFT;
@@ -706,5 +736,7 @@
 		// Loop through both sides
 		for (TwinFramesSide side : TwinFramesSide.values()) {
-			if (getFrameOnSide(side) == frame) return side;
+			if (getFrameOnSide(side) == frame) {
+				return side;
+			}
 		}
 
@@ -715,5 +747,7 @@
 	public static Frame getFrameOnSide(TwinFramesSide side)
 	{
-		if (side == null) return null;
+		if (side == null) {
+			return null;
+		}
 		
 		return _currentFrames[side.ordinal()];
@@ -747,5 +781,7 @@
 	public static Line getTwinFramesSeparatorLine()
 	{
-		if (!isTwinFramesOn()) return null;
+		if (!isTwinFramesOn()) {
+			return null;
+		}
 		
 		int x = getTwinFramesSeparatorX();
@@ -760,5 +796,7 @@
 	{
 		// No message bay in audience mode
-		if (isAudienceMode()) return null;
+		if (isAudienceMode()) {
+			return null;
+		}
 		
 		int separatorThickness = (int) SEPARATOR_STROKE.thickness;
@@ -778,5 +816,5 @@
 	public static float getFloatMouseX()
 	{
-		return (float) getMouseX();
+		return getMouseX();
 	}
 
@@ -820,5 +858,5 @@
 	public static float getFloatMouseY()
 	{
-		return (float) getMouseY();
+		return getMouseY();
 	}
 	
@@ -857,5 +895,7 @@
 
 		// do not get a cached version (in case it is in the other window)
-		if (isTwinFramesOn()) FrameIO.SuspendCache();
+		if (isTwinFramesOn()) {
+			FrameIO.SuspendCache();
+		}
 		
 		Frame frame = FrameIO.LoadFrame(removeFromBack());
@@ -913,6 +953,7 @@
 
 		// do not get a cached version (in case it is in the other window)
-		if (isTwinFramesOn())
+		if (isTwinFramesOn()) {
 			FrameIO.SuspendCache();
+		}
 		Frame frame = FrameIO.LoadFrame(getBackedUpFrames(side).pop());
 		// If the top frame on the backup stack is the current frame go back
@@ -964,6 +1005,10 @@
 		
 		// Update the sizes of the displayed frames
-		if (getCurrentFrame() != null) getCurrentFrame().refreshSize();
-		if (getOppositeFrame() != null) getOppositeFrame().refreshSize();
+		if (getCurrentFrame() != null) {
+			getCurrentFrame().refreshSize();
+		}
+		if (getOppositeFrame() != null) {
+			getOppositeFrame().refreshSize();
+		}
 
 		requestRefresh(false);
@@ -979,5 +1024,7 @@
 	public static void Reload(TwinFramesSide side)
 	{
-		if (side == null) return;
+		if (side == null) {
+			return;
+		}
 
 		FrameIO.SuspendCache();
@@ -1029,5 +1076,7 @@
 	private static void setFrameOnSide(Frame frame, TwinFramesSide side)
 	{
-		if (side == null) return;
+		if (side == null) {
+			return;
+		}
 		
 		_currentFrames[side.ordinal()] = frame;
@@ -1037,5 +1086,7 @@
 	private static Stack<String> getVisitedFrames(TwinFramesSide side)
 	{
-		if (side == null) return null;
+		if (side == null) {
+			return null;
+		}
 		
 		return _visitedFrames[side.ordinal()];
@@ -1045,5 +1096,7 @@
 	private static Stack<String> getBackedUpFrames(TwinFramesSide side)
 	{
-		if (side == null) return null;
+		if (side == null) {
+			return null;
+		}
 		
 		return _backedUpFrames[side.ordinal()];
@@ -1087,5 +1140,7 @@
 		
 		// Turn off x-ray mode if it's on
-		if (_xrayMode) ToggleXRayMode();
+		if (_xrayMode) {
+			ToggleXRayMode();
+		}
 	
 		// Toggle audience mode
@@ -1105,5 +1160,7 @@
 	{
 		// Turn off x-ray mode if it is on
-		if (_audienceMode) ToggleAudienceMode();
+		if (_audienceMode) {
+			ToggleAudienceMode();
+		}
 
 		_xrayMode = !_xrayMode;
@@ -1194,5 +1251,7 @@
 	public static void invalidateItem(Item damagedItem, Bounds toRepaint)
 	{
-		if (toRepaint == null) return;
+		if (toRepaint == null) {
+			return;
+		}
 		
 		// Only add area to repaint if item is visible...
@@ -1239,5 +1298,7 @@
 		
 		// No damaged areas
-		if (useInvalidation && clip.isFullyClipped()) return true;
+		if (useInvalidation && clip.isFullyClipped()) {
+			return true;
+		}
 				
 		GraphicsManager g = EcosystemManager.getGraphicsManager();
@@ -1251,5 +1312,7 @@
 				leftClip = clip.clone().intersectWith(getLeftFramePaintArea());
 				rightClip = clip.clone().intersectWith(getRightFramePaintArea());
-				if (!rightClip.isFullyClipped()) rightClip = new Clip(rightClip.getBounds().translate(-getRightFramePaintArea().getMinX(), 0));
+				if (!rightClip.isFullyClipped()) {
+					rightClip = new Clip(rightClip.getBounds().translate(-getRightFramePaintArea().getMinX(), 0));
+				}
 			}
 			
@@ -1287,5 +1350,7 @@
 			if (useInvalidation) {
 				messageBayClip = clip.clone().intersectWith(messageBayPaintArea);
-				if (!messageBayClip.isFullyClipped()) messageBayClip = new Clip(messageBayClip.getBounds().translate(0, -messageBayPaintArea.getMinY()));
+				if (!messageBayClip.isFullyClipped()) {
+					messageBayClip = new Clip(messageBayClip.getBounds().translate(0, -messageBayPaintArea.getMinY()));
+				}
 			}
 			
@@ -1305,9 +1370,9 @@
 		
 		// Paint any popups
-		if (PopupManager.getInstance() != null) PopupManager.getInstance().paint();
+		if (PopupManager.getInstance() != null) {
+			PopupManager.getInstance().paint();
+		}
 		
 		g.popDrawingSurface();
-		//System.err.println("DisplayController refresh.  Point.ORIGIN=" + Point.ORIGIN);
-		//System.err.println("DisplayController refresh.  Graphic=" + g);
 		g.drawImage(_refreshBuffer, Point.ORIGIN);
 		return true;
@@ -1317,5 +1382,7 @@
 	private static void paintTwinFrames(Image leftFrameImage, Image rightFrameImage)
 	{
-		if (leftFrameImage == null && rightFrameImage == null) return;
+		if (leftFrameImage == null && rightFrameImage == null) {
+			return;
+		}
 		
 		InOutReference<FrameTransition> leftTransition = new InOutReference<FrameTransition>(getTransition(LEFT));
@@ -1332,5 +1399,7 @@
 	private static void paintSingleFrame(Image frameImage)
 	{
-		if (frameImage == null) return;
+		if (frameImage == null) {
+			return;
+		}
 
 		InOutReference<FrameTransition> transition = new InOutReference<FrameTransition>(getTransition(getCurrentSide()));
@@ -1344,5 +1413,7 @@
 	private static void paintFrameIntoArea(Image frameImage, AxisAlignedBoxBounds area, InOutReference<FrameTransition> transition)
 	{
-		if (frameImage == null || area == null) return;
+		if (frameImage == null || area == null) {
+			return;
+		}
 		
 		GraphicsManager g = EcosystemManager.getGraphicsManager();
@@ -1350,5 +1421,7 @@
 		
 		FrameTransition t = null;
-		if (transition != null) t = transition.get();
+		if (transition != null) {
+			t = transition.get();
+		}
 		
 		// Attempt to draw the transition if there is one
@@ -1370,5 +1443,7 @@
 		
 		// Discard the transition if drawing failed or it is finished
-		if (t == null || t.isCompleted()) transition.set(null);
+		if (t == null || t.isCompleted()) {
+			transition.set(null);
+		}
 		
 		g.popClip(key);
@@ -1424,4 +1499,5 @@
 		}
 
+		@Override
 		public void run()
 		{
