Search in sources :

Example 1 with AbsolutePanel

use of com.google.gwt.user.client.ui.AbsolutePanel in project perun by CESNET.

the class UserExtSourceDetailTabItem method draw.

public Widget draw() {
    this.titleWidget.setText(Utils.getStrippedStringWithEllipsis(userExtSource.getLogin().trim()));
    // MAIN TAB PANEL
    VerticalPanel vp = new VerticalPanel();
    vp.setSize("100%", "100%");
    // The table
    AbsolutePanel dp = new AbsolutePanel();
    //dp.setStyleName("decoration");
    final FlexTable menu = new FlexTable();
    menu.setCellSpacing(5);
    menu.setWidget(0, 0, new Image(LargeIcons.INSTANCE.worldIcon()));
    Label memberName = new Label();
    memberName.setText(Utils.getStrippedStringWithEllipsis(userExtSource.getLogin(), 40));
    memberName.setStyleName("now-managing");
    memberName.setTitle(userExtSource.getLogin());
    menu.setWidget(0, 1, memberName);
    int column = 2;
    menu.setHTML(0, column, " ");
    menu.getFlexCellFormatter().setWidth(0, column, "25px");
    column++;
    if (JsonUtils.isExtendedInfoVisible()) {
        menu.setHTML(0, column, "<strong>UES ID:</strong><br/><span class=\"inputFormInlineComment\">" + userExtSource.getId() + "</span>");
        column++;
        menu.setHTML(0, column, "&nbsp;");
        menu.getFlexCellFormatter().setWidth(0, column, "25px");
        column++;
        menu.setHTML(0, column, "<strong>ES name:</strong><br/><span class=\"inputFormInlineComment\">" + userExtSource.getExtSource().getName() + "</span>");
        column++;
        menu.setHTML(0, column, "&nbsp;");
        menu.getFlexCellFormatter().setWidth(0, column, "25px");
        column++;
        menu.setHTML(0, column, "<strong>ES type:</strong><br/><span class=\"inputFormInlineComment\">" + userExtSource.getExtSource().getType() + "</span>");
    }
    dp.add(menu);
    vp.add(dp);
    vp.setCellHeight(dp, "30px");
    tabPanel.clear();
    tabPanel.add(new UserExtSourceSettingsTabItem(userExtSource), "Settings");
    // Resize must be called after page fully displays
    Scheduler.get().scheduleDeferred(new Command() {

        @Override
        public void execute() {
            tabPanel.finishAdding();
        }
    });
    vp.add(tabPanel);
    this.contentWidget.setWidget(vp);
    return getWidget();
}
Also used : VerticalPanel(com.google.gwt.user.client.ui.VerticalPanel) Command(com.google.gwt.user.client.Command) FlexTable(com.google.gwt.user.client.ui.FlexTable) Label(com.google.gwt.user.client.ui.Label) AbsolutePanel(com.google.gwt.user.client.ui.AbsolutePanel) Image(com.google.gwt.user.client.ui.Image)

Aggregations

Command (com.google.gwt.user.client.Command)1 AbsolutePanel (com.google.gwt.user.client.ui.AbsolutePanel)1 FlexTable (com.google.gwt.user.client.ui.FlexTable)1 Image (com.google.gwt.user.client.ui.Image)1 Label (com.google.gwt.user.client.ui.Label)1 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)1