diff src/econnect/wp3_3/client/widgets/timeplot/StiTimeplot.java @ 3:cf06b77a8bbd

Committed branch of the e4D repos sti-gwt branch 16384. git-svn-id: http://dev.dariah.eu/svn/repos/eu.dariah.de/ap1/sti-gwt-dariah-geobrowser@36 f2b5be40-def6-11e0-8a09-b3c1cc336c6b
author StefanFunk <StefanFunk@f2b5be40-def6-11e0-8a09-b3c1cc336c6b>
date Tue, 17 Jul 2012 13:34:40 +0000
parents
children 6ec1ab4f897a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/econnect/wp3_3/client/widgets/timeplot/StiTimeplot.java	Tue Jul 17 13:34:40 2012 +0000
@@ -0,0 +1,100 @@
+package econnect.wp3_3.client.widgets.timeplot;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+import econnect.wp3_3.client.core.StiCore;
+
+/**
+ * Implementation of the wrapper for the STITimeplot class of the STI JavaScript source
+*/
+public class StiTimeplot extends JavaScriptObject {
+	
+	protected StiTimeplot(){
+	}
+	
+    /**
+     * Initializes a STITimeplot element
+     *
+     * @param core the core of the STI
+     * @param window the window div id for the container for the timeplot element
+     * @param container the container div id for the timeplot element
+     * @return a STITimeplot object
+    */
+	public static native StiTimeplot createStiTimeplot(StiCore core, String window, String container) /*-{
+		return new $wnd.STITimeplot(core, window, container);
+	}-*/;
+	
+	/**
+	 * activates the play function of the timeplot element
+	*/
+	public final native void play() /*-{
+		this.play();
+	}-*/;
+
+	/**
+	 * stops the play function of the timeplot element
+	*/
+	public final native void pause() /*-{
+		this.stop();
+	}-*/;
+
+	/**
+	 * Getter for the play status
+	 * 
+	 * @return the play status; true if it plays, false if not
+	*/
+	public final native boolean paused() /*-{
+		return this.paused;
+	}-*/;
+
+	/**
+	 * Getter for the number of zoom levels; depends on the number of timeslices
+	 * 
+	 * @return the number of zoom levels
+	*/
+	public final native int getNumZoomLevels() /*-{
+		return this.getZoomLevels();
+	}-*/;
+	
+	/**
+	 * Changes zoom of the timeplot
+	 * 
+	 * @param delta is 1 if zoom-in and -1 if zoom-out
+	*/
+	public final native void zoom(int delta) /*-{
+		this.zoom(delta,null);
+	}-*/;
+	
+	/**
+	 * get actual min time
+	*/
+	public final native String minTime() /*-{
+		return this.eds.minDate.getTime();
+	}-*/;
+
+	/**
+	 * get actual max time
+	*/
+	public final native String maxTime() /*-{
+		return this.eds.maxDate.getTime();
+	}-*/;
+
+	public final native String minSelTime() /*-{
+		if( this.leftFlagTime != null ){
+			return this.leftFlagTime.getTime();
+		}
+		return null;
+	}-*/;
+
+	public final native String maxSelTime() /*-{
+		if( this.rightFlagTime != null ){
+			return this.rightFlagTime.getTime();
+		}
+		return null;
+	}-*/;
+
+	public final native void selectTimerange(String minSelTime, String maxSelTime) /*-{
+		this.selectTimerange(minSelTime,maxSelTime);
+	}-*/;
+
+}
\ No newline at end of file