Changeset 478 for branches/gdl-frontend/playground
- Timestamp:
- 06/15/11 11:46:36 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/gdl-frontend/playground/GWT-JSNI/GWT-JSNI-example/src/gdl/isidor/us/client/GWT_JSNI_example.java ¶
r476 r478 2 2 3 3 import com.google.gwt.core.client.EntryPoint; 4 import com.google.gwt.event.dom.client.ClickEvent; 5 import com.google.gwt.event.dom.client.ClickHandler; 4 6 import com.google.gwt.user.client.DOM; 5 7 import com.google.gwt.user.client.Window; … … 15 17 private VerticalPanel mainPanel = new VerticalPanel(); 16 18 private AbsolutePanel absolutePanel = new AbsolutePanel(); 17 19 18 20 19 21 /** … … 22 24 public void onModuleLoad() { 23 25 mainPanel.setBorderWidth(1); 24 26 25 27 int mpWidth = 500; 26 28 int mpHeight = 500; 27 29 mainPanel.setPixelSize(mpWidth, mpHeight); 28 30 RootPanel.get("gwtCode").add(mainPanel); 29 31 30 32 int apWidth = 290; 31 33 int apHeight = 290; … … 35 37 DOM.setStyleAttribute(absolutePanel.getElement(), "marginRight", "auto"); 36 38 DOM.setStyleAttribute(absolutePanel.getElement(), "marginTop", (mpHeight - apHeight)/2 + "px"); 37 39 38 40 Button actionButton = new Button(); 39 41 actionButton.setText("process"); 40 42 absolutePanel.addStyleName("absolutePanel"); 41 43 42 44 absolutePanel.add(actionButton); 43 45 absolutePanel.setWidgetPosition(actionButton, apWidth - actionButton.getOffsetWidth(), apHeight - actionButton.getOffsetHeight()); 44 } 46 47 48 actionButton.addClickHandler(new ClickHandler() { 49 50 @Override 51 public void onClick(ClickEvent event) { 52 53 } 54 }); 55 56 } //endmethod 45 57 }
Note: See TracChangeset
for help on using the changeset viewer.