Java Code Examples for com.google.gwt.user.client.ui.VerticalPanel#setCellVerticalAlignment()

The following examples show how to use com.google.gwt.user.client.ui.VerticalPanel#setCellVerticalAlignment() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: swcv   File: AppUtils.java    License: MIT License 6 votes vote down vote up
public static DialogBox createShadow()
{
    final DialogBox box = new DialogBox();
    VerticalPanel rows = new VerticalPanel();
    rows.setSpacing(1);
    HTML html = new HTML("<div></div>");
    rows.add(html);
    rows.addStyleName("blackTransparent");
    rows.setCellHeight(html, "" + Window.getClientHeight());
    rows.setCellWidth(html, "" + Window.getClientWidth());

    rows.setCellHorizontalAlignment(html, HasHorizontalAlignment.ALIGN_CENTER);
    rows.setCellVerticalAlignment(html, HasVerticalAlignment.ALIGN_MIDDLE);

    HorizontalPanel hp = new HorizontalPanel();
    hp.add(rows);
    box.setWidget(hp);
    return box;
}
 
Example 2
Source Project: swcv   File: AppUtils.java    License: MIT License 6 votes vote down vote up
public static DialogBox createLoadingBox()
{
    final DialogBox box = new DialogBox();
    VerticalPanel rows = new VerticalPanel();
    rows.setSpacing(1);

    HTML html = new HTML("<img src=\"" + GWT.getHostPageBaseURL() + "static/imgs/loader.gif\" alt=\"loading\" />");
    rows.add(html);
    rows.addStyleName("whiteWithBorder");
    rows.setCellHeight(html, "100");
    rows.setCellWidth(html, "300");

    rows.setCellHorizontalAlignment(html, HasHorizontalAlignment.ALIGN_CENTER);
    rows.setCellVerticalAlignment(html, HasVerticalAlignment.ALIGN_MIDDLE);

    HorizontalPanel hp = new HorizontalPanel();
    hp.add(rows);
    box.setWidget(hp);
    box.hide();
    return box;
}
 
Example 3
/**
 * FilePath
 */
public FilePath() {
	panel = new VerticalPanel();
	path = new HTML(Main.i18n("filebrowser.path") + ": ", false);
	panel.setStyleName("okm-FilePath-Title");
	panel.setSize("100%", "22px");
	panel.add(path);
	panel.setCellVerticalAlignment(path, VerticalPanel.ALIGN_MIDDLE);
	initWidget(panel);

	// Only executes first time when object is created to initalize values
	getRootPath();
}
 
Example 4
Source Project: appinventor-extensions   File: TopPanel.java    License: Apache License 2.0 4 votes vote down vote up
private void addMotd(VerticalPanel panel) {
  MotdBox motdBox = MotdBox.getMotdBox();
  panel.add(motdBox);
  panel.setCellHorizontalAlignment(motdBox, HorizontalPanel.ALIGN_RIGHT);
  panel.setCellVerticalAlignment(motdBox, HorizontalPanel.ALIGN_BOTTOM);
}