Example usage for com.google.gwt.user.client.ui HorizontalPanel setCellVerticalAlignment

List of usage examples for com.google.gwt.user.client.ui HorizontalPanel setCellVerticalAlignment

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui HorizontalPanel setCellVerticalAlignment.

Prototype

public void setCellVerticalAlignment(IsWidget w, VerticalAlignmentConstant align) 

Source Link

Document

Overloaded version for IsWidget.

Usage

From source file:com.dimdim.conference.ui.user.client.MoodControlPopup.java

License:Open Source License

protected HorizontalPanel getMoodPanel(UserMood mood, boolean custom) {
    /*/*from ww  w  .  j a v  a  2  s .  c o  m*/
    FocusPanel   pane = new FocusPanel();
    pane.addMouseListener(new MouseListenerAdapter()
    {
       public void onMouseEnter(Widget sender)
       {
    sender.addStyleName("mood-menu-entry-selected");
       }
       public void onMouseLeave(Widget sender)
       {
    sender.removeStyleName("mood-menu-entry-selected");
       }
    });
    */
    final HorizontalPanel moodPanel = new HorizontalPanel();
    //      pane.add(moodPanel);
    moodPanel.setStyleName("mood-menu-entry");
    if (!custom) {
        moodPanel.addStyleName("mood-menu-entry-border");
    }
    Image moodImage = UIImages.getImageBundle(UIImages.defaultSkin).getNewMoodImageUrl(mood.getMood());
    moodImage.setStyleName(mood.getImageStyleName());
    moodPanel.add(moodImage);
    moodPanel.setCellVerticalAlignment(moodImage, VerticalPanel.ALIGN_MIDDLE);

    Label moodLabel = getMoodLabel(mood, custom);
    moodLabel.addStyleName("mood-label");
    moodPanel.add(moodLabel);
    moodPanel.setCellVerticalAlignment(moodLabel, VerticalPanel.ALIGN_MIDDLE);
    moodLabel.addMouseListener(new MouseListenerAdapter() {
        public void onMouseEnter(Widget sender) {
            moodPanel.addStyleName("mood-menu-entry-selected");
        }

        public void onMouseLeave(Widget sender) {
            moodPanel.removeStyleName("mood-menu-entry-selected");
        }
    });
    moodPanel.setTitle(mood.getDisplayLabel());
    return moodPanel;
}

From source file:com.dimdim.conference.ui.user.client.questiontask.QuestionsControlPanel.java

License:Open Source License

protected Widget getContent() {
    ScrollPanel scroller = new ScrollPanel();
    scroller.setStyleName("list-popup-scroll-panel");
    VerticalPanel table = new VerticalPanel();
    scroller.add(scrolledTable);// w  ww .j  av a 2s .  c o m

    HorizontalPanel header = new HorizontalPanel();
    header.add(createLabel(".", "user-image-header"));
    header.add(createLabel(UIStrings.getNameLabel(), "lobby-name"));
    header.add(createLabel(UIStrings.getEmailLabel(), "lobby-email"));

    Label accept = createLabel(UIStrings.getResolveLabel(), "user-chat-button-header");
    accept.addStyleName("common-anchor");
    header.add(accept);
    Label deny = createLabel("", "user-chat-button-header");
    header.add(deny);

    header.addStyleName("common-dialog-row");
    table.add(header);
    table.add(scroller);
    table.setCellWidth(scroller, "100%");

    int size = this.listModel.getListSize();
    int i = 0;
    for (i = 0; i < size; i++) {
        UserListEntry ule = (UserListEntry) this.listModel.getListEntryAt(i);
        UIRosterEntry user = ule.getUser();
        this.users.addElement(user);

        HorizontalPanel row = new HorizontalPanel();

        HorizontalPanel hp1 = new HorizontalPanel();
        Image image = ule.getImage1Url();
        hp1.add(image);
        hp1.setCellHorizontalAlignment(image, HorizontalPanel.ALIGN_CENTER);
        hp1.setCellVerticalAlignment(image, VerticalPanel.ALIGN_MIDDLE);
        hp1.setStyleName("user-image");
        row.add(hp1);
        row.setCellHorizontalAlignment(hp1, HorizontalPanel.ALIGN_CENTER);
        row.setCellVerticalAlignment(hp1, VerticalPanel.ALIGN_MIDDLE);

        //         table.setWidget((i+1), 0, image);
        Label nameLabel = createTextHTML(user.getDisplayName(), "lobby-name");
        nameLabel.addStyleName("common-anchor");
        row.add(nameLabel);
        Label emailLabel = createTextHTML(user.getUserId(), "lobby-email");
        emailLabel.addStyleName("common-anchor");
        row.add(emailLabel);

        HorizontalPanel hp3 = new HorizontalPanel();
        CheckBox cb2 = new CheckBox();
        hp3.add(cb2);
        hp3.setStyleName("user-chat-button");
        hp3.setCellHorizontalAlignment(cb2, HorizontalPanel.ALIGN_LEFT);
        hp3.setCellVerticalAlignment(cb2, VerticalPanel.ALIGN_MIDDLE);
        row.add(hp3);
        row.setCellHorizontalAlignment(hp3, HorizontalPanel.ALIGN_LEFT);
        row.setCellVerticalAlignment(hp3, VerticalPanel.ALIGN_MIDDLE);
        this.checkBoxes.addElement(cb2);

        HorizontalPanel hp4 = new HorizontalPanel();
        Label cb3 = new Label("");
        hp4.add(cb3);
        hp4.setStyleName("user-chat-button");
        hp4.setCellHorizontalAlignment(cb3, HorizontalPanel.ALIGN_LEFT);
        hp4.setCellVerticalAlignment(cb3, VerticalPanel.ALIGN_MIDDLE);
        row.add(hp4);
        row.setCellHorizontalAlignment(hp4, HorizontalPanel.ALIGN_LEFT);
        row.setCellVerticalAlignment(hp4, VerticalPanel.ALIGN_MIDDLE);

        row.addStyleName("common-dialog-row");
        scrolledTable.add(row);
        this.rows.addElement(row);
    }

    return table;
}

From source file:com.dimdim.conference.ui.user.client.SingleAttendeePermissionsControlDialog.java

License:Open Source License

protected Widget getContent() {
    VerticalPanel table = new VerticalPanel();

    UIResources uiResources = UIResources.getUIResources();
    HorizontalPanel header = new HorizontalPanel();
    header.add(createLabel(".", "user-image-header"));
    header.add(createLabel(UIStrings.getNameLabel(), "user-name-header"));
    header.add(createLabel(UIStrings.getEmailLabel(), "user-email-header"));

    if (ConferenceGlobals.privateChatEnabled) {
        Label chat = createLabel(UIStrings.getChatLabel(), "user-chat-button-header");
        //         chat.addStyleName("common-anchor");
        header.add(chat);/*from   ww  w  .ja va 2 s  . c om*/
    }
    if (!ConferenceGlobals.isPresenterAVAudioDisabled()) {
        String label = UIStrings.getAudioLabel();
        if (ConferenceGlobals.isPresenterAVVideoOnly()) {
            label = UIStrings.getVideoLabel();
        }
        Label audio = createLabel(label, "user-chat-button-header");
        header.add(audio);
    }
    //         Label video = createLabel("Video","user-chat-button-header");
    //         header.add(video);

    header.addStyleName("common-dialog-row");
    table.add(header);
    table.setCellWidth(header, "100%");
    {
        UserListEntry ule = (UserListEntry) listEntry;
        UIRosterEntry user = ule.getUser();

        HorizontalPanel row = new HorizontalPanel();

        HorizontalPanel hp1 = new HorizontalPanel();
        Image image = ule.getImage1Url();
        hp1.add(image);
        hp1.setCellHorizontalAlignment(image, HorizontalPanel.ALIGN_CENTER);
        hp1.setCellVerticalAlignment(image, VerticalPanel.ALIGN_MIDDLE);
        hp1.setStyleName("user-image");
        row.add(hp1);
        row.setCellHorizontalAlignment(hp1, HorizontalPanel.ALIGN_CENTER);
        row.setCellVerticalAlignment(hp1, VerticalPanel.ALIGN_MIDDLE);

        Label nameLabel = createTextHTML(user.getDisplayName(), "user-name");
        //            nameLabel.addStyleName("common-anchor");
        row.add(nameLabel);

        String subject = uiResources.getConferenceInfoAndDecode64("subject");
        String mailToTag = "<a href=\"mailto:" + user.getUserId() + "?subject=" + subject + "\">"
                + user.getUserId() + "</a>";

        HTML emailLabel = new HTML("<span>" + mailToTag + "</span>");
        emailLabel.setStyleName("common-table-text");
        emailLabel.addStyleName("user-email");
        emailLabel.addStyleName("common-anchor");
        row.add(emailLabel);

        if (ConferenceGlobals.privateChatEnabled) {
            HorizontalPanel hp2 = new HorizontalPanel();
            this.chatControl = new CheckBox();
            hp2.add(chatControl);
            hp2.setStyleName("user-chat-button");
            hp2.setCellHorizontalAlignment(chatControl, HorizontalPanel.ALIGN_LEFT);
            hp2.setCellVerticalAlignment(chatControl, VerticalPanel.ALIGN_MIDDLE);
            row.add(hp2);
            row.setCellHorizontalAlignment(hp2, HorizontalPanel.ALIGN_LEFT);
            row.setCellVerticalAlignment(hp2, VerticalPanel.ALIGN_MIDDLE);
            chatControl.setChecked(user.isChatOn());
        }

        if (!ConferenceGlobals.isPresenterAVAudioDisabled()) {
            HorizontalPanel hp3 = new HorizontalPanel();
            this.audioControl = new CheckBox();
            hp3.add(audioControl);
            hp3.setStyleName("user-chat-button");
            hp3.setCellHorizontalAlignment(audioControl, HorizontalPanel.ALIGN_LEFT);
            hp3.setCellVerticalAlignment(audioControl, VerticalPanel.ALIGN_MIDDLE);
            row.add(hp3);
            row.setCellHorizontalAlignment(hp3, HorizontalPanel.ALIGN_LEFT);
            row.setCellVerticalAlignment(hp3, VerticalPanel.ALIGN_MIDDLE);
            audioControl.setChecked(user.isAudioOn());
            if (!user.isAudioOn()) {
                audioControl.setEnabled(userManager.canEnableAudioFor(user.getUserId()));
            }
        }
        row.addStyleName("common-dialog-row");
        table.add(row);
    }

    return table;
}

From source file:com.edgenius.wiki.gwt.client.page.widgets.ExportDialog.java

License:Open Source License

public ExportDialog(PageMain pageMain) {
    this.pageMain = pageMain;
    this.setIcon(new Image(IconBundle.I.get().export()));
    this.setText(Msg.consts.export());

    ButtonBar btnPanel = getButtonBar();
    btnPanel.add(cancelBtn);//ww w.  j  a va  2  s .c o m
    btnPanel.add(okBtn);
    okBtn.addClickHandler(this);
    cancelBtn.addClickHandler(this);

    Label l1 = new Label(Msg.consts.format());
    Label l2 = new Label(Msg.consts.scope());

    pdfF.setText("PDF"); //NON-i18n
    htmlF.setText("HTML"); //NON-i18n
    scopeS.setText(Msg.consts.whole_space());
    scopeP.setText(Msg.consts.current_page());

    l1.setStyleName(Css.FORM_LABEL);
    l2.setStyleName(Css.FORM_LABEL);

    FlexTable main = new FlexTable();
    main.setWidget(0, 0, l1);
    main.setWidget(0, 1, htmlF);
    //TODO: temporary comment as PDF is not ready...
    //      main.setWidget(0, 2, pdfF);

    main.setWidget(1, 0, l2);
    main.setWidget(1, 1, scopeS);
    main.setWidget(1, 2, scopeP);

    main.getFlexCellFormatter().setWidth(0, 0, "130px");
    main.getFlexCellFormatter().setWidth(0, 1, "130px");

    htmlF.setValue(true);
    scopeS.setValue(true);

    HorizontalPanel busy = new HorizontalPanel();
    Image busyImg = new Image(IconBundle.I.get().loadingBar());
    busy.add(busyImg);
    busy.setCellHorizontalAlignment(busyImg, HasHorizontalAlignment.ALIGN_CENTER);
    busy.setCellVerticalAlignment(busyImg, HasVerticalAlignment.ALIGN_BOTTOM);
    busy.setHeight("200px");

    deck.insert(main, MAIN_DECK);
    deck.insert(busy, BUSY_DECK);
    deck.setSize("98%", "100%");
    deck.showWidget(MAIN_DECK);

    VerticalPanel panel = new VerticalPanel();
    panel.setCellHorizontalAlignment(message, HasHorizontalAlignment.ALIGN_CENTER);
    panel.setCellHorizontalAlignment(deck, HasHorizontalAlignment.ALIGN_CENTER);
    panel.setWidth("100%");
    panel.add(message);
    panel.add(deck);

    this.setWidget(panel);
}

From source file:com.edgenius.wiki.gwt.client.page.widgets.LocationButton.java

License:Open Source License

public LocationButton(PageMain main, boolean showText) {
    this.main = main;
    HorizontalPanel panel = new HorizontalPanel();
    this.showText = showText;

    if (!showText) {
        Image tree = new Image(IconBundle.I.get().tree());
        tree.addClickHandler(this);
        panel.add(tree);//from   w ww .  jav a2  s.c o  m
        panel.setCellVerticalAlignment(tree, HasVerticalAlignment.ALIGN_BOTTOM);
    } else {
        ClickLink locationBtn = new ClickLink(Msg.consts.view_page_tree());
        locationBtn.setStyleName(Css.LARGE_LINK_BTN);
        locationBtn.addClickHandler(this);
        panel.add(locationBtn);
    }

    pageTreePanel = new PageTreePanel(main);
    main.setSideMenuPanel(ClientConstants.LEFT, pageTreePanel);
    main.setSidebarButtonVisible(ClientConstants.LEFT, true);
    this.setWidget(panel);
}

From source file:com.edgenius.wiki.gwt.client.page.widgets.PrintButton.java

License:Open Source License

public PrintButton(PageMain pageMain, boolean showText) {
    this.main = pageMain;

    HorizontalPanel panel = new HorizontalPanel();
    if (showText) {
        ClickLink locationBtn = new ClickLink(Msg.consts.print());
        locationBtn.addClickHandler(this);
        panel.add(locationBtn);/*from  www  .  ja v  a  2 s .c  o m*/
    }
    Image print = new Image(IconBundle.I.get().printer());
    print.addClickHandler(this);
    panel.add(print);
    panel.setCellVerticalAlignment(print, HasVerticalAlignment.ALIGN_BOTTOM);

    this.setWidget(panel);
}

From source file:com.edgenius.wiki.gwt.client.render.SearchRenderWidget.java

License:Open Source License

public void initContentPanel() {

    pagination.addPaginationListener(this);
    pagination.setPageSize(SharedConstants.PAGE_SIZE);
    deck.insert(loadingPanel, LOADING_PANEL);
    deck.insert(resultPanel, RESULT_PANEL);
    deck.showWidget(LOADING_PANEL);//ww  w . j  a  v  a 2  s  .  com

    HorizontalPanel sumPanel = new HorizontalPanel();
    sumPanel.add(pagination);
    sumPanel.add(summary);

    VerticalPanel leftPanel = new VerticalPanel();
    leftPanel.add(message);
    leftPanel.add(deck);
    leftPanel.add(new HTML("<br>"));
    leftPanel.add(sumPanel);

    FlowPanel rightPanel = new FlowPanel();
    rightPanel.add(advSearchPanel);
    HorizontalPanel mainPanel = new HorizontalPanel();
    mainPanel.add(leftPanel);
    mainPanel.add(rightPanel);

    mainPanel.setCellWidth(rightPanel, AdvSearchPanel.WIDTH);
    mainPanel.setWidth("100%");
    sumPanel.setWidth("100%");
    leftPanel.setWidth("100%");
    deck.setWidth("98%");
    sumPanel.setWidth("98%");
    sumPanel.setCellHorizontalAlignment(summary, HasHorizontalAlignment.ALIGN_RIGHT);
    sumPanel.setCellVerticalAlignment(summary, HasVerticalAlignment.ALIGN_MIDDLE);
    sumPanel.setCellVerticalAlignment(pagination, HasVerticalAlignment.ALIGN_MIDDLE);

    sumPanel.setStyleName(Css.SUMMARY);
    mainPanel.setStyleName(Css.SEARCH_RESULT);

    advSearchPanel.setKeyword(this.keyword);

    this.setWidget(mainPanel);
}

From source file:com.ephesoft.dcma.gwt.rv.client.view.TableExtractionView.java

License:Open Source License

private void addHeaderColumns(final List<Column> columnList, final FlexTable flexTable) {
    tableNameVsCheckBoxMap.get(selectedDataTableName).clear();
    int columnNumber = 0;
    for (Column headerColumn : columnList) {
        HorizontalPanel headerRowPanel = new HorizontalPanel();
        Label headerText = new Label(headerColumn.getName());
        headerRowPanel.add(headerText);//  ww w. jav  a  2  s. c o  m
        headerRowPanel.setWidth("80px");
        CheckBox validationCheckBox = new CheckBox();
        validationCheckBox.setVisible(Boolean.FALSE);
        headerRowPanel.add(validationCheckBox);
        headerRowPanel.setCellVerticalAlignment(validationCheckBox, HasVerticalAlignment.ALIGN_MIDDLE);
        tableNameVsCheckBoxMap.get(selectedDataTableName).add(validationCheckBox);
        flexTable.setWidget(0, columnNumber, headerRowPanel);
        flexTable.getCellFormatter().addStyleName(0, columnNumber, "wordWrap");
        columnNumber++;
    }
}

From source file:com.google.appinventor.client.TopPanel.java

License:Open Source License

/**
 * Initializes and assembles all UI elements shown in the top panel.
 *///  w w  w  . j av  a  2  s  .  c  om
public TopPanel() {
    /*
     * The layout of the top panel is as follows:
     *
     *  +-- topPanel ------------------------------------+
     *  |+-- logo --++-----tools-----++--links/account--+|
     *  ||          ||               ||                 ||
     *  |+----------++---------------++-----------------+|
     *  +------------------------------------------------+
     */
    HorizontalPanel topPanel = new HorizontalPanel();
    topPanel.setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);

    // Create the Tools
    TopToolbar tools = new TopToolbar();
    ode.setTopToolbar(tools);

    // Create the Links
    HorizontalPanel links = new HorizontalPanel();
    links.setStyleName("ode-TopPanelLinks");
    links.setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);

    if (Ode.getInstance().isReadOnly()) {
        Label readOnly = new Label(MESSAGES.readOnlyMode());
        readOnly.setStyleName("ode-TopPanelWarningLabel");
        links.add(readOnly);
    }

    // My Projects Link
    TextButton myProjects = new TextButton(MESSAGES.myProjectsTabName());
    myProjects.setStyleName("ode-TopPanelButton");

    myProjects.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            ode.switchToProjectsView();
        }
    });

    myProjects.setStyleName("ode-TopPanelButton");
    links.add(myProjects);

    // Code on gallerydev branch
    // Gallery Link
    gallery = new TextButton(MESSAGES.tabNameGallery());
    gallery.setStyleName("ode-TopPanelButton");
    gallery.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent clickEvent) {
            ode.switchToGalleryView();
        }
    });
    links.add(gallery);

    Config config = ode.getSystemConfig();
    String guideUrl = config.getGuideUrl();
    if (!Strings.isNullOrEmpty(guideUrl)) {
        TextButton guideLink = new TextButton(MESSAGES.guideTabName());
        guideLink.addClickHandler(new WindowOpenClickHandler(guideUrl));
        guideLink.setStyleName("ode-TopPanelButton");
        links.add(guideLink);
    }

    // Feedback Link
    String feedbackUrl = config.getFeedbackUrl();
    if (!Strings.isNullOrEmpty(feedbackUrl)) {
        TextButton feedbackLink = new TextButton(MESSAGES.feedbackTabName());
        feedbackLink.addClickHandler(new WindowOpenClickHandler(feedbackUrl));
        feedbackLink.setStyleName("ode-TopPanelButton");
        links.add(feedbackLink);
    }

    /*
    // Code on master branch
      // Gallery Link
      if (Ode.getInstance().getUser().getIsAdmin()) {
        TextButton gallery = new TextButton(MESSAGES.galleryTabName());
        gallery.addClickHandler(new ClickHandler() {
          @Override
          public void onClick(ClickEvent clickEvent) {
            Window.open("http://gallery.appinventor.mit.edu", "_blank", "scrollbars=1");
          }
        });
            
        gallery.setStyleName("ode-TopPanelButton");
        links.add(gallery);
      }
      */

    moderation = new TextButton(MESSAGES.tabNameModeration());
    moderation.setStyleName("ode-TopPanelButton");
    moderation.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent clickEvent) {
            ode.switchToModerationPageView();
        }
    });
    moderation.setVisible(false);
    links.add(moderation);

    // Create the Account Information
    rightPanel = new VerticalPanel();
    rightPanel.setHeight("100%");
    rightPanel.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);

    HorizontalPanel account = new HorizontalPanel();
    account.setStyleName("ode-TopPanelAccount");

    // Account Drop Down Button
    List<DropDownItem> userItems = Lists.newArrayList();

    // Sign Out
    userItems.add(new DropDownItem(WIDGET_NAME_SIGN_OUT, MESSAGES.signOutLink(), new SignOutAction()));

    accountButton = new DropDownButton(WIDGET_NAME_USER, " ", userItems, true);
    accountButton.setItemEnabled(WIDGET_NAME_MESSAGES, false);
    accountButton.setStyleName("ode-TopPanelButton");

    // Language
    List<DropDownItem> languageItems = Lists.newArrayList();
    String[] localeNames = LocaleInfo.getAvailableLocaleNames();
    String nativeName;
    for (String localeName : localeNames) {
        if (!localeName.equals("default")) {
            SelectLanguage lang = new SelectLanguage();
            lang.setLocale(localeName);
            nativeName = getDisplayName(localeName);
            languageItems.add(new DropDownItem(WIDGET_NAME_LANGUAGE, nativeName, lang));
        }
    }
    String currentLang = LocaleInfo.getCurrentLocale().getLocaleName();
    String nativeDisplayName = getDisplayName(currentLang);
    languageDropDown = new DropDownButton(WIDGET_NAME_LANGUAGE, nativeDisplayName, languageItems, true);
    languageDropDown.setStyleName("ode-TopPanelButton");

    account.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);
    account.add(links);
    account.add(languageDropDown);
    account.add(accountButton);

    rightPanel.add(account);

    // Add the Logo, Tools, Links to the TopPanel
    addLogo(topPanel);
    topPanel.add(tools);
    topPanel.add(rightPanel);
    topPanel.setCellVerticalAlignment(rightPanel, HorizontalPanel.ALIGN_MIDDLE);
    rightPanel.setCellHorizontalAlignment(account, HorizontalPanel.ALIGN_RIGHT);
    topPanel.setCellHorizontalAlignment(rightPanel, HorizontalPanel.ALIGN_RIGHT);

    initWidget(topPanel);

    setStyleName("ode-TopPanel");
    setWidth("100%");
}

From source file:com.google.appinventor.client.TopPanel.java

License:Open Source License

private void addLogo(HorizontalPanel panel) {
    // Logo should be a link to App Inv homepage. Currently, after the user
    // has logged in, the top level *is* ODE; so for now don't make it a link.
    // Add timestamp to logo url to get around browsers that agressively cache
    // the image! This same trick is used in StorageUtil.getFilePath().
    Image logo = new Image(LOGO_IMAGE_URL + "?t=" + System.currentTimeMillis());
    logo.setSize("40px", "40px");
    logo.setStyleName("ode-Logo");
    String logoUrl = ode.getSystemConfig().getLogoUrl();
    if (!Strings.isNullOrEmpty(logoUrl)) {
        logo.addClickHandler(new WindowOpenClickHandler(logoUrl));
    }/*from  w  w w .  j a  v  a 2s .c om*/
    panel.add(logo);
    panel.setCellWidth(logo, "50px");
    Label title = new Label("MIT App Inventor 2");
    Label version = new Label("Beta");
    title.setStyleName("ode-LogoText");
    version.setStyleName("ode-LogoVersion");
    VerticalPanel titleContainer = new VerticalPanel();
    titleContainer.add(title);
    titleContainer.add(version);
    titleContainer.setCellHorizontalAlignment(version, HorizontalPanel.ALIGN_RIGHT);
    panel.add(titleContainer);
    panel.setCellWidth(titleContainer, "180px");
    panel.setCellHorizontalAlignment(logo, HorizontalPanel.ALIGN_LEFT);
    panel.setCellVerticalAlignment(logo, HorizontalPanel.ALIGN_MIDDLE);
}