Java Code Examples for com.google.gwt.user.client.ui.Widget.setWidth()

The following are Jave code examples for showing how to use setWidth() of the com.google.gwt.user.client.ui.Widget class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: appinventor-extensions   File: ColumnLayout.java   Source Code and License Vote up 5 votes
/**
 * Invoked upon resizing of the work area panel.
 *
 * @see WorkAreaPanel#onResize(int, int)
 *
 * @param width column width in pixel
 */
public void onResize(int width) {
  absoluteWidth = width * relativeWidth / 100;
  columnPanel.setWidth(absoluteWidth + "px");
  for (Widget w : columnPanel) {
    if (w instanceof Box) {
      ((Box) w).onResize(absoluteWidth);
    } else {
      // Top-of-column marker (otherwise invisible widget)
      w.setWidth(absoluteWidth + "px");
    }
  }
}
 
Example 2
Project: empiria.player   File: Preloader.java   Source Code and License Vote up 4 votes
public void setPreloaderSize(int width, int height) {
    Widget containerWidget = asWidget();
    containerWidget.setWidth(width + "px");
    containerWidget.setHeight(height + "px");
}