[isidorus-cvs] r932 - in branches/gdl-frontend/src/anaToMia/GDL_Widgets: src/us/isidor/gdl/anaToMia/Widgets/base src/us/isidor/gdl/anaToMia/Widgets/isidorus war
lgiessmann at common-lisp.net
lgiessmann at common-lisp.net
Tue Sep 20 09:00:22 UTC 2011
Author: lgiessmann
Date: Tue Sep 20 02:00:21 2011
New Revision: 932
Log:
gdl-frontend: Widgets: added the class LoadScreenPanel, that can be used to show the user that the frontend is waiting for data
Added:
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/LoadScreenPanel.java
Modified:
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.html
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java Tue Sep 20 00:59:28 2011 (r931)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java Tue Sep 20 02:00:21 2011 (r932)
@@ -1,23 +1,13 @@
package us.isidor.gdl.anaToMia.Widgets.base;
-import java.util.ArrayList;
-import us.isidor.gdl.anaToMia.TmEngine.jtmsBasedEngine.JtmsTmEngine;
-import us.isidor.gdl.anaToMia.Widgets.environment.Pair;
-import us.isidor.gdl.anaToMia.Widgets.environment.TopicIdentifierTypes;
-import us.isidor.gdl.anaToMia.Widgets.isidorus.CommitCallback;
-import us.isidor.gdl.anaToMia.Widgets.isidorus.DeleteCallback;
-import us.isidor.gdl.anaToMia.Widgets.isidorus.LoadSchemaCallback;
+import us.isidor.gdl.anaToMia.Widgets.isidorus.LoadScreenPanel;
+
import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.RootPanel;
-import com.google.gwt.dom.client.Element;
-import com.google.gwt.dom.client.TextAreaElement;
public class TestClass implements EntryPoint{
@@ -26,6 +16,20 @@
@Override
public void onModuleLoad() {
+ final LoadScreenPanel lsp = new LoadScreenPanel("Title", "message");
+ RootPanel.get().add(lsp);
+
+ Timer t = new Timer() {
+ @Override
+ public void run() {
+ lsp.removeFromParent();
+ Window.alert("timer fired event!");
+ }
+ };
+
+ t.schedule(5000);
+
+ /*
try{
RootPanel.get("GWT_Content").add(mainPanel);
mainPanel.setBorderWidth(1);
@@ -70,5 +74,6 @@
e.printStackTrace();
Window.alert(">> e >> " + e.getClass() + " >> " + e.getMessage());
}
+ */
}
}
Added: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/LoadScreenPanel.java
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/LoadScreenPanel.java Tue Sep 20 02:00:21 2011 (r932)
@@ -0,0 +1,21 @@
+package us.isidor.gdl.anaToMia.Widgets.isidorus;
+
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.HTMLPanel;
+
+
+public class LoadScreenPanel extends Composite {
+ private HTMLPanel mainPanel = null;
+ private HTMLPanel content = null;
+ private static long instanceCounter = 0;
+
+ public LoadScreenPanel(String title, String message){
+ String localTitle = title == null ? "" : title;
+ String localMessage = message == null ? "" : message;
+ String mainPanelId = "GDL_LoadScreenPanel_id_" + LoadScreenPanel.instanceCounter++;
+ this.mainPanel = new HTMLPanel("<div id=\"" + mainPanelId + "\" style=\"position: absolute; z-index: 2147483646; left: 0px; top: 0px; right: 0px; bottom: 0px; opacity: 0.6; background-color: rgb(0, 0, 0);\"></div>");
+ this.initWidget(this.mainPanel);
+ this.content = new HTMLPanel("<div style=\"position: absolute; z-index: 2147483647; left: 50px; top: 50px; width: 600px; color: rgb(255, 255, 255); font-family: verdana; text-align: left;\"><div style=\"font-size: 30px; font-weight: bold;\">" + localTitle + "</div><div style=\"font-size: 15px;\">" + localMessage + "</div></div>");
+ this.mainPanel.add(this.content, mainPanelId);
+ }
+}
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.html
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.html Tue Sep 20 00:59:28 2011 (r931)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.html Tue Sep 20 02:00:21 2011 (r932)
@@ -17,7 +17,7 @@
<!-- -->
<!-- Any title is fine -->
<!-- -->
- <title>Web Application Starter Project</title>
+ <title>TextGrid ServiceRegistry</title>
<!-- -->
<!-- This script loads your compiled module. -->
More information about the Isidorus-cvs
mailing list