[isidorus-cvs] r478 - branches/gdl-frontend/playground/GWT-JSNI/GWT-JSNI-example/src/gdl/isidor/us/client
lgiessmann at common-lisp.net
lgiessmann at common-lisp.net
Wed Jun 15 11:46:36 UTC 2011
Author: lgiessmann
Date: Wed Jun 15 04:46:36 2011
New Revision: 478
Log:
Modified:
branches/gdl-frontend/playground/GWT-JSNI/GWT-JSNI-example/src/gdl/isidor/us/client/GWT_JSNI_example.java
Modified: branches/gdl-frontend/playground/GWT-JSNI/GWT-JSNI-example/src/gdl/isidor/us/client/GWT_JSNI_example.java
==============================================================================
--- branches/gdl-frontend/playground/GWT-JSNI/GWT-JSNI-example/src/gdl/isidor/us/client/GWT_JSNI_example.java Wed Jun 15 04:46:13 2011 (r477)
+++ branches/gdl-frontend/playground/GWT-JSNI/GWT-JSNI-example/src/gdl/isidor/us/client/GWT_JSNI_example.java Wed Jun 15 04:46:36 2011 (r478)
@@ -1,6 +1,8 @@
package gdl.isidor.us.client;
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.Window;
import com.google.gwt.user.client.ui.Button;
@@ -14,19 +16,19 @@
public class GWT_JSNI_example implements EntryPoint {
private VerticalPanel mainPanel = new VerticalPanel();
private AbsolutePanel absolutePanel = new AbsolutePanel();
-
+
/**
* This is the entry point method.
*/
public void onModuleLoad() {
mainPanel.setBorderWidth(1);
-
+
int mpWidth = 500;
int mpHeight = 500;
mainPanel.setPixelSize(mpWidth, mpHeight);
RootPanel.get("gwtCode").add(mainPanel);
-
+
int apWidth = 290;
int apHeight = 290;
absolutePanel.setPixelSize(apWidth, apHeight);
@@ -34,12 +36,22 @@
DOM.setStyleAttribute(absolutePanel.getElement(), "marginLeft", "auto");
DOM.setStyleAttribute(absolutePanel.getElement(), "marginRight", "auto");
DOM.setStyleAttribute(absolutePanel.getElement(), "marginTop", (mpHeight - apHeight)/2 + "px");
-
+
Button actionButton = new Button();
actionButton.setText("process");
absolutePanel.addStyleName("absolutePanel");
-
+
absolutePanel.add(actionButton);
absolutePanel.setWidgetPosition(actionButton, apWidth - actionButton.getOffsetWidth(), apHeight - actionButton.getOffsetHeight());
- }
+
+
+ actionButton.addClickHandler(new ClickHandler() {
+
+ @Override
+ public void onClick(ClickEvent event) {
+
+ }
+ });
+
+ } //endmethod
}
More information about the Isidorus-cvs
mailing list