One possibility (splitting the screen in four quarters, each containing a button aligned accordingly to its corner position; DISCLAIMER: untested):RootLayoutPanel root = RootLayoutPanel.get();.....
RootLayoutPanel root = RootLayoutPanel.get();
Button topLeft = new Button("Top Left");
root.add(topLeft);
root.setWidgetLeftWidth(topLeft, 0, Unit.PX, 50, Unit.PCT);
root.setWidgetTopHeight(topLeft, 0, Unit.PX, 50, Unit.PCT);
root.setWidgetHorizontalPosition(topLeft, Alignment.BEGIN);
root.setWidgetVerticalPosition(topLeft, Alignment.BEGIN);
Button topRight = new Button("Top Right");
root.add(topRight);
root.setWidgetRightWidth(topRight, 0, Unit.PX, 50, Unit.PCT);
root.setWidgetTopHeight(topRight, 0, Unit.PX, 50, Unit.PCT);
root.setWidgetHorizontalPosition(topRight, Alignment.END);
root.setWidgetVerticalPosition(topRight, Alignment.BEGIN);
Button bottomLeft = new Button("Bottom Left");
root.add(bottomLeft);
root.setWidgetLeftWidth(bottomLeft, 0, Unit.PX, 50, Unit.PCT);
root.setWidgetBottomHeight(bottomLeft, 0, Unit.PX, 50, Unit.PCT);
root.setWidgetHorizontalPosition(bottomLeft, Alignment.BEGIN);
root.setWidgetVerticalPosition(bottomLeft, Alignment.END);
Button bottomRight = new Button("Bottom Right");
root.add(bottomRight);
root.setWidgetRightWidth(bottomRight, 0, Unit.PX, 50, Unit.PCT);
root.setWidgetBottomHeight(bottomRight, 0, Unit.PX, 50, Unit.PCT);
root.setWidgetHorizontalPosition(bottomRight, Alignment.END);
root.setWidgetVerticalPosition(bottomRight, Alignment.END);
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment