Index: trunk/src/org/apollo/gui/OverdubbedFrameTimeAxis.java
===================================================================
--- trunk/src/org/apollo/gui/OverdubbedFrameTimeAxis.java	(revision 1059)
+++ trunk/src/org/apollo/gui/OverdubbedFrameTimeAxis.java	(revision 1102)
@@ -1,14 +1,3 @@
 package org.apollo.gui;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.Rectangle;
-import java.awt.Stroke;
-import java.awt.event.ComponentEvent;
-import java.awt.event.ComponentListener;
-
-import javax.swing.SwingUtilities;
 
 import org.apollo.audio.util.Timeline;
@@ -16,8 +5,16 @@
 import org.apollo.mvc.Subject;
 import org.apollo.mvc.SubjectChangedEvent;
+import org.expeditee.core.Colour;
+import org.expeditee.core.Dimension;
+import org.expeditee.core.Fill;
+import org.expeditee.core.Point;
+import org.expeditee.core.Stroke;
+import org.expeditee.core.bounds.AxisAlignedBoxBounds;
+import org.expeditee.gio.EcosystemManager;
+import org.expeditee.gio.GraphicsManager;
+import org.expeditee.gio.InputManager.WindowEventListener;
+import org.expeditee.gio.InputManager.WindowEventType;
 import org.expeditee.gui.Browser;
-import org.expeditee.gui.DisplayIO;
-import org.expeditee.gui.FrameGraphics;
-import org.expeditee.gui.MessageBay;
+import org.expeditee.gui.DisplayController;
 
 /**
@@ -30,5 +27,5 @@
 
 	private TimeAxis timeAxis = null;
-	private Rectangle lastInvalidated;
+	private AxisAlignedBoxBounds lastInvalidated;
 	private Timeline lastTimeline = null;
 
@@ -36,11 +33,10 @@
 
 	private static final int GLOBAL_TIMELINE_HEIGHT = 30;
-	private static final Color GLOBAL_TIMELINE_BACKCOLOR = new Color(220, 220, 220, 100);
-	private static final Color GLOBAL_EMPTY_TIMELINE_BACKCOLOR = new Color(240, 240, 240, 100);
+	private static final Colour GLOBAL_TIMELINE_BACKCOLOR = Colour.FromRGBA255(220, 220, 220, 100);
+	private static final Colour GLOBAL_EMPTY_TIMELINE_BACKCOLOR = Colour.FromRGBA255(240, 240, 240, 100);
 	
-	public static final Stroke TRACK_TIMELINE_STROKE = new BasicStroke(
-			1.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL, 0.0f, new float[] { 5.0f, 5.0f }, 0.0f);
+	public static final Stroke TRACK_TIMELINE_STROKE = new Stroke(1.0f, Stroke.CAP.SQUARE, Stroke.JOIN.BEVEL, new float[] { 5.0f, 5.0f }, 0.0f);
 	
-	private static final Stroke TIMELINE_BORDER_STROKE = new BasicStroke(1.0f);
+	private static final Stroke TIMELINE_BORDER_STROKE = new Stroke(1.0f);
 			
 	/**
@@ -54,27 +50,10 @@
 		
 		// Listen for resize events
-		SwingUtilities.invokeLater(new Runnable() {
-			public void run() {
-
-				// Keep expanded view centered to the browser window
-				if (Browser._theBrowser != null) {
-					Browser._theBrowser.addComponentListener(new ComponentListener() {
-
-						public void componentHidden(ComponentEvent e) {
-						}
-
-						public void componentMoved(ComponentEvent e) {
-						}
-
-						public void componentResized(ComponentEvent e) {
-							updateAxis();
-						}
-
-						public void componentShown(ComponentEvent e) {
-						}
-						
-					});
-				}
-				
+		EcosystemManager.getInputManager().addWindowEventListener(new WindowEventListener()
+		{
+			@Override
+			public void onWindowEvent(WindowEventType type)
+			{
+				if (type == WindowEventType.WINDOW_RESIZED) updateAxis();
 			}
 		});
@@ -113,14 +92,14 @@
 		lastTimeline = FrameLayoutDaemon.getInstance().getLastComputedTimeline();
 		if (lastTimeline == null || 
-			FrameLayoutDaemon.getInstance().getTimelineOwner() != DisplayIO.getCurrentFrame()) {
+			FrameLayoutDaemon.getInstance().getTimelineOwner() != DisplayController.getCurrentFrame()) {
 			
 			// The frame layout daemon only lays out frames once - unless the user rearranges tracks
 			// on a frame then the daemon we re-calc the timeline... thus a timeline must be infferred
 			
-			lastTimeline = FrameLayoutDaemon.inferTimeline(DisplayIO.getCurrentFrame());
+			lastTimeline = FrameLayoutDaemon.inferTimeline(DisplayController.getCurrentFrame());
 			
 			if (lastTimeline == null) { // no widgets
 				if (timeAxis != null && lastInvalidated != null) {
-					FrameGraphics.invalidateArea(lastInvalidated); // old position
+					DisplayController.invalidateArea(lastInvalidated); // old position
 				}
 				
@@ -141,51 +120,49 @@
 
 		
-		Rectangle newBounds = getCurrentTimelineArea();
+		AxisAlignedBoxBounds newBounds = getCurrentTimelineArea();
 		if (lastInvalidated != null && !lastInvalidated.equals(newBounds)) {
-			FrameGraphics.invalidateArea(lastInvalidated); // old position
+			DisplayController.invalidateArea(lastInvalidated); // old position
 		}
 		
-		FrameGraphics.invalidateArea(newBounds);
+		DisplayController.invalidateArea(newBounds);
 		
 		lastInvalidated = newBounds;
 		
-		FrameGraphics.refresh(true);
+		DisplayController.requestRefresh(true);
 		
 	}
 
-	public Rectangle getCurrentTimelineArea() {
+	public AxisAlignedBoxBounds getCurrentTimelineArea()
+	{
 		assert(Browser._theBrowser != null);
-		int y = Browser._theBrowser.getContentPane().getHeight() - GLOBAL_TIMELINE_HEIGHT;
-		if (!FrameGraphics.isAudienceMode()) {
-			y -= MessageBay.MESSAGE_BUFFER_HEIGHT;
+		int y = EcosystemManager.getGraphicsManager().getWindowSize().getHeight() - GLOBAL_TIMELINE_HEIGHT;
+		if (!DisplayController.isAudienceMode()) {
+			y -= DisplayController.getMessageBayPaintArea().getHeight();
 		}
 		
 		if (y < 0) y = 0;
 
-		return new Rectangle(0, y, Browser._theBrowser.getContentPane().getWidth(), GLOBAL_TIMELINE_HEIGHT);
+		return new AxisAlignedBoxBounds(0, y, EcosystemManager.getGraphicsManager().getWindowSize().getWidth(), GLOBAL_TIMELINE_HEIGHT);
 	}
 	
 
-	public void paint(Graphics g) {
+	public void paint()
+	{
 		if (Browser._theBrowser == null) return;
 
 		if (timeAxis != null && lastTimeline != null) {
 		
-			Rectangle r = getCurrentTimelineArea();
-
-			g.setColor(GLOBAL_EMPTY_TIMELINE_BACKCOLOR);
-			g.fillRect(0, r.y, Browser._theBrowser.getContentPane().getWidth(), r.height);
+			GraphicsManager gm = EcosystemManager.getGraphicsManager();
 			
-			timeAxis.paint(g, 
+			AxisAlignedBoxBounds r = getCurrentTimelineArea();
+			gm.drawRectangle(new Point(0, r.getMinY()), new Dimension(EcosystemManager.getGraphicsManager().getWindowSize().getWidth(), r.getHeight()), 0.0, new Fill(GLOBAL_EMPTY_TIMELINE_BACKCOLOR), null, null, null);
+			
+			timeAxis.paint( 
 					lastTimeline.getInitiationXPixel(),
-					r.y,
-					r.height, 
+					r.getMinY(),
+					r.getHeight(), 
 					GLOBAL_TIMELINE_BACKCOLOR);
 			
-			
-			g.setColor(Color.DARK_GRAY);
-			
-			((Graphics2D)g).setStroke(TIMELINE_BORDER_STROKE);
-			g.drawLine(0, r.y, Browser._theBrowser.getContentPane().getWidth(), r.y);
+			gm.drawLine(new Point(0, r.getMinY()), new Point(EcosystemManager.getGraphicsManager().getWindowSize().getWidth(), r.getMinY()), Colour.DARK_GREY, TIMELINE_BORDER_STROKE);
 	
 		}
