[Tynstep-svn] r23 - in trunk/step-web-app/src/main/java/com/tyndalehouse/step/web: client/handler client/timeline/data client/toolkit client/view client/widgets/timeline server/db server/handler shared/command shared/result

ChrisBurrell at crosswire.org ChrisBurrell at crosswire.org
Thu Nov 12 06:56:46 MST 2009


Author: ChrisBurrell
Date: 2009-11-12 06:56:46 -0700 (Thu, 12 Nov 2009)
New Revision: 23

Added:
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/TimelineRenderer.java
Removed:
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/StonehengeRender.java
Modified:
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/handler/ModuleDropdownSelectorEventHandlerImpl.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/toolkit/HtmlList.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/view/StepView.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/view/TimelineView.java
   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/BandOptions.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/SpanHighlightDecorator.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/TimeLineWidget.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/DbProvider.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/RefDataDbCommand.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetBibleBooksHandler.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetCurrentBibleTextHandler.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetEventsForDateRangeHandler.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetModuleRefDataHandler.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/command/GetEventsForDateRangeCommand.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/result/GetAvailableBibleVersionsResult.java
   trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/result/GetModuleRefDataResult.java
Log:


Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/handler/ModuleDropdownSelectorEventHandlerImpl.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/handler/ModuleDropdownSelectorEventHandlerImpl.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/handler/ModuleDropdownSelectorEventHandlerImpl.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -4,7 +4,6 @@
 import com.google.gwt.event.dom.client.ChangeHandler;
 import com.tyndalehouse.step.web.client.presenter.ModuleSelectorPresenter;
 import com.tyndalehouse.step.web.shared.event.ModuleChangeEvent;
-import com.tyndalehouse.step.web.shared.eventhandler.ModuleChangeEventHandler;
 
 public class ModuleDropdownSelectorEventHandlerImpl implements ChangeHandler {
 

Deleted: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/StonehengeRender.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/StonehengeRender.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/StonehengeRender.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -1,152 +0,0 @@
-package com.tyndalehouse.step.web.client.timeline.data;
-
-import java.util.ArrayList;
-
-import com.tyndalehouse.step.web.client.widgets.timeline.BandInfo;
-import com.tyndalehouse.step.web.client.widgets.timeline.BandOptions;
-import com.tyndalehouse.step.web.client.widgets.timeline.DateTime;
-import com.tyndalehouse.step.web.client.widgets.timeline.EventSource;
-import com.tyndalehouse.step.web.client.widgets.timeline.HotZoneBandOptions;
-import com.tyndalehouse.step.web.client.widgets.timeline.ITimeLineRender;
-import com.tyndalehouse.step.web.client.widgets.timeline.PointHighlightDecorator;
-import com.tyndalehouse.step.web.client.widgets.timeline.PointHighlightDecoratorOptions;
-import com.tyndalehouse.step.web.client.widgets.timeline.SpanHighlightDecorator;
-import com.tyndalehouse.step.web.client.widgets.timeline.SpanHighlightDecoratorOptions;
-import com.tyndalehouse.step.web.client.widgets.timeline.Theme;
-import com.tyndalehouse.step.web.client.widgets.timeline.TimeLineWidget;
-
-
-/**
- * Render timeline
- * 
- */
-public class StonehengeRender implements ITimeLineRender
-{
-    /**
-     * Create timeline custom elements.
-     * 
-     *@param widget Timeline rendered into this widget.
-     */
-    public void render(TimeLineWidget widget)
-    {
-    	ArrayList bandInfos = widget.getBandInfos();
-    	ArrayList bandHotZones = widget.getBandHotZones();
-    	ArrayList bandDecorators = widget.getBandDecorators();
-    	EventSource eventSource = widget.getEventSource();
-
-    	Theme theme = widget.getTheme();
-        theme.setEventLabelWidth(400);
-        
-        // ---------------------------------------------------------------
-        // HotZones, two events too close together so we are going to 
-        // 'stretch' the time along them to make the gap between them
-        // larger but still maintain the flow of time.
-        // ---------------------------------------------------------------
-        HotZoneBandOptions hotZone1Opts = HotZoneBandOptions.create();
-        hotZone1Opts.setStart("2280 BC");
-        hotZone1Opts.setEnd("1930 BC");
-        hotZone1Opts.setMagnify(2);
-        hotZone1Opts.setUnit(DateTime.CENTURY());
-        hotZone1Opts.setMultiple(2);
-        bandHotZones.add(hotZone1Opts);
-        
-        // ---------------------------------------------------------------
-        // Band Decorators
-        // ---------------------------------------------------------------
-        
-        // Phase 1
-        SpanHighlightDecoratorOptions phase1Opts = SpanHighlightDecoratorOptions.create();
-        phase1Opts.setStartDate("2900 BC");
-        phase1Opts.setEndDate("2700 BC");
-        phase1Opts.setColor("FFC080");
-        phase1Opts.setOpacity(50);
-        phase1Opts.setStartLabel("Phase");
-        phase1Opts.setEndLabel("");
-        phase1Opts.setTheme(theme);
-        SpanHighlightDecorator phase1decorator = SpanHighlightDecorator.create(phase1Opts);
-        bandDecorators.add(phase1decorator);        
-
-        // Phase 2
-        SpanHighlightDecoratorOptions phase2Opts = SpanHighlightDecoratorOptions.create();
-        phase2Opts.setStartDate("2900 BC");
-        phase2Opts.setEndDate("2400 BC");
-        phase2Opts.setColor("#FFC08F");
-        phase2Opts.setOpacity(50);
-        phase2Opts.setStartLabel("");
-        phase2Opts.setEndLabel("");
-        phase2Opts.setTheme(theme);
-        SpanHighlightDecorator phase2decorator = SpanHighlightDecorator.create(phase2Opts);
-        bandDecorators.add(phase2decorator);        
-
-        // Phase 3
-        SpanHighlightDecoratorOptions phase3Opts = SpanHighlightDecoratorOptions.create();
-        phase3Opts.setStartDate("2600 BC");
-        phase3Opts.setEndDate("1600 BC");
-        phase3Opts.setColor("#FFC000");
-        phase3Opts.setOpacity(50);
-        phase3Opts.setStartLabel("");
-        phase3Opts.setEndLabel("");
-        phase3Opts.setTheme(theme);
-        SpanHighlightDecorator phase3decorator = SpanHighlightDecorator.create(phase3Opts);
-        bandDecorators.add(phase3decorator);        
-        
-        PointHighlightDecoratorOptions startPointOpts = PointHighlightDecoratorOptions.create();
-        startPointOpts.setDate("4000 BC");
-        startPointOpts.setColor("#FFC080");
-        startPointOpts.setOpacity(50);
-        startPointOpts.setTheme(theme);
-        PointHighlightDecorator startPointDecorator = PointHighlightDecorator.create(startPointOpts); 
-        bandDecorators.add(startPointDecorator);
-        
-
-        PointHighlightDecoratorOptions endPointOpts = PointHighlightDecoratorOptions.create();
-        endPointOpts.setDate("1600 BC");
-        endPointOpts.setColor("#FFC080");
-        endPointOpts.setOpacity(50);
-        endPointOpts.setTheme(theme);
-        PointHighlightDecorator endPointDecorator = PointHighlightDecorator.create(endPointOpts); 
-        bandDecorators.add(endPointDecorator);
-        
-        // ---------------------------------------------------------------
-        // Bands
-        // ---------------------------------------------------------------
-        
-        BandOptions topOpts = BandOptions.create();
-        topOpts.setWidth("5%");
-        topOpts.setIntervalUnit(DateTime.CENTURY());
-        topOpts.setIntervalPixels(200);
-        topOpts.setShowEventText(false);
-        topOpts.setTheme(theme);
-        topOpts.setDate("3701 BC");
-
-        
-        BandInfo top = BandInfo.create(topOpts);
-        top.setDecorators(bandDecorators);
-        bandInfos.add(top);
-
-        // Bands
-        BandOptions bottomOpts = BandOptions.create();
-        bottomOpts.setWidth("95%");
-        bottomOpts.setTrackHeight(1.3f);
-        bottomOpts.setTrackGap(0.1f);
-        bottomOpts.setIntervalUnit(DateTime.CENTURY());
-        bottomOpts.setIntervalPixels(50);
-        bottomOpts.setShowEventText(true);
-        bottomOpts.setTheme(theme);
-        bottomOpts.setEventSource(eventSource);
-        bottomOpts.setDate("3701 BC");
-        bottomOpts.setZones(bandHotZones);
-        bottomOpts.setTimeZone(0);
-
-        BandInfo bottom = BandInfo.createHotZone(bottomOpts);
-        bottom.setDecorators(bandDecorators);
-        bandInfos.add(bottom);
-
-        bottom.setSyncWith(0);
-        bottom.setHighlight(true);
-        
-        
-    
-    }
-    
-}

Copied: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/TimelineRenderer.java (from rev 11, trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/StonehengeRender.java)
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/TimelineRenderer.java	                        (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/TimelineRenderer.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -0,0 +1,153 @@
+package com.tyndalehouse.step.web.client.timeline.data;
+
+import java.util.List;
+
+import com.tyndalehouse.step.web.client.widgets.timeline.BandInfo;
+import com.tyndalehouse.step.web.client.widgets.timeline.BandOptions;
+import com.tyndalehouse.step.web.client.widgets.timeline.DateTime;
+import com.tyndalehouse.step.web.client.widgets.timeline.EventSource;
+import com.tyndalehouse.step.web.client.widgets.timeline.HighlightDecorator;
+import com.tyndalehouse.step.web.client.widgets.timeline.HotZoneBandOptions;
+import com.tyndalehouse.step.web.client.widgets.timeline.ITimeLineRender;
+import com.tyndalehouse.step.web.client.widgets.timeline.PointHighlightDecorator;
+import com.tyndalehouse.step.web.client.widgets.timeline.PointHighlightDecoratorOptions;
+import com.tyndalehouse.step.web.client.widgets.timeline.SpanHighlightDecorator;
+import com.tyndalehouse.step.web.client.widgets.timeline.SpanHighlightDecoratorOptions;
+import com.tyndalehouse.step.web.client.widgets.timeline.Theme;
+import com.tyndalehouse.step.web.client.widgets.timeline.TimeLineWidget;
+
+
+/**
+ * Render timeline
+ * 
+ */
+public class TimelineRenderer implements ITimeLineRender
+{
+    /**
+     * Create timeline custom elements.
+     * 
+     *@param widget Timeline rendered into this widget.
+     */
+    public void render(TimeLineWidget widget)
+    {
+    	List<BandInfo> bandInfos = widget.getBandInfos();
+    	List<HotZoneBandOptions> bandHotZones = widget.getBandHotZones();
+    	List<HighlightDecorator> bandDecorators = widget.getBandDecorators();
+    	EventSource eventSource = widget.getEventSource();
+
+    	Theme theme = widget.getTheme();
+        theme.setEventLabelWidth(400);
+        
+        // ---------------------------------------------------------------
+        // HotZones, two events too close together so we are going to 
+        // 'stretch' the time along them to make the gap between them
+        // larger but still maintain the flow of time.
+        // ---------------------------------------------------------------
+        HotZoneBandOptions hotZone1Opts = HotZoneBandOptions.create();
+        hotZone1Opts.setStart("2280 BC");
+        hotZone1Opts.setEnd("1930 BC");
+        hotZone1Opts.setMagnify(2);
+        hotZone1Opts.setUnit(DateTime.CENTURY());
+        hotZone1Opts.setMultiple(2);
+        bandHotZones.add(hotZone1Opts);
+        
+        // ---------------------------------------------------------------
+        // Band Decorators
+        // ---------------------------------------------------------------
+        
+        // Phase 1
+        SpanHighlightDecoratorOptions phase1Opts = SpanHighlightDecoratorOptions.create();
+        phase1Opts.setStartDate("2900 BC");
+        phase1Opts.setEndDate("2700 BC");
+        phase1Opts.setColor("FFC080");
+        phase1Opts.setOpacity(50);
+        phase1Opts.setStartLabel("Phase");
+        phase1Opts.setEndLabel("");
+        phase1Opts.setTheme(theme);
+        SpanHighlightDecorator phase1decorator = SpanHighlightDecorator.create(phase1Opts);
+        bandDecorators.add(phase1decorator);        
+
+        // Phase 2
+        SpanHighlightDecoratorOptions phase2Opts = SpanHighlightDecoratorOptions.create();
+        phase2Opts.setStartDate("2900 BC");
+        phase2Opts.setEndDate("2400 BC");
+        phase2Opts.setColor("#FFC08F");
+        phase2Opts.setOpacity(50);
+        phase2Opts.setStartLabel("");
+        phase2Opts.setEndLabel("");
+        phase2Opts.setTheme(theme);
+        SpanHighlightDecorator phase2decorator = SpanHighlightDecorator.create(phase2Opts);
+        bandDecorators.add(phase2decorator);        
+
+        // Phase 3
+        SpanHighlightDecoratorOptions phase3Opts = SpanHighlightDecoratorOptions.create();
+        phase3Opts.setStartDate("2600 BC");
+        phase3Opts.setEndDate("1600 BC");
+        phase3Opts.setColor("#FFC000");
+        phase3Opts.setOpacity(50);
+        phase3Opts.setStartLabel("");
+        phase3Opts.setEndLabel("");
+        phase3Opts.setTheme(theme);
+        SpanHighlightDecorator phase3decorator = SpanHighlightDecorator.create(phase3Opts);
+        bandDecorators.add(phase3decorator);        
+        
+        PointHighlightDecoratorOptions startPointOpts = PointHighlightDecoratorOptions.create();
+        startPointOpts.setDate("4000 BC");
+        startPointOpts.setColor("#FFC080");
+        startPointOpts.setOpacity(50);
+        startPointOpts.setTheme(theme);
+        PointHighlightDecorator startPointDecorator = PointHighlightDecorator.create(startPointOpts); 
+        bandDecorators.add(startPointDecorator);
+        
+
+        PointHighlightDecoratorOptions endPointOpts = PointHighlightDecoratorOptions.create();
+        endPointOpts.setDate("1600 BC");
+        endPointOpts.setColor("#FFC080");
+        endPointOpts.setOpacity(50);
+        endPointOpts.setTheme(theme);
+        PointHighlightDecorator endPointDecorator = PointHighlightDecorator.create(endPointOpts); 
+        bandDecorators.add(endPointDecorator);
+        
+        // ---------------------------------------------------------------
+        // Bands
+        // ---------------------------------------------------------------
+        
+        BandOptions topOpts = BandOptions.create();
+        topOpts.setWidth("5%");
+        topOpts.setIntervalUnit(DateTime.CENTURY());
+        topOpts.setIntervalPixels(200);
+        topOpts.setShowEventText(false);
+        topOpts.setTheme(theme);
+        topOpts.setDate("3701 BC");
+
+        
+        BandInfo top = BandInfo.create(topOpts);
+        top.setDecorators(bandDecorators);
+        bandInfos.add(top);
+
+        // Bands
+        BandOptions bottomOpts = BandOptions.create();
+        bottomOpts.setWidth("95%");
+        bottomOpts.setTrackHeight(1.3f);
+        bottomOpts.setTrackGap(0.1f);
+        bottomOpts.setIntervalUnit(DateTime.CENTURY());
+        bottomOpts.setIntervalPixels(50);
+        bottomOpts.setShowEventText(true);
+        bottomOpts.setTheme(theme);
+        bottomOpts.setEventSource(eventSource);
+        bottomOpts.setDate("3701 BC");
+        bottomOpts.setZones(bandHotZones);
+        bottomOpts.setTimeZone(0);
+
+        BandInfo bottom = BandInfo.createHotZone(bottomOpts);
+        bottom.setDecorators(bandDecorators);
+        bandInfos.add(bottom);
+
+        bottom.setSyncWith(0);
+        bottom.setHighlight(true);
+        
+        
+    
+    }
+    
+}


Property changes on: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/TimelineRenderer.java
___________________________________________________________________
Added: svn:mergeinfo
   + 

Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/toolkit/HtmlList.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/toolkit/HtmlList.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/toolkit/HtmlList.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -7,7 +7,6 @@
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.dom.client.LIElement;
 import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
 import com.google.gwt.user.client.Event;
 import com.google.gwt.user.client.ui.Widget;
 

Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/view/StepView.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/view/StepView.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/view/StepView.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -1,15 +1,11 @@
 package com.tyndalehouse.step.web.client.view;
 
 
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.Element;
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.DockPanel;
 import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.VerticalPanel;
 import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.user.client.ui.DockPanel.DockLayoutConstant;
 import com.google.inject.Inject;
 import com.tyndalehouse.step.web.client.presenter.ModuleSelectorPresenter;
 import com.tyndalehouse.step.web.client.presenter.ScripturePresenter;

Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/view/TimelineView.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/view/TimelineView.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/view/TimelineView.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -1,47 +1,25 @@
 package com.tyndalehouse.step.web.client.view;
 
 import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.ScrollPanel;
 import com.google.gwt.user.client.ui.Widget;
 import com.tyndalehouse.step.web.client.presenter.TimelinePresenter;
-import com.tyndalehouse.step.web.client.timeline.data.StonehengeRender;
+import com.tyndalehouse.step.web.client.timeline.data.TimelineRenderer;
 import com.tyndalehouse.step.web.client.widgets.timeline.ITimeLineRender;
 import com.tyndalehouse.step.web.client.widgets.timeline.TimeLineWidget;
 
 public class TimelineView extends Composite implements TimelinePresenter.Display {
 
 	// GUI elements
-    private ScrollPanel panel = null;
     private TimeLineWidget simileWidget = null;
-	
-	//this represents the number of pixels to colour in for one year.
-	//if an event is going to be 10 years, then it should be
-	//width/height pixelToYearScale*10
-	private int pixelToYearScale;
-	private HTML timeline;
-	private boolean isDisplayHorizontal = true;
-	
-	
-	//colours to be made variable later
-	private String[] bandColours = new String[] {"blue", "green", "orange", "yellow", "pink" };
-	
+
 	//@Inject
 	public TimelineView(/* ITimeLineRender renderer*/ ) {
         ScrollPanel panel = new ScrollPanel();
         initWidget(panel);	
-        //timeline = new HTML();
-        //panel.add(timeline);
-
-//        addTimeBand(new TimeBandImpl("Egypt"));
-//        addTimeBand(new TimeBandImpl("Israel"));
-//        addTimeBand(new TimeBandImpl("Judah"));
-//        
-//        
-        //render();
+       
         
-        
-        ITimeLineRender render = new StonehengeRender();
+        ITimeLineRender render = new TimelineRenderer();
         simileWidget = new TimeLineWidget("100", "100", render);
         panel.add(simileWidget);
         panel.setAlwaysShowScrollBars(false);
@@ -49,18 +27,6 @@
         //no need to initialise here, since it is going to be initialised by the presenter
         //DatasetHandler.getInstance().initialise(simileWidget,  "step/stonehenge.xml");      
         simileWidget.setStyleName("timeline-default");
-
-        //simileWidget.getTimeLine().
-        
-//        		
-//		SimplePanel mainPanel = new SimplePanel();
-//        initWidget(mainPanel);
-//		
-//		timeline = new TimeLineWidget("10%", "10%", renderer);
-//        mainPanel.add(timeline);
-//        
-//        
-//        //new Viewport(mainPanel);		
 	}
 
 

Modified: 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	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandInfo.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -57,7 +57,7 @@
      * 
      * @param decorators
      */
-    public final void setDecorators(List decorators)
+    public final void setDecorators(List<HighlightDecorator> decorators)
     {
     	JavaScriptObject[] decoratorArr = JavaScriptObjectHelper.listToArray(decorators);
 

Modified: 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	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/BandOptions.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -197,7 +197,7 @@
     /**
      * optional, set hot zones
      */
-    public final void setZones(List zones)
+    public final void setZones(List<HotZoneBandOptions> zones)
     {
     	JavaScriptObject[] zonesArr = JavaScriptObjectHelper.listToArray(zones);
 

Modified: 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	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/PointHighlightDecorator.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -16,7 +16,6 @@
 
 package com.tyndalehouse.step.web.client.widgets.timeline;
 
-import com.google.gwt.core.client.JavaScriptObject;
 
 
 /**
@@ -24,7 +23,9 @@
  *
  * @author ajr
  */
-public class PointHighlightDecorator extends JavaScriptObject
+//TODO: Decorators should extend a sub class or implement an interface to 
+//allow generic lists to work properly
+public class PointHighlightDecorator extends HighlightDecorator
 {
     protected PointHighlightDecorator()
     {

Modified: 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	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/SpanHighlightDecorator.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -16,15 +16,13 @@
 
 package com.tyndalehouse.step.web.client.widgets.timeline;
 
-import com.google.gwt.core.client.JavaScriptObject;
 
-
 /**
  * SpanHighlightDecorator
  *
  * @author ajr
  */
-public class SpanHighlightDecorator extends JavaScriptObject
+public class SpanHighlightDecorator extends HighlightDecorator
 {
     protected SpanHighlightDecorator()
     {

Modified: 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	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLine.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -38,7 +38,7 @@
     /**
      * Create TimeLine object
      */
-    public static TimeLine create(List bands, EventSource source, Element divElement, Element clientElement)
+    public static TimeLine create(List<BandInfo> bands, EventSource source, Element divElement, Element clientElement)
     {
     	JavaScriptObject[] bandArr = JavaScriptObjectHelper.listToArray(bands);
 

Modified: 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	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/widgets/timeline/TimeLineWidget.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -16,6 +16,7 @@
 package com.tyndalehouse.step.web.client.widgets.timeline;
 
 import java.util.ArrayList;
+import java.util.List;
 
 import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.Element;
@@ -38,9 +39,9 @@
 {
     private EventSource eventSource = null;
     private Theme theme = null; 
-    private ArrayList bandInfos = null;
-    private ArrayList bandHotZones = null;
-    private ArrayList bandDecorators = null;
+    private List<BandInfo> bandInfos = null;
+    private List<HotZoneBandOptions> bandHotZones = null;
+    private List<HighlightDecorator> bandDecorators = null;
     private TimeLine timeLine = null;
     private Element divElement = null;
     private ITimeLineRender renderer = null;
@@ -60,9 +61,9 @@
         // ---------------------------------------------------------------
     	// Bands
         // ---------------------------------------------------------------
-        bandInfos = new ArrayList();
-        bandHotZones = new ArrayList();
-        bandDecorators = new ArrayList();
+        bandInfos = new ArrayList<BandInfo>();
+        bandHotZones = new ArrayList<HotZoneBandOptions>();
+        bandDecorators = new ArrayList<HighlightDecorator>();
 
         // ---------------------------------------------------------------
         // Create Theme object
@@ -245,17 +246,18 @@
         return eventSource;
     }
 
-    public ArrayList getBandDecorators()
+    public List<HighlightDecorator> getBandDecorators()
     {
         return bandDecorators;
     }
 
-    public ArrayList getBandHotZones()
+    public List<HotZoneBandOptions> getBandHotZones()
     {
         return bandHotZones;
     }
 
-    public ArrayList getBandInfos()
+    //TODO: remove arraylists and make lists!
+    public List<BandInfo> getBandInfos()
     {
         return bandInfos;
     }

Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/DbProvider.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/DbProvider.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/DbProvider.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -4,16 +4,17 @@
 import java.sql.DriverManager;
 import java.sql.SQLException;
 
-import com.allen_sauer.gwt.log.client.Log;
-
 //TODO: do something about styles, checkstyle, etc.
 //TODO: make a connection pool so that we can reuse
 //db connections and gain performance
 public class DbProvider {
 	//TODO: shove this in a properties file
 	private static String dbConnectionString = "jdbc:derby:StepDB";
-	private static String clientConnection = "jdbc:derby://localhost:1527//../StepDB";
 
+	//TODO: ensure that we can set in properties file dev or non dev environment
+	// and use appropriate connection pool as a result...
+	//private static String clientConnection = "jdbc:derby://localhost:1527//../StepDB";
+
 	public DbProvider() {
 		//TODO: somehow make this property based
 		//if dev then //

Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/RefDataDbCommand.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/RefDataDbCommand.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/RefDataDbCommand.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -20,10 +20,9 @@
 	}
 	
 	public ResultSet select(final String refId) {
-		DbProvider provider = new DbProvider();
 		Connection connection = null;
 		try {
-			connection = provider.getConnection();
+			connection = DbProvider.getConnection();
 			Statement statement = connection.createStatement();
 			//	do select
 			
@@ -37,7 +36,7 @@
 			logger.error("A SQL exception has occurred", e);
 		} finally {
 			try {
-				provider.finaliseConnection(connection);
+				DbProvider.finaliseConnection(connection);
 			} catch (SQLException e) {
 				logger.error("A SQL exception has occurred", e);
 			}

Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetBibleBooksHandler.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetBibleBooksHandler.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetBibleBooksHandler.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -4,9 +4,6 @@
 import java.util.List;
 import java.util.Locale;
 
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-
 import net.customware.gwt.dispatch.server.ActionHandler;
 import net.customware.gwt.dispatch.server.ExecutionContext;
 import net.customware.gwt.dispatch.shared.ActionException;
@@ -25,7 +22,6 @@
 import org.crosswire.jsword.versification.BookName;
 
 import com.google.inject.Inject;
-import com.google.inject.Provider;
 import com.tyndalehouse.step.web.shared.command.GetBibleBooksCommand;
 import com.tyndalehouse.step.web.shared.result.GetBibleBooksCommandResult;
 

Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetCurrentBibleTextHandler.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetCurrentBibleTextHandler.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetCurrentBibleTextHandler.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -10,7 +10,6 @@
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
-import org.crosswire.common.util.PluginUtil;
 import org.crosswire.common.util.Reporter;
 import org.crosswire.common.xml.SAXEventProvider;
 import org.crosswire.common.xml.TransformingSAXEventProvider;
@@ -22,7 +21,6 @@
 import org.crosswire.jsword.book.Books;
 import org.crosswire.jsword.book.OSISUtil;
 import org.crosswire.jsword.passage.NoSuchKeyException;
-import org.crosswire.jsword.util.ConverterFactory;
 import org.jdom.Element;
 import org.xml.sax.SAXException;
 

Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetEventsForDateRangeHandler.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetEventsForDateRangeHandler.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetEventsForDateRangeHandler.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -18,7 +18,6 @@
 import com.google.inject.Inject;
 import com.tyndalehouse.step.web.server.db.DbProvider;
 import com.tyndalehouse.step.web.shared.beans.TimelineEventBean;
-import com.tyndalehouse.step.web.shared.command.GetCurrentBibleTextCommand;
 import com.tyndalehouse.step.web.shared.command.GetEventsForDateRangeCommand;
 import com.tyndalehouse.step.web.shared.result.GetEventsForDateRangeResult;
 

Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetModuleRefDataHandler.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetModuleRefDataHandler.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetModuleRefDataHandler.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -10,21 +10,21 @@
 import org.apache.commons.logging.Log;
 
 import com.google.inject.Inject;
-import com.google.inject.Injector;
-import com.tyndalehouse.step.web.server.db.RefDataDbCommand;
 import com.tyndalehouse.step.web.shared.command.GetModuleRefDataCommand;
 import com.tyndalehouse.step.web.shared.result.GetModuleRefDataResult;
 
+//TODO: Define custom ActionHandler with logging as part of it...
+//That way we can ensure that we log every entry and exit to handlers properly?
+//ensure that execute is wrapped around by logging...
+//or could possibly add this to the servlet 
 public class GetModuleRefDataHandler implements
 		ActionHandler<GetModuleRefDataCommand, GetModuleRefDataResult> {
 	private final Log logger;
-	private final Injector injector;
 
 	@Inject
-	public GetModuleRefDataHandler(Log logger, Injector injector) {
+	public GetModuleRefDataHandler(Log logger) {
 		this.logger = logger;
-		this.injector = injector;
-		
+	
 	}
 
 	@Override

Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/command/GetEventsForDateRangeCommand.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/command/GetEventsForDateRangeCommand.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/command/GetEventsForDateRangeCommand.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -2,7 +2,6 @@
 
 import net.customware.gwt.dispatch.shared.Action;
 
-import com.tyndalehouse.step.web.shared.result.GetAvailableBibleVersionsResult;
 import com.tyndalehouse.step.web.shared.result.GetEventsForDateRangeResult;
 
 public class GetEventsForDateRangeCommand  implements Action<GetEventsForDateRangeResult> {

Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/result/GetAvailableBibleVersionsResult.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/result/GetAvailableBibleVersionsResult.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/result/GetAvailableBibleVersionsResult.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -1,7 +1,6 @@
 package com.tyndalehouse.step.web.shared.result;
 
 import java.util.Collections;
-import java.util.Map;
 import java.util.SortedMap;
 
 import net.customware.gwt.dispatch.shared.Result;

Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/result/GetModuleRefDataResult.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/result/GetModuleRefDataResult.java	2009-11-12 13:55:37 UTC (rev 22)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/result/GetModuleRefDataResult.java	2009-11-12 13:56:46 UTC (rev 23)
@@ -1,7 +1,6 @@
 package com.tyndalehouse.step.web.shared.result;
 
 import java.util.Collections;
-import java.util.Map;
 import java.util.SortedMap;
 
 import net.customware.gwt.dispatch.shared.Result;




More information about the Tynstep-svn mailing list