[Tynstep-svn] r12 - in trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client: . widgets widgets/timeline

ChrisBurrell at crosswire.org ChrisBurrell at crosswire.org
Tue Nov 3 15:34:07 MST 2009


Author: ChrisBurrell
Date: 2009-11-03 15:34:07 -0700 (Tue, 03 Nov 2009)
New Revision: 12

Added:
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandInfo.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandInfoImpl.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandOptions.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandOptionsImpl.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/ClientSizeHelper.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/DateTime.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/DateTimeImpl.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/EventSource.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/EventSourceImpl.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/HotZoneBandOptions.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/HotZoneBandOptionsImpl.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/ITimeLineRender.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/JavaScriptObjectHelper.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecorator.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecoratorImpl.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecoratorOptions.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecoratorOptionsImpl.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecorator.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecoratorImpl.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecoratorOptions.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecoratorOptionsImpl.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/Theme.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/ThemeImpl.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLine.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLineImpl.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLineWidget.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimelineXMLHandler.java
Log:


Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandInfo.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandInfo.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandInfo.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import java.util.List;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+/**
+ * BandInfo
+ *
+ * @author ajr
+ */
+public class BandInfo extends JavaScriptObject
+{
+    protected BandInfo()
+    {
+        super();
+    }
+    
+    public static BandInfo create(BandOptions options)
+    {
+        return BandInfoImpl.create(options);
+    }
+
+    public static BandInfo createHotZone(BandOptions options)
+    {
+        return BandInfoImpl.createHotZone(options);
+    }
+    
+    public final void setSyncWith(int value)
+    {
+        BandInfoImpl.setSyncWith(this, value);
+    }
+
+    public final void setHighlight(boolean value)
+    {
+        BandInfoImpl.setHighlight(this, value);
+    }
+
+    /**
+     * optional, Set decorator list
+     * 
+     * @param decorators
+     */
+    public final void setDecorators(List decorators)
+    {
+    	JavaScriptObject[] decoratorArr = JavaScriptObjectHelper.listToArray(decorators);
+
+        JavaScriptObject jarr = JavaScriptObjectHelper.arrayConvert(decoratorArr);
+
+        BandInfoImpl.setDecorators(this, jarr);
+    }
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandInfoImpl.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandInfoImpl.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandInfoImpl.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+/**
+ * BandInfoImpl
+ * 
+ * @author ajr
+ *
+ */
+class BandInfoImpl
+{
+    // -------------------------------------------------------------------
+    // Band
+    // -------------------------------------------------------------------
+
+    public native static BandInfo create(BandOptions options) /*-{
+        return $wnd.Timeline.createBandInfo(options)
+    }-*/;
+    
+    public native static BandInfo createHotZone(BandOptions options) /*-{
+        return $wnd.Timeline.createHotZoneBandInfo(options)
+    }-*/;
+    
+    public native static void setSyncWith(BandInfo band, int index) /*-{
+        band.syncWith = index;
+    }-*/;
+    
+    public native static void setHighlight(BandInfo band, boolean value) /*-{
+        band.highlight = value;
+    }-*/;
+
+    public native static void setDecorators(BandInfo band, JavaScriptObject value) /*-{
+        band.decorators = value;
+    }-*/;
+    
+}
\ No newline at end of file

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandOptions.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandOptions.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandOptions.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,209 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import java.util.List;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+
+/**
+ * BandOptions
+ *
+ * @author ajr
+ */
+public class BandOptions extends JavaScriptObject
+{
+    protected BandOptions()
+    {
+        super();
+    }
+
+    public static BandOptions create()
+    {
+        return BandOptionsImpl.create();
+    }
+
+    /**
+     * how much of the timeline's space this band takes up, expressed as a percent in a string, e.g., "30%"
+     *
+     */
+    public final String getWidth()
+    {
+        return JavaScriptObjectHelper.getAttribute(this, "width");
+    }
+
+    /**
+     * required, how much of the timeline's space this band takes up, expressed as a percent in a string, e.g., "30%"
+     */
+    public final void setWidth(String width)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "width", width);
+    }
+
+    /**
+     * a time unit from Timeline.DateTime, e.g., Timeline.DateTime.WEEK.
+     *
+     */
+    public final int getIntervalUnit()
+    {
+        return JavaScriptObjectHelper.getAttributeAsInt(this, "intervalUnit");
+    }
+
+    /**
+     * required, a time unit from Timeline.DateTime, e.g., Timeline.DateTime.WEEK.
+     */
+    public final void setIntervalUnit(int value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "intervalUnit", value);
+    }
+
+    /**
+     * the number of pixels that the time unit above is mapped to, e.g., 100.
+     *
+     */
+    public final int getIntervalPixels()
+    {
+        return JavaScriptObjectHelper.getAttributeAsInt(this, "intervalPixels");
+    }
+
+    /**
+     * required, the number of pixels that the time unit above is mapped to, e.g., 100.
+     */
+    public final void setIntervalPixels(int value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "intervalPixels", value);
+    }
+
+    /**
+     * a boolean specifying whether event titles are to be painted. The default is true. 
+     *
+     */
+    public final boolean getShowEventText()
+    {
+        return JavaScriptObjectHelper.getAttributeAsBoolean(this, "showEventText");
+    }
+
+    /**
+     * optional, a boolean specifying whether event titles are to be painted. The default is true.
+     */
+    public final void setShowEventText(boolean value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "showEventText", value);
+    }
+    
+    /**
+     * the number of em  (dependent on the current font) to be left between adjacent
+     * tracks on which events are painted. The default value is retrieved from the provided or 
+     * default theme. E.g., 0.5.
+     *
+     */
+    public final float getTrackGap()
+    {
+        return JavaScriptObjectHelper.getAttributeAsFloat(this, "trackGap");
+    }
+
+    /**
+     * optional, the number of em  (dependent on the current font) to be left between adjacent
+     * tracks on which events are painted. The default value is retrieved from the provided or 
+     * default theme. E.g., 0.5.
+     */
+    public final void setTrackGap(float value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "trackGap", value);
+    }
+
+    /**
+     * the height of each track in em  (dependent on the current font). 
+     * The default value is retrieved from the provided or default theme. E.g., 1.5.
+     *
+     */
+    public final float getTrackHeight()
+    {
+        return JavaScriptObjectHelper.getAttributeAsFloat(this, "trackHeight");
+    }
+
+    /**
+     * optional, the height of each track in em  (dependent on the current font). 
+     * The default value is retrieved from the provided or default theme. E.g., 1.5.
+     */
+    public final void setTrackHeight(float value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "trackHeight", value);
+    }
+
+    /**
+     * required, Band theme
+     */
+    public final void setTheme(Theme value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "theme", value);
+    }
+
+    /**
+     * Band theme
+     */
+    public final JavaScriptObject getTheme()
+    {
+        return JavaScriptObjectHelper.getAttributeAsJavaScriptObject(this, "theme");
+    }
+
+    /**
+     * required, Event source
+     */
+    public final void setEventSource(EventSource value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "eventSource", value);
+    }
+
+    /**
+     * Event source
+     */
+    public final JavaScriptObject getEventSource()
+    {
+        return JavaScriptObjectHelper.getAttributeAsJavaScriptObject(this, "eventSource");
+    }
+
+    /**
+     * optional, set date
+     */
+    public final void setDate(String value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "date", value);
+    }
+
+    /**
+     * optional, set time zone
+     */
+    public final void setTimeZone(int value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "timeZone", value);
+    }
+    
+    /**
+     * optional, set hot zones
+     */
+    public final void setZones(List zones)
+    {
+    	JavaScriptObject[] zonesArr = JavaScriptObjectHelper.listToArray(zones);
+
+        JavaScriptObject jarr = JavaScriptObjectHelper.arrayConvert(zonesArr);
+
+        JavaScriptObjectHelper.setAttribute(this, "zones", jarr);
+    }
+    
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandOptionsImpl.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandOptionsImpl.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandOptionsImpl.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+/**
+ * BandOptionsImpl
+ * 
+ * @author ajr
+ *
+ */
+class BandOptionsImpl
+{
+    public static native BandOptions create()/*-{
+        return new Object;
+    }-*/;
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/ClientSizeHelper.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/ClientSizeHelper.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/ClientSizeHelper.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+/**
+ * Provides rtns to return client browser size.
+ *
+ */
+public class ClientSizeHelper
+{
+    /**
+     * Gets the width of the browser window's client area.
+     *
+     * @return the window's client width
+     */
+    public static native int getClientWidth() /*-{
+	    var clientWidth = 0;
+	    if( typeof( $wnd.innerWidth ) == 'number' )
+	    {
+		    //Non-IE
+		    clientWidth = $wnd.innerWidth;
+	    }
+	    else if( $doc.documentElement && ( $doc.documentElement.clientWidth || $doc.documentElement.clientHeight ) )
+	    {
+		    //IE 6+ in 'standards compliant mode'
+		    clientWidth = $doc.documentElement.clientWidth;
+	    }
+	    else if( $doc.body && ( $doc.body.clientWidth || $doc.clientHeight ) )
+	    {
+		    //IE 4 compatible
+		    clientWidth = $doc.body.clientWidth;
+	    }
+	
+	    return clientWidth;
+    }-*/;
+
+    /**
+     * Gets the height of the browser window's client area.
+     *
+     * @return the window's client height
+     */
+    public static native int getClientHeight() /*-{
+	    var clientHeight = 0;
+	    if( typeof( $wnd.innerWidth ) == 'number' )
+	    {
+		    //Non-IE
+		    clientHeight = $wnd.innerHeight;
+	    }
+	    else if( $doc.documentElement && ( $doc.documentElement.clientWidth || $doc.documentElement.clientHeight ) )
+	    {
+		    //IE 6+ in 'standards compliant mode'
+		    clientHeight = $doc.documentElement.clientHeight;
+	    }
+	    else if( $doc.body && ( $doc.body.clientWidth || $doc.body.clientHeight ) )
+	    {
+		    //IE 4 compatible
+		    clientHeight = $doc.body.clientHeight;
+	    }
+	
+	    return clientHeight;
+    }-*/;
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/DateTime.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/DateTime.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/DateTime.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+
+/**
+ * DateTime constants
+ *
+ * @author ajr
+ *
+ */
+public class DateTime
+{
+    public static int MILLISECOND()
+    {
+        return DateTimeImpl.MILLISECOND();
+    }
+
+    public static int SECOND()
+    {
+        return DateTimeImpl.SECOND();
+    }
+
+    public static int MINUTE()
+    {
+        return DateTimeImpl.MINUTE();
+    }
+
+    public static int HOUR()
+    {
+        return DateTimeImpl.HOUR();
+    }
+
+    public static int DAY()
+    {
+        return DateTimeImpl.DAY();
+    }
+
+    public static int WEEK()
+    {
+        return DateTimeImpl.WEEK();
+    }
+
+    public static int MONTH()
+    {
+        return DateTimeImpl.MONTH();
+    }
+
+    public static int YEAR()
+    {
+        return DateTimeImpl.YEAR();
+    }
+
+    public static int DECADE()
+    {
+        return DateTimeImpl.DECADE();
+    }
+
+    public static int CENTURY()
+    {
+        return DateTimeImpl.CENTURY();
+    }
+
+    public static int MILLENNIUM()
+    {
+        return DateTimeImpl.MILLENNIUM();
+    }
+
+    public static int EPOCH()
+    {
+        return DateTimeImpl.EPOCH();
+    }
+
+    public static int ERA()
+    {
+        return DateTimeImpl.ERA();
+    }
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/DateTimeImpl.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/DateTimeImpl.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/DateTimeImpl.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+/**
+ * DateTimeImpl returns actual values from javascript.
+ * 
+ * @author ajr
+ *
+ */
+class DateTimeImpl
+{
+    public native static int MILLISECOND()/*-{
+        return $wnd.Timeline.DateTime.MILLISECOND;
+    }-*/;
+
+    public native static int SECOND()/*-{
+    	return $wnd.Timeline.DateTime.SECOND;
+    }-*/;
+    
+    public native static int MINUTE()/*-{
+    	return $wnd.Timeline.DateTime.MINUTE;
+    }-*/;
+    
+    public native static int HOUR()/*-{
+    	return $wnd.Timeline.DateTime.HOUR;
+    }-*/;
+
+    public native static int DAY()/*-{
+    	return $wnd.Timeline.DateTime.DAY;
+    }-*/;
+
+    public native static int WEEK()/*-{
+    	return $wnd.Timeline.DateTime.WEEK;
+    }-*/;
+    
+    public native static int MONTH()/*-{
+    	return $wnd.Timeline.DateTime.MONTH;
+    }-*/;
+    
+    public native static int YEAR()/*-{
+    	return $wnd.Timeline.DateTime.YEAR;
+    }-*/;
+    
+    public native static int DECADE()/*-{
+    	return $wnd.Timeline.DateTime.DECADE;
+    }-*/;
+    
+    public native static int CENTURY()/*-{
+    	return $wnd.Timeline.DateTime.CENTURY;
+    }-*/;
+    
+    public native static int MILLENNIUM()/*-{
+    	return $wnd.Timeline.DateTime.MILLENNIUM;
+    }-*/;
+
+    public native static int EPOCH()/*-{
+    	return $wnd.Timeline.DateTime.EPOCH;
+    }-*/;
+
+    public native static int ERA()/*-{
+    	return $wnd.Timeline.DateTime.ERA;
+    }-*/;
+    
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/EventSource.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/EventSource.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/EventSource.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * JSON handling contributed jdwyah, Feb 26, 2007.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.JavaScriptObject;
+
+/**
+ * EventSource
+ *
+ * @author ajr
+ */
+public class EventSource extends JavaScriptObject
+{
+    protected EventSource()
+    {
+        super();
+    }
+
+    public static EventSource create()
+    {
+        return EventSourceImpl.createEventSourceObject();
+    }
+    
+    /**
+     * Load data stream into timeline event source
+     * @param dataUrl
+     */
+    public final void loadXML(String dataUrl)
+    {
+        EventSourceImpl.loadXML(dataUrl, this);
+    }
+
+    /**
+     * Load xml string directly into source
+     * 
+     * @param dataUrl
+     */
+    public final void loadXMLText(String xmlText)
+    {
+        EventSourceImpl.loadXMLText(xmlText, GWT.getModuleBaseURL(), this);
+    }
+    
+    /**
+     * Load json string directly into source
+     *  
+     * @param json
+     */
+    public final void loadJSON(String json) 
+    {
+		EventSourceImpl.loadJSON(json, GWT.getModuleBaseURL(),this);
+	}
+    
+    /**
+     * Load data stream into timeline event source
+     * @param dataUrl
+     */
+    public final void load(JavaScriptObject xml, String url)
+    {
+        EventSourceImpl.loadXML(xml, url, this);
+    }
+    
+
+    public final void clear()
+    {
+        EventSourceImpl.clear(this);
+    }
+    
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/EventSourceImpl.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/EventSourceImpl.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/EventSourceImpl.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * JSON handling contributed jdwyah, Feb 26, 2007.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+/**
+ * EventSourceImpl
+ * 
+ * @author ajr
+ *
+ */
+class EventSourceImpl
+{
+    // -------------------------------------------------------------------
+    // EventSource
+    // -------------------------------------------------------------------
+    
+    public native static EventSource createEventSourceObject() /*-{
+        var source = new $wnd.Timeline.DefaultEventSource();
+        return source;
+    }-*/;
+
+    public native static void clear(EventSource source) /*-{
+        source.clear();
+    }-*/;
+
+    public native static void loadXML(JavaScriptObject xml, String url, EventSource source) /*-{
+    	source.loadXML(xml, url);
+    }-*/;
+
+    public native static void loadXMLText(String xml, String url, EventSource source) /*-{
+		var xmlDoc = $wnd.TimelineHelper.parseXML(xml);
+		
+		source.loadXML(xmlDoc, url);
+	}-*/;
+    
+    public native static void loadXML(String dataUrl, EventSource eventSource) /*-{
+        $wnd.Timeline.loadXML(dataUrl, function(xml, url) { eventSource.loadXML(xml, url); });
+    }-*/;
+
+    public native static void loadJSON(String jsonString,String url,EventSource eventSource)/*-{
+		var jsonData = eval('(' + jsonString + ')');
+		eventSource.loadJSON(jsonData, url);	
+	}-*/;
+    
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/HotZoneBandOptions.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/HotZoneBandOptions.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/HotZoneBandOptions.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+
+/**
+ * BandOptions
+ *
+ * @author ajr
+ */
+public class HotZoneBandOptions extends JavaScriptObject
+{
+    protected HotZoneBandOptions()
+    {
+        super();
+    }
+
+    public static HotZoneBandOptions create()
+    {
+        return HotZoneBandOptionsImpl.create();
+    }
+
+    /**
+     * required, a String or a Date object that specifies the beginning date/time of the zone. It is parsed by Timeline.DateTime.parseGregorianDateTime()  
+     * to get a Date object.
+     */
+    public final void setStart(String value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "start", value);
+    }
+
+    /**
+     * required, a String or a Date object that specifies the ending date/time of the zone. It is parsed by Timeline.DateTime.parseGregorianDateTime()  
+     * to get a Date object.
+     */
+    public final void setEnd(String value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "end", value);
+    }
+
+    /**
+     * required, a number specifying the magnification of the mapping in this zone. A greater-than-1 number causes more pixels to be mapped 
+     * to the same time interval, resulting in a zoom-in effect.
+     */
+    public final void setMagnify(int value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "magnify", value);
+    }
+
+    /**
+     * required, one of the Gregorian calendar unit defined in Timeline.DateTime, e.g., Timeline.DateTime.MINUTE. This argument specifies 
+     * the interval at which ticks and labels are painted on the band's background inside this hot-zone..
+     */
+    public final void setUnit(int value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "unit", value);
+    }
+    
+    /**
+     * optional, default to 1. A label is painted for every multiple of unit. For example, if unit is Timeline.DateTime.MINUTE and 
+     * multiple is 15, then there is a label for every 15 minutes (i.e., 15, 30, 45,...). 
+     */
+    public final void setMultiple(int value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "multiple", value);
+    }
+        
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/HotZoneBandOptionsImpl.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/HotZoneBandOptionsImpl.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/HotZoneBandOptionsImpl.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+/**
+ * BandOptionsImpl
+ * 
+ * @author ajr
+ *
+ */
+class HotZoneBandOptionsImpl
+{
+    public static native HotZoneBandOptions create()/*-{
+        return new Object;
+    }-*/;
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/ITimeLineRender.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/ITimeLineRender.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/ITimeLineRender.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+public interface ITimeLineRender
+{
+	public void render(TimeLineWidget widget);
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/JavaScriptObjectHelper.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/JavaScriptObjectHelper.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/JavaScriptObjectHelper.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,192 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import java.util.List;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+
+/**
+ * This class originally from algaforge GWT wrapper around the Google Map API.
+ * It has been extended to handle float attributes.
+ * 
+ */
+class JavaScriptObjectHelper
+{
+
+	private JavaScriptObjectHelper()
+	{
+		
+	}
+	
+	public static native String getAttribute(JavaScriptObject elem, String attr) /*-{
+	    var ret = elem[attr];
+	    return (ret === undefined) ? null : String(ret);
+	}-*/;
+	
+	public static native void setAttribute(JavaScriptObject elem, String attr, String value) /*-{
+	    elem[attr] = value;
+	}-*/;
+	
+	public static native JavaScriptObject getAttributeAsJavaScriptObject(JavaScriptObject elem, String attr) /*-{
+    var ret = elem[attr];
+    return (ret === undefined) ? null : ret;
+    }-*/;
+
+	public static native JavaScriptObject[] getAttributeAsJavaScriptObjectArray(JavaScriptObject elem, String attr) /*-{
+    	var ret = elem[attr];
+    	return (ret === undefined) ? null : ret;
+    }-*/;
+	
+	public static native void setAttribute(JavaScriptObject elem, String attr, JavaScriptObject[] value) /*-{
+		elem[attr] = value;
+	}-*/;
+	
+	public static native void setAttribute(JavaScriptObject elem, String attr, JavaScriptObject value) /*-{
+    	elem[attr] = value;
+    }-*/;
+	
+	public static native void setAttribute(JavaScriptObject elem, String attr, int value) /*-{
+    	elem[attr] = value;
+    }-*/;
+
+	public static native void setAttribute(JavaScriptObject elem, String attr, boolean value) /*-{
+		elem[attr] = value;
+	}-*/;
+
+    public static native void setAttribute(JavaScriptObject elem, String attr, float value) /*-{
+        elem[attr] = value;
+    }-*/;
+    
+	public static native int getAttributeAsInt(JavaScriptObject elem, String attr) /*-{
+    	var ret = elem[attr];
+    	return (ret === undefined) ? null : ret;
+    }-*/;
+
+    public static native float getAttributeAsFloat(JavaScriptObject elem, String attr) /*-{
+        var ret = elem[attr];
+        return (ret === undefined) ? null : ret;
+    }-*/;
+    
+	public static int[] getAttributeAsIntArray(JavaScriptObject elem, String attr)
+	{
+		int[] rtn = null;
+		JavaScriptObject hold = getAttributeAsJavaScriptObject(elem, attr);
+		if (hold != null)
+		{
+			rtn = new int[getJavaScriptObjectArraySize(hold)];
+			
+			for(int i = 0; i < rtn.length; i++)
+			{
+				rtn[i] = getIntValueFromJavaScriptObjectArray(hold, i);
+			}
+		}
+		
+		return rtn;
+	}
+	
+	
+	public static native int getJavaScriptObjectArraySize(JavaScriptObject elem) /*-{
+		if (elem) return elem.length;
+		return 0;
+	}-*/;
+	
+	public static native int getIntValueFromJavaScriptObjectArray(JavaScriptObject elem, int i) /*-{
+		return elem[i];
+	}-*/;
+	
+	public static native void setAttributeAsIntArray(JavaScriptObject elem, String attr, int[] value) /*-{
+    	elem[attr] = value;
+    }-*/;
+	
+	public static native boolean getAttributeAsBoolean(JavaScriptObject elem, String attr) /*-{
+    	var ret = elem[attr];
+    	return (ret === undefined) ? null : ret;
+    }-*/;
+	
+
+    /**
+     * Helper function to create [] array from List.
+     * 
+     * @param list
+     * 
+     * @return array of objects
+     */
+    public static JavaScriptObject[] listToArray(List list)
+    {
+    	JavaScriptObject[] array = new JavaScriptObject[list.size()];
+
+        for (int i = 0; i < array.length; i++)
+        {
+            array[i] = (JavaScriptObject)list.get(i);
+        }
+
+        return array;
+    }
+	
+	public static JavaScriptObject arrayConvert(Object[] array) 
+	{ 
+        JavaScriptObject result = newJSArray(array.length); 
+        for (int i = 0; i < array.length; i++) 
+        { 
+                arraySet(result, i, array[i]); 
+        } 
+        return result; 
+	} 
+
+	
+	public static JavaScriptObject arrayConvert(JavaScriptObject[] array) 
+	{ 
+        JavaScriptObject result = newJSArray(array.length); 
+        for (int i = 0; i < array.length; i++) 
+        { 
+                arraySet(result, i, array[i]); 
+        } 
+        return result; 
+	} 
+
+	private static native JavaScriptObject newJSArray(int length) /*-{ 
+	    if (length < 0) 
+	    { 
+	            return new Array(); 
+	    } 
+	    else 
+	    { 
+	            return new Array(length); 
+	    } 
+	}-*/;
+
+	public static native int arrayLength(JavaScriptObject array) /*-{ 
+	        return array.length;
+	}-*/; 
+
+
+	public static native Object arrayGetObject(JavaScriptObject array, int index) /*-{ 
+	        return array[index]; 
+	}-*/; 
+
+	public static native void arraySet(JavaScriptObject array, int index, Object value) /*-{ 
+    	array[index] = value; 
+    
+	}-*/; 
+
+	public static native void arraySet(JavaScriptObject array, int index, JavaScriptObject value) /*-{ 
+	        array[index] = value; 
+
+	}-*/; 
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecorator.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecorator.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecorator.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+
+/**
+ * PointHighlightDecorator
+ *
+ * @author ajr
+ */
+public class PointHighlightDecorator extends JavaScriptObject
+{
+    protected PointHighlightDecorator()
+    {
+        super();
+    }
+
+    public static PointHighlightDecorator create(PointHighlightDecoratorOptions options)
+    {
+        return PointHighlightDecoratorImpl.create(options);
+    }
+
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecoratorImpl.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecoratorImpl.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecoratorImpl.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+/**
+ * PointHighlightDecoratorImpl
+ * 
+ * @author ajr
+ *
+ */
+class PointHighlightDecoratorImpl
+{
+    public static native PointHighlightDecorator create(PointHighlightDecoratorOptions options)/*-{
+        return new $wnd.Timeline.PointHighlightDecorator(options);
+    }-*/;
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecoratorOptions.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecoratorOptions.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecoratorOptions.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+
+/**
+ * BandOptions
+ *
+ * @author ajr
+ */
+public class PointHighlightDecoratorOptions extends JavaScriptObject
+{
+    protected PointHighlightDecoratorOptions()
+    {
+        super();
+    }
+
+    public static PointHighlightDecoratorOptions create()
+    {
+        return PointHighlightDecoratorOptionsImpl.create();
+    }
+    
+    /**
+     * required, date
+     * 
+     * @param value
+     */
+    public final void setDate(String value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "date", value);
+    }
+
+    /**
+     * required, color
+     * 
+     * @param value
+     */
+    public final void setColor(String value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "color", value);
+    }
+
+    /**
+     * required, opacity
+     * 
+     * @param value
+     */
+    public final void setOpacity(int value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "opacity", value);
+    }
+
+    /**
+     * required, Band theme
+     * 
+     * @param value
+     */
+    public final void setTheme(Theme value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "theme", value);
+    }
+
+    
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecoratorOptionsImpl.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecoratorOptionsImpl.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecoratorOptionsImpl.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+/**
+ * BandOptionsImpl
+ * 
+ * @author ajr
+ *
+ */
+class PointHighlightDecoratorOptionsImpl
+{
+    public static native PointHighlightDecoratorOptions create()/*-{
+        return new Object;
+    }-*/;
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecorator.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecorator.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecorator.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+
+/**
+ * SpanHighlightDecorator
+ *
+ * @author ajr
+ */
+public class SpanHighlightDecorator extends JavaScriptObject
+{
+    protected SpanHighlightDecorator()
+    {
+        super();
+    }
+
+    public static SpanHighlightDecorator create(SpanHighlightDecoratorOptions options)
+    {
+        return SpanHighlightDecoratorImpl.create(options);
+    }
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecoratorImpl.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecoratorImpl.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecoratorImpl.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+/**
+ * SpanHighlightDecoratorImpl
+ * 
+ * @author ajr
+ *
+ */
+class SpanHighlightDecoratorImpl
+{
+    public static native SpanHighlightDecorator create(SpanHighlightDecoratorOptions options)/*-{
+        return new $wnd.Timeline.SpanHighlightDecorator(options);
+    }-*/;
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecoratorOptions.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecoratorOptions.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecoratorOptions.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+
+/**
+ * BandOptions
+ *
+ * @author ajr
+ */
+public class SpanHighlightDecoratorOptions extends JavaScriptObject
+{
+    protected SpanHighlightDecoratorOptions()
+    {
+        super();
+    }
+
+    public static SpanHighlightDecoratorOptions create()
+    {
+        return SpanHighlightDecoratorOptionsImpl.create();
+    }
+
+    /**
+     * required, start date
+     * 
+     * @param value
+     */
+    public final void setStartDate(String value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "startDate", value);
+    }
+
+    /**
+     * required, end date
+     * 
+     * @param value
+     */
+    public final void setEndDate(String value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "endDate", value);
+    }
+
+    /**
+     * required, color
+     * 
+     * @param value
+     */
+    public final void setColor(String value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "color", value);
+    }
+
+    /**
+     * required, opacity
+     * 
+     * @param value
+     */
+    public final void setOpacity(int value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "opacity", value);
+    }
+
+    /**
+     * required, start label
+     * 
+     * @param value
+     */
+    public final void setStartLabel(String value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "startLabel", value);
+    }
+    
+    /**
+     * required, end label
+     * 
+     * @param value
+     */
+    public final void setEndLabel(String value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "endLabel", value);
+    }
+
+    /**
+     * required, Band theme
+     * 
+     * @param value
+     */
+    public final void setTheme(Theme value)
+    {
+        JavaScriptObjectHelper.setAttribute(this, "theme", value);
+    }
+    
+    
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecoratorOptionsImpl.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecoratorOptionsImpl.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecoratorOptionsImpl.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+/**
+ * BandOptionsImpl
+ * 
+ * @author ajr
+ *
+ */
+class SpanHighlightDecoratorOptionsImpl
+{
+    public static native SpanHighlightDecoratorOptions create()/*-{
+        return new Object;
+    }-*/;
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/Theme.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/Theme.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/Theme.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+/**
+ * Theme, currently only creates the classic theme.
+ *
+ * @author ajr
+ */
+public class Theme extends JavaScriptObject
+{
+    protected Theme()
+    {
+        super();
+    }
+    
+    public static Theme create()
+    {
+        return ThemeImpl.create();
+    }
+
+    public final void setEventLabelWidth(int width)
+    {
+        ThemeImpl.setEventLabelWidth(this, width);
+    }
+        
+    
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/ThemeImpl.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/ThemeImpl.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/ThemeImpl.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+/**
+ * ThemeImpl
+ * 
+ * @author ajr
+ *
+ */
+class ThemeImpl
+{
+    // -------------------------------------------------------------------
+    // Theme
+    // -------------------------------------------------------------------
+    
+    public native static Theme create() /*-{
+        var theme = $wnd.Timeline.ClassicTheme.create();
+        theme.event.label.width = 400; // default px 
+        return theme;
+    }-*/;
+
+    public native static void setEventLabelWidth(Theme theme, int width) /*-{
+        theme.event.label.width = width; // px 
+    }-*/;
+    
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLine.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLine.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLine.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.ui.UIObject;
+
+import java.util.List;
+
+
+/**
+ * TimeLine
+ *
+ * @author ajr
+ */
+public class TimeLine extends JavaScriptObject
+{
+    protected TimeLine()
+    {
+        super();
+    }
+
+    /**
+     * Create TimeLine object
+     */
+    public static TimeLine create(List bands, EventSource source, Element divElement, Element clientElement)
+    {
+    	JavaScriptObject[] bandArr = JavaScriptObjectHelper.listToArray(bands);
+
+        JavaScriptObject jarr = JavaScriptObjectHelper.arrayConvert(bandArr);
+
+        boolean currVisible = UIObject.isVisible(clientElement);
+        UIObject.setVisible(clientElement, true);
+        
+        TimeLine timeLine = TimeLineImpl.create(jarr, divElement);
+
+        UIObject.setVisible(clientElement, currVisible);
+        
+        return timeLine;
+    	
+    }
+    
+
+
+    /**
+     * Redraw timeline 
+     *
+     */
+    public final void layout()
+    {
+        TimeLineImpl.layout(this);
+    }
+
+    /**
+     * loadXML through handler function.
+     * 
+     * @param dataUrl
+     * @param handler
+     */
+    public final void loadXML(String dataUrl, TimelineXMLHandler handler)
+    {
+        TimeLineImpl.loadXML(dataUrl, handler);
+    }
+ 
+    /**
+     * Close info bubble for indicated band
+     * @param index
+     */
+    public final void closeBubble(int index)
+    {
+    	TimeLineImpl.closeBubble(index, this);
+    }
+    
+    
+    public final void addOnScrollEvent(int index, TimelineXMLHandler handler) {
+    	TimeLineImpl.addOnScrollListener(index, this, handler);	
+    }
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLineImpl.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLineImpl.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLineImpl.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.user.client.Element;
+
+/**
+ * TimeLineImpl
+ * 
+ * @author ajr
+ *
+ */
+class TimeLineImpl
+{
+    // -------------------------------------------------------------------
+    // Timeline
+    // -------------------------------------------------------------------
+
+    public native static TimeLine create(JavaScriptObject bands, Element divElement) /*-{
+        return $wnd.Timeline.create(divElement, bands);
+    }-*/;
+
+    public native static void loadXML(String dataUrl, TimelineXMLHandler handler) /*-{
+	    $wnd.Timeline.loadXML(dataUrl, function(xml, url) { handler. at com.tyndalehouse.step.web.client.widgets.timeline.TimelineXMLHandler::onCompletion(Lcom/google/gwt/core/client/JavaScriptObject;Ljava/lang/String;)(xml,url) });
+	}-*/;
+
+    public native static int getBandCount(TimeLine timeLine) /*-{
+        return timeLine.getBandCount();
+    }-*/;
+    
+    public native static void layout(TimeLine timeLine) /*-{
+        timeLine.layout();
+    }-*/;
+
+    public native static void closeBubble(int index, TimeLine timeLine) /*-{
+        timeLine.getBand(index).closeBubble();
+    }-*/;
+
+    //addition
+    //TODO: change interface to something nicer?
+    public native static void addOnScrollListener(int index, TimeLine timeLine, TimelineXMLHandler handler) /*-{
+		timeLine.getBand(index).addOnScrollListener(function() { handler. at com.tyndalehouse.step.web.client.widgets.timeline.TimelineXMLHandler::onScroll(Ljava/lang/String;Ljava/lang/String;)(timeLine.getBand(index).getMinVisibleDate().getTime().toString(), timeLine.getBand(index).getMaxVisibleDate().getTime().toString()) });
+    }-*/;
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLineWidget.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLineWidget.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLineWidget.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,267 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import java.util.ArrayList;
+
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.ui.UIObject;
+import com.google.gwt.user.client.ui.Widget;
+
+
+/**
+ * The SIMILE Timeline Widget
+ * <br/>Example:
+ * <br/>TimeLineWidget simWidget = new SimileWidget(e);
+ * <br/>
+ * <br/>access the Simile object by:
+ * <br/>Simile sim = simWidget.getTimeLine();
+ *
+ * @author ajr
+ *
+ */
+public class TimeLineWidget extends Widget
+{
+    private EventSource eventSource = null;
+    private Theme theme = null; 
+    private ArrayList bandInfos = null;
+    private ArrayList bandHotZones = null;
+    private ArrayList bandDecorators = null;
+    private TimeLine timeLine = null;
+    private Element divElement = null;
+    private ITimeLineRender renderer = null;
+
+    /**
+     * Create timeline elements and assign renderer. The renderer must implement 
+     * the ITimeLineRender interface 'render' function which manipulates
+     * the widget timeline elements to make the timeline.
+     * 
+     * @param height
+     * @param width
+     * @param render
+     * @param timeline2 
+     */
+    public TimeLineWidget(String height, String width, ITimeLineRender render)
+    {
+        // ---------------------------------------------------------------
+    	// Bands
+        // ---------------------------------------------------------------
+        bandInfos = new ArrayList();
+        bandHotZones = new ArrayList();
+        bandDecorators = new ArrayList();
+
+        // ---------------------------------------------------------------
+        // Create Theme object
+        // ---------------------------------------------------------------
+        theme = createTheme();
+        theme.setEventLabelWidth(400);
+        
+        // ---------------------------------------------------------------
+        // Event source
+        // ---------------------------------------------------------------
+        eventSource = EventSource.create();
+
+        // ---------------------------------------------------------------
+        // Create div to draw timeline into
+        // ---------------------------------------------------------------
+        divElement = DOM.createDiv();
+        setElement(divElement);
+        setHeight(height);
+        setWidth(width);
+        
+        // ---------------------------------------------------------------
+        // Set timeline render
+        // ---------------------------------------------------------------
+        this.renderer = render;
+    }
+    
+    /**
+     * Called when the element DIV is attached to the client DOM.
+     */
+    protected void onAttach() 
+    {
+        super.onAttach();
+
+        if (timeLine==null) initialise();
+    }
+    
+    /**
+     * Initialise timeline views
+     * 
+     * Took a while to figure this out but you have to set the widget width _after_
+     * it has been created in order for the timeline creation to work. 
+     *
+     */
+    public void initialise()
+    {
+    	setWidth(Integer.toString(ClientSizeHelper.getClientWidth()) + "px");
+    	setHeight(Integer.toString(ClientSizeHelper.getClientHeight()) + "px");
+    	create();
+    }
+    
+
+    /**
+     * Creates timeline, elements have to be setup prior to calling this.
+     *
+     */
+    public void create()
+    {
+        // ---------------------------------------------------------------
+        // Render timeline into this widget
+        // ---------------------------------------------------------------
+    	renderer.render(this);
+
+        // ---------------------------------------------------------------
+        // Timeline
+        // ---------------------------------------------------------------
+        timeLine = TimeLine.create(bandInfos, eventSource, divElement, getClientElement());
+    }
+
+    /**
+     * Creates default theme, override to apply your own.
+     *
+     */
+    public Theme createTheme()
+    {
+        Theme theme = Theme.create();
+
+        return theme;
+    }
+
+    /**
+     * Repaint widget
+     * 
+     */
+    public void layout()
+    {
+        if (visible())
+        {
+            getTimeLine().layout();
+        }
+    }
+
+    /**
+     * Clear display artifacts.
+     *
+     */
+    public void clearBubbles()
+    {
+        if (visible())
+        {
+            int count = bandInfos.size();
+
+            while (--count > 0)
+            {
+            	timeLine.closeBubble(count);
+            }
+        }
+        
+    }
+
+    public void clearData()
+    {
+        eventSource.clear();
+    }
+    
+    /**
+     * Load data into widget through handler.
+     *
+     * @param dataUrl
+     * @param handler
+     */
+    public void load(String dataUrl, TimelineXMLHandler handler)
+    {
+    	timeLine.loadXML(dataUrl, handler);
+    }
+
+    /**
+     * Load data into widget through EventSource object.
+     *
+     * @param dataUrl
+     */
+    public void load(String dataUrl)
+    {
+        eventSource.loadXML(dataUrl);
+    }
+
+    /**
+     * Is timeline visible within containing view
+     *
+     * @return visible status
+     */
+    public boolean visible()
+    {
+    	/**
+        * There might be an issue around this to do with how many views the widget is embedded down
+        * into. This will examine the visibility of the client div and the parent but if you were
+        * to put a parent view inside yet another view and stick that inside a tab, you might get
+        * into trouble. 
+        * */
+    	Element clientElement = getClientElement();
+    	Element containerElement = getElement();
+    	
+    	boolean client = UIObject.isVisible(clientElement);
+    	boolean container = UIObject.isVisible(containerElement);
+    	
+        return (client&&container);
+    }
+
+    /**
+     * Get client div element reference.
+     * 
+     * @return element ref
+     */
+    private Element getClientElement()
+    {
+    	Element element = getElement();
+        if (getParent() != this)
+        	element = getParent().getElement();
+        
+        return (element);
+    }
+
+    
+    public TimeLine getTimeLine()
+    {
+        return timeLine;
+    }
+
+    public EventSource getEventSource()
+    {
+        return eventSource;
+    }
+
+    public ArrayList getBandDecorators()
+    {
+        return bandDecorators;
+    }
+
+    public ArrayList getBandHotZones()
+    {
+        return bandHotZones;
+    }
+
+    public ArrayList getBandInfos()
+    {
+        return bandInfos;
+    }
+
+	public Theme getTheme() 
+	{
+		return theme;
+	}
+}

Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimelineXMLHandler.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimelineXMLHandler.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimelineXMLHandler.java	2009-11-03 22:34:07 UTC (rev 12)
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2006 Alistair Rutherford (http://code.google.com/p/gwtsimiletimeline/)
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.tyndalehouse.step.web.client.widgets.timeline;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+
+/**
+ * Implement this interface to receive Timeline XML completion events.
+ * 
+ */
+public interface TimelineXMLHandler
+{
+    /**
+     * Called when an asynchronous HTTP request completes successfully.
+     *
+     * @param responseText the text returned from the server
+     * @param url
+     */
+    void onCompletion(JavaScriptObject xml, String url);
+    
+    /**
+     * This method gets called when the user scrolls - perhaps, in the near future
+     * TODO: we will want to ensure that this does not get called too often, although it is all client based.
+     * we could do check on the Java client side, as opposed to the javascript client side, and then
+     * call the server just when appropriate!
+     * @param minDate min date visible
+     * @param maxDate max date visible
+     */
+    void onScroll(String minDate, String maxDate);
+}




More information about the Tynstep-svn mailing list