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

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

Introduction

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

Prototype

@Override
    public void add(Widget w) 

Source Link

Usage

From source file:com.dimdim.conference.ui.envcheck.client.main.EnvChecksSummaryPanel.java

License:Open Source License

private void prepareCheckResultPanel(HorizontalPanel row, PNGImage okImage, PNGImage errorImage,
        Label commentLabel, String comment) {
    row.add(okImage);
    row.setCellHorizontalAlignment(okImage, HorizontalPanel.ALIGN_LEFT);
    row.setCellVerticalAlignment(okImage, VerticalPanel.ALIGN_MIDDLE);

    row.add(errorImage);/*from  w  ww . jav  a2  s .  co  m*/
    row.setCellHorizontalAlignment(errorImage, HorizontalPanel.ALIGN_LEFT);
    row.setCellVerticalAlignment(errorImage, VerticalPanel.ALIGN_MIDDLE);

    commentLabel.setText(comment);
    commentLabel.setStyleName("common-text");
    commentLabel.addStyleName("env-check-result-comment");
    row.add(commentLabel);
    row.setCellWidth(commentLabel, "100%");
    row.setCellHorizontalAlignment(commentLabel, HorizontalPanel.ALIGN_LEFT);
    row.setCellVerticalAlignment(commentLabel, VerticalPanel.ALIGN_MIDDLE);
    Window.alert("commentLabel = " + commentLabel);
    this.basePanel.add(row);
    row.setStyleName("env-check-result-row");
    row.setVisible(false);
}

From source file:com.dimdim.conference.ui.layout.client.widget.MeetingAssistentDialog.java

License:Open Source License

protected Widget getContent() {
    VerticalPanel basePanel = new VerticalPanel();
    //      VerticalPanel   basePanel2 = new VerticalPanel();
    basePanel.setStyleName("meeting-assistent-panel");

    headerPanel1 = new DockPanel();
    headerPanel1.setStyleName("meeting-assistent-header-1");
    closeButton = new PNGImage("images/assistent/close.png", 16, 16);
    closeButton.addStyleName("anchor-cursor");
    headerPanel1.add(closeButton, DockPanel.EAST);
    headerPanel1.setCellHorizontalAlignment(closeButton, HorizontalPanel.ALIGN_RIGHT);
    headerPanel1.setCellVerticalAlignment(closeButton, VerticalPanel.ALIGN_TOP);
    closeButton.addClickListener(this);

    Label filler1 = new Label(" ");
    HorizontalPanel filler1Panel = new HorizontalPanel();
    filler1Panel.add(filler1);
    headerPanel1.add(filler1Panel, DockPanel.CENTER);
    headerPanel1.setCellWidth(filler1Panel, "100%");

    basePanel.add(headerPanel1);/* w  w w .  j  a v  a 2s .  c o  m*/
    basePanel.setCellHorizontalAlignment(headerPanel1, HorizontalPanel.ALIGN_RIGHT);
    basePanel.setCellVerticalAlignment(headerPanel1, VerticalPanel.ALIGN_TOP);
    basePanel.setCellWidth(headerPanel1, "100%");

    //      headerPanel2 = new DockPanel();
    Label label = new Label(ConferenceGlobals.getDisplayString("meeting.assistant.title",
            "What would you like to do with Web Meeting today?"));
    label.setStyleName("meeting-assistent-header-2");
    //      headerPanel2.setStyleName("meeting-assistent-header-2");
    //      headerPanel2.add(label,DockPanel.CENTER);
    //      headerPanel2.setCellHorizontalAlignment(label,HorizontalPanel.ALIGN_CENTER);
    //      headerPanel2.setCellVerticalAlignment(label,VerticalPanel.ALIGN_TOP);
    //      headerPanel2.setCellWidth(label,"100%");

    HorizontalPanel labelPanel = new HorizontalPanel();
    labelPanel.add(label);
    labelPanel.setCellHorizontalAlignment(label, HorizontalPanel.ALIGN_CENTER);
    basePanel.add(labelPanel);
    basePanel.setCellHorizontalAlignment(labelPanel, HorizontalPanel.ALIGN_CENTER);
    basePanel.setCellVerticalAlignment(labelPanel, VerticalPanel.ALIGN_TOP);
    basePanel.setCellWidth(labelPanel, "100%");

    //      basePanel.add(basePanel2);
    //      basePanel.setCellHorizontalAlignment(basePanel2,HorizontalPanel.ALIGN_CENTER);
    //      basePanel.setCellVerticalAlignment(basePanel2,VerticalPanel.ALIGN_TOP);
    //      basePanel.setCellWidth(basePanel2,"100%");

    //      ImageButtonPanel desktopButton = new ImageButtonPanel("Share Desktop Screen",null,
    //            "label-base","red-label-normal","red-label-mouseover");
    String desktopButtonColor = "gray";
    if (ConferenceGlobals.publisherEnabled) {
        desktopButtonColor = "red";
    }
    desktopButton = new ImageButtonPanel2(
            ConferenceGlobals.getDisplayString("meeting.assistant.desktop", "Share Desktop Screen"), null,
            desktopButtonColor);
    basePanel.add(desktopButton);
    basePanel.setCellHorizontalAlignment(desktopButton, HorizontalPanel.ALIGN_RIGHT);
    basePanel.setCellVerticalAlignment(desktopButton, VerticalPanel.ALIGN_MIDDLE);
    desktopButton.addClickListener(this);

    String whiteboardButtonColor = "gray";
    if (ConferenceGlobals.whiteboardEnabled) {
        whiteboardButtonColor = "green";
    }
    whiteboardButton = new ImageButtonPanel2(
            ConferenceGlobals.getDisplayString("meeting.assistant.whiteboard", "Share Whiteboard"), null,
            whiteboardButtonColor);
    basePanel.add(whiteboardButton);
    basePanel.setCellHorizontalAlignment(whiteboardButton, HorizontalPanel.ALIGN_RIGHT);
    basePanel.setCellVerticalAlignment(whiteboardButton, VerticalPanel.ALIGN_MIDDLE);
    whiteboardButton.addClickListener(this);

    ImageButtonPanel2 pptButton = new ImageButtonPanel2(
            ConferenceGlobals.getDisplayString("meeting.assistant.presentation", "Share a Presentation"), null,
            "blue");
    basePanel.add(pptButton);
    basePanel.setCellHorizontalAlignment(pptButton, HorizontalPanel.ALIGN_RIGHT);
    basePanel.setCellVerticalAlignment(pptButton, VerticalPanel.ALIGN_MIDDLE);
    //Window.alert("click lietener = "+middlePanel.getShareButtonListener());
    pptButton.addClickListener(this);
    pptButton.addClickListener(middlePanel.getShareButtonListener());

    Label label2 = new Label(" ");
    basePanel.add(label2);
    basePanel.setCellHorizontalAlignment(label2, HorizontalPanel.ALIGN_RIGHT);
    basePanel.setCellVerticalAlignment(label2, VerticalPanel.ALIGN_MIDDLE);

    ScrollPanel sPanel = new ScrollPanel();
    sPanel.setSize("550px", "390px");
    sPanel.add(basePanel);

    return sPanel;
}

From source file:com.dimdim.conference.ui.layout2.client.MeetingAssistentDialog.java

License:Open Source License

protected Widget getContent() {
    VerticalPanel basePanel = new VerticalPanel();
    basePanel.setStyleName("meeting-assistent-panel");

    headerPanel1 = new DockPanel();
    headerPanel1.setStyleName("meeting-assistent-header-1");
    closeButton = new PNGImage("images/assistent/close.png", 16, 16);
    closeButton.addStyleName("anchor-cursor");
    headerPanel1.add(closeButton, DockPanel.EAST);
    headerPanel1.setCellHorizontalAlignment(closeButton, HorizontalPanel.ALIGN_RIGHT);
    headerPanel1.setCellVerticalAlignment(closeButton, VerticalPanel.ALIGN_TOP);
    closeButton.addClickListener(this);

    Label filler1 = new Label(" ");
    HorizontalPanel filler1Panel = new HorizontalPanel();
    filler1Panel.add(filler1);
    headerPanel1.add(filler1Panel, DockPanel.CENTER);
    headerPanel1.setCellWidth(filler1Panel, "100%");

    basePanel.add(headerPanel1);//from  w  w  w .jav  a  2 s . co m
    basePanel.setCellHorizontalAlignment(headerPanel1, HorizontalPanel.ALIGN_RIGHT);
    basePanel.setCellVerticalAlignment(headerPanel1, VerticalPanel.ALIGN_TOP);
    basePanel.setCellWidth(headerPanel1, "100%");

    Label label = new Label(ConferenceGlobals.getDisplayString("meeting.assistant.title",
            "What would you like to do with Web Meeting today?"));
    label.setStyleName("meeting-assistent-header-2");
    HorizontalPanel labelPanel = new HorizontalPanel();
    labelPanel.add(label);
    labelPanel.setCellHorizontalAlignment(label, HorizontalPanel.ALIGN_CENTER);
    basePanel.add(labelPanel);
    basePanel.setCellHorizontalAlignment(labelPanel, HorizontalPanel.ALIGN_CENTER);
    basePanel.setCellVerticalAlignment(labelPanel, VerticalPanel.ALIGN_TOP);
    basePanel.setCellWidth(labelPanel, "100%");

    String desktopButtonColor = "gray";
    if (ConferenceGlobals.publisherEnabled) {
        desktopButtonColor = "red";
    }
    desktopButton = new ImageButtonPanel2(
            ConferenceGlobals.getDisplayString("meeting.assistant.desktop", "Share Desktop Screen"), null,
            desktopButtonColor);
    basePanel.add(desktopButton);
    basePanel.setCellHorizontalAlignment(desktopButton, HorizontalPanel.ALIGN_RIGHT);
    basePanel.setCellVerticalAlignment(desktopButton, VerticalPanel.ALIGN_MIDDLE);
    desktopButton.addClickListener(this);

    String whiteboardButtonColor = "gray";
    if (ConferenceGlobals.whiteboardEnabled) {
        whiteboardButtonColor = "green";
    }
    whiteboardButton = new ImageButtonPanel2(
            ConferenceGlobals.getDisplayString("meeting.assistant.whiteboard", "Share Whiteboard"), null,
            whiteboardButtonColor);
    basePanel.add(whiteboardButton);
    basePanel.setCellHorizontalAlignment(whiteboardButton, HorizontalPanel.ALIGN_RIGHT);
    basePanel.setCellVerticalAlignment(whiteboardButton, VerticalPanel.ALIGN_MIDDLE);
    whiteboardButton.addClickListener(this);

    String pptButtonColor = "gray";
    if (ConferenceGlobals.docEnabled) {
        pptButtonColor = "blue";
    }
    ImageButtonPanel2 pptButton = new ImageButtonPanel2(
            ConferenceGlobals.getDisplayString("meeting.assistant.presentation", "Share a Presentation"), null,
            pptButtonColor);
    basePanel.add(pptButton);
    basePanel.setCellHorizontalAlignment(pptButton, HorizontalPanel.ALIGN_RIGHT);
    basePanel.setCellVerticalAlignment(pptButton, VerticalPanel.ALIGN_MIDDLE);
    //      pptButton.addClickListener(middlePanel.getShareButtonListener());
    if (ConferenceGlobals.docEnabled) {
        pptButton.addClickListener(this);
        pptButton.addClickListener(this.shareClickListener);
    }

    Label label2 = new Label(" ");
    basePanel.add(label2);
    basePanel.setCellHorizontalAlignment(label2, HorizontalPanel.ALIGN_RIGHT);
    basePanel.setCellVerticalAlignment(label2, VerticalPanel.ALIGN_MIDDLE);

    ScrollPanel sPanel = new ScrollPanel();
    sPanel.setSize("550px", "390px");
    sPanel.add(basePanel);

    return sPanel;
}

From source file:com.dimdim.conference.ui.panels.client.ChatWidget.java

License:Open Source License

private void fillContent(WorkspacePanel workSpace) {
    chatWidget = new DiscussionWidget(ClientModel.getClientModel().getRosterModel().getCurrentUser(),
            workSpace);//w  ww  .  j  a va 2s .  c om
    chatWidget.setSize("100%", "100%");
    chatPanel.add(chatWidget);
    chatPanel.setCellHorizontalAlignment(chatWidget, HorizontalPanel.ALIGN_CENTER);
    FocusPanel otherLinksPanel = new FocusPanel();
    HorizontalPanel h1 = new HorizontalPanel();

    chatLink = new Label(ConferenceGlobals.getDisplayString("workspace.hide.chat.label", "Public Chat"));
    chatLink.setStyleName("common-text");
    chatLink.addStyleName("common-bold-text");

    h1.setWidth("100%");
    h1.add(chatLink);
    h1.setCellWidth(chatLink, "100%");
    h1.setCellHorizontalAlignment(chatLink, HorizontalPanel.ALIGN_CENTER);
    Image img = getPublicChatCloseImage();
    h1.add(img);
    Label l = new Label(" ");
    l.setWidth("10px");
    h1.add(l);

    otherLinksPanel.add(h1);
    otherLinksPanel
            .setTitle(ConferenceGlobals.getDisplayString("workspace.hide.chat.title", "Click to hide Chat"));

    verticalPanel.add(chatWidget);

    otherLinksPanel.setWidth("100%");
    otherLinksPanel.addStyleName("anchor-cursor");
    otherLinksPanel.addClickListener(this);

    workspaceLayout.addPanelToLayout("chat_pod_header", otherLinksPanel);
    workspaceLayout.addPanelToLayout("chat_pod_content", verticalPanel);

    addChatWidget();
}

From source file:com.dimdim.conference.ui.panels.client.StopRecordingFormWidget.java

License:Open Source License

private void addField(Widget w1, Widget w2, String w1Width, String w2Width) {
    HorizontalPanel hp1 = new HorizontalPanel();
    w1.setStyleName("common-text");
    hp1.add(w1);
    hp1.setCellWidth(w1, w1Width);//from w  w w .  j  a va  2s .co  m
    if (w2 != null) {
        w2.setStyleName("common-text");
        hp1.add(w2);
        hp1.setCellWidth(w2, w2Width);
    }
    this.add(hp1);
    this.setCellWidth(hp1, "100%");
}

From source file:com.dimdim.conference.ui.resources.client.ResourceControlDialog.java

License:Open Source License

protected Widget getContent() {
    table = new VerticalPanel();
    Widget content = table;/*w  ww.j a  va2 s .c  o m*/
    //      table.setStyleName("list-control-table");
    UIResourceObject currentActiveResource = ConferenceGlobals.getCurrentSharedResource();

    HorizontalPanel header = new HorizontalPanel();
    header.add(createLabel(".", "resource-image-header"));
    header.add(createLabel(UIStrings.getNameLabel(), "resource-name-header"));
    header.add(createLabel(UIStrings.getTypeLabel(), "resource-type-header"));
    if (this.allowResourceControl) {
        deleteHeader = createLabel(UIStrings.getDeleteLabel(), "resource-delete-button-header");
        deleteHeader.addStyleName("common-anchor-default-color");
        deleteHeader.addClickListener(this);
        header.add(deleteHeader);
    }
    header.addStyleName("common-dialog-row");
    table.add(header);

    int size = this.listModel.getListSize();
    if (size > 5) {
        VerticalPanel vp = new VerticalPanel();
        ScrollPanel scroller = new ScrollPanel();
        scroller.setStyleName("resource-control-dialog-height");
        scroller.add(table);
        vp.add(scroller);
        content = vp;
    }
    int i = 0;

    Vector sortedList = getSortedList(listModel);
    for (i = 0; i < size; i++) {
        ResourceListEntry rle = (ResourceListEntry) sortedList.get(i);
        UIResourceObject res = rle.getResource();
        if (this.typeName != null && !res.getResourceType().equals(this.typeName)) {
            continue;
        }
        //         UIListEntryPanelMouseAndClickListener mcl = new UIListEntryPanelMouseAndClickListener(
        //               rle,this.resourceListAndEntryProperties,this.listEntryManager);
        //         mcl.setSecondLevelPopup(true);

        HorizontalPanel row = new HorizontalPanel();

        HorizontalPanel hp1 = new HorizontalPanel();
        Image image = getImage(res);
        hp1.add(image);
        hp1.setCellHorizontalAlignment(image, HorizontalPanel.ALIGN_CENTER);
        hp1.setCellVerticalAlignment(image, VerticalPanel.ALIGN_MIDDLE);
        hp1.addStyleName("resource-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(res.getResourceName(), "resource-name", 23);
        //         nameLabel.addStyleName("common-anchor");
        //         nameLabel.addClickListener(mcl);
        //         nameLabel.addMouseListener(mcl);
        row.add(nameLabel);

        row.add(createTextHTML(ResourceGlobals.getResourceGlobals().getResourceTypeNiceName(res),
                "resource-type"));

        if (this.allowResourceControl) {
            HorizontalPanel hp2 = new HorizontalPanel();
            CheckBox cb = new CheckBox();
            hp2.add(cb);
            hp2.setStyleName("resource-delete-button");
            hp2.setCellHorizontalAlignment(cb, HorizontalPanel.ALIGN_LEFT);
            hp2.setCellVerticalAlignment(cb, VerticalPanel.ALIGN_MIDDLE);
            row.add(hp2);
            row.setCellHorizontalAlignment(hp2, HorizontalPanel.ALIGN_LEFT);
            row.setCellVerticalAlignment(hp2, VerticalPanel.ALIGN_MIDDLE);
            cb.addClickListener(this);
            this.checkBoxes.put(res.getResourceId(), cb);
            this.checkBoxes2.put(cb, cb);
            if (!ResourceGlobals.allowDelete(res) || (currentActiveResource != null
                    && currentActiveResource.getResourceId().equals(res.getResourceId()))) {
                cb.setEnabled(false);
            }
        }
        row.addStyleName("common-dialog-row");
        table.add(row);
        this.rows.put(res.getResourceId(), row);
    }
    return content;
}

From source file:com.dimdim.conference.ui.resources.client.ResourceDeleteDialog.java

License:Open Source License

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

    Label comment = new Label(ResourceGlobals.getResourceGlobals().getDeleteComment1(resource));
    comment.setStyleName("common-text");
    comment.addStyleName("common-table-header");
    table.add(comment);/*from   www. j av  a2s .  c o  m*/

    HorizontalPanel namePanel = new HorizontalPanel();

    Image image = listEntry.getImage1Url();
    namePanel.add(image);

    Label nameLabel = new Label(resource.getResourceName());
    nameLabel.setStyleName("common-text");
    nameLabel.addStyleName("common-table-text");
    namePanel.add(nameLabel);

    //      Label qm = new Label("?");
    //      qm.setStyleName("common-text");
    //      qm.addStyleName("common-table-header");
    //      namePanel.add(qm);

    table.add(namePanel);

    //      String s = ResourceGlobals.getResourceGlobals().getDeleteComment2(resource);
    //      if (s != null && s.length() > 0)
    //      {
    //         Label comment2 = new Label(s);
    //         comment2.setStyleName("common-text");
    //         comment2.addStyleName("common-table-header");
    //         table.add(comment2);
    //      }

    //      HTML line1 = new HTML("&nbsp;");
    //      line1.setStyleName("resource-delete-dialog-line-break");
    //      table.add(line1);

    return table;
}

From source file:com.dimdim.conference.ui.resources.client.ResourceRenameDialog.java

License:Open Source License

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

    //      Label comment = new Label("Rename");
    //      comment.setStyleName("common-text");
    //      comment.addStyleName("common-table-header");
    //      table.add(comment);

    HorizontalPanel namePanel = new HorizontalPanel();

    Image image = listEntry.getImage1Url();
    namePanel.add(image);

    Label nameLabel = new Label(resource.getResourceName());
    nameLabel.setStyleName("common-text");
    nameLabel.addStyleName("common-table-text");
    namePanel.add(nameLabel);/*from w  w w .  j a  v  a  2s  . com*/

    table.add(namePanel);

    Label comment2 = new Label(ResourceGlobals.getResourceGlobals().getRenameComment1(resource));
    comment2.setStyleName("common-text");
    comment2.addStyleName("common-table-header");
    table.add(comment2);

    this.newName = new TextBox();
    this.newName.setText("");
    this.newName.setStyleName("common-text");
    this.newName.addStyleName("common-table-text");
    this.newName.setStyleName("resource-rename-new-name");
    this.newName.setMaxLength(40);
    table.add(this.newName);
    this.newName.addKeyboardListener(this);

    return table;
}

From source file:com.dimdim.conference.ui.resources.client.ResourceTypeListEntryPanel.java

License:Open Source License

protected Image setImage(DockPanel imagePanel, Image currentImage, Image newImage, ClickListener clickListener,
        HorizontalPanel subPanel, String tooltip, boolean rightAlign) {
    Image image2 = currentImage;//from  w w  w .  ja va  2  s.com
    if (currentImage != null) {
        if (subPanel != null) {
            //Window.alert("subpanel = is not null so removing..");
            subPanel.remove(currentImage);
            image2 = null;
        } else if (imagePanel != null) {
            imagePanel.remove(currentImage);
            image2 = null;
        }
    }
    if (newImage != null) {
        {
            image2 = newImage;
            image2.addStyleName("list-entry-panel-image");
            if (subPanel != null) {
                subPanel.add(image2);
                subPanel.setCellHorizontalAlignment(image2, HorizontalPanel.ALIGN_CENTER);
                subPanel.setCellVerticalAlignment(image2, VerticalPanel.ALIGN_MIDDLE);
            } else {
                if (rightAlign) {
                    imagePanel.add(image2, DockPanel.EAST);
                    imagePanel.setCellHorizontalAlignment(image2, HorizontalPanel.ALIGN_RIGHT);
                    imagePanel.setCellVerticalAlignment(image2, VerticalPanel.ALIGN_MIDDLE);
                } else {
                    imagePanel.add(image2, DockPanel.WEST);
                    imagePanel.setCellHorizontalAlignment(image2, HorizontalPanel.ALIGN_CENTER);
                    imagePanel.setCellVerticalAlignment(image2, VerticalPanel.ALIGN_MIDDLE);
                }
            }
            if (clickListener != null) {
                image2.addClickListener(clickListener);
                //image2.addStyleName("anchor-cursor");
            }
            if (tooltip != null) {
                image2.setTitle(tooltip);
            }
        }
    }
    return image2;
}

From source file:com.dimdim.conference.ui.resources.client.ResourceTypeListEntryPopupPanel.java

License:Open Source License

private void writeListPanel(DockPanel outer) {
    Vector vec = new Vector();
    UIResourceObject currentActiveResource = ConferenceGlobals.getCurrentSharedResource();
    numberOfItems = 0;//from  w w  w  . j ava2  s.  c om

    int size = this.resourceList.getListSize();
    for (int i = 0; i < size; i++) {
        UIResourceObject res = ((ResourceListEntry) this.resourceList.getListEntryAt(i)).getResource();
        if (res.getResourceType().equals(this.typeName)) {
            Label resLabel = new FixedLengthLabel(res.getResourceName(), 26);
            //            resLabel.setStyleName("tool-entry");
            resLabel.setStyleName("resource-entry");
            resLabel.addStyleName("anchor-cursor");
            resLabel.addClickListener(this);
            resLabel.addClickListener(this.rtpcp.getNameLabelClickListener(res));

            HorizontalPanel h1 = new HorizontalPanel();
            Widget img = new HorizontalPanel();

            if (currentActiveResource != null
                    && currentActiveResource.getResourceId().equals(res.getResourceId())) {
                img = this.getSharingInProgressImageUrl();
                //               h2.add(img);
                //               h2.setCellVerticalAlignment(img, VerticalPanel.ALIGN_MIDDLE);
                //               h2.setCellHorizontalAlignment(img, HorizontalPanel.ALIGN_CENTER);
            } else {
                img = new Label(" ");
                img.setWidth("18px");
                //               h2.add(filler);
            }
            //            h2.setWidth("18px");
            h1.add(img);
            //            h1.setCellWidth(img, "100%");
            h1.setCellHeight(img, "100%");
            h1.setCellHorizontalAlignment(img, HorizontalPanel.ALIGN_LEFT);
            h1.setCellVerticalAlignment(img, VerticalPanel.ALIGN_MIDDLE);
            h1.add(resLabel);
            h1.setCellWidth(resLabel, "100%");
            h1.setCellHeight(resLabel, "100%");
            h1.setCellVerticalAlignment(resLabel, VerticalPanel.ALIGN_MIDDLE);
            h1.setStyleName("resource-entry-panel");
            if (numberOfItems == 0) {
                h1.addStyleName("first-resource-entry-panel");
            }
            resLabel.addMouseListener(new ResourceHoverStyler(h1));
            vec.add(h1);
            //            panel.add(h1);
            //            panel.setCellWidth(h1, "100%");
            //            panel.setCellHorizontalAlignment(h1, HorizontalPanel.ALIGN_LEFT);
            //            panel.setCellVerticalAlignment(h1, VerticalPanel.ALIGN_MIDDLE);
            numberOfItems++;
        }
    }

    if (numberOfItems != 0) {
        int scrollLimit = UIParams.getUIParams().getBrowserParamIntValue("resource_popup_scroll_limit", 5);
        if (numberOfItems > scrollLimit) {
            ScrollPanel sp = new ScrollPanel();
            int width = UIParams.getUIParams().getBrowserParamIntValue("resource_popup_scroll_width", 250);
            int barWidth = UIParams.getUIParams().getBrowserParamIntValue("resource_popup_scroll_bar_width",
                    250);
            int height = UIParams.getUIParams().getBrowserParamIntValue("resource_popup_scroll_height", 150);
            sp.setSize(width + "px", height + "px");
            VerticalPanel panel = new VerticalPanel();
            panel.setSize((width - barWidth) + "px", height + "px");
            sp.add(panel);
            outer.add(sp, DockPanel.NORTH);
            outer.setCellHorizontalAlignment(sp, HorizontalPanel.ALIGN_LEFT);
            outer.setCellVerticalAlignment(sp, VerticalPanel.ALIGN_MIDDLE);
            int size2 = vec.size();
            for (int i = 0; i < size2; i++) {
                HorizontalPanel h = (HorizontalPanel) vec.elementAt(i);
                panel.add(h);
                panel.setCellWidth(h, "100%");
                panel.setCellHorizontalAlignment(h, HorizontalPanel.ALIGN_LEFT);
                panel.setCellVerticalAlignment(h, VerticalPanel.ALIGN_MIDDLE);
            }
        } else {
            int size2 = vec.size();
            for (int i = 0; i < size2; i++) {
                HorizontalPanel h = (HorizontalPanel) vec.elementAt(i);
                outer.add(h, DockPanel.NORTH);
                outer.setCellWidth(h, "100%");
                outer.setCellHorizontalAlignment(h, HorizontalPanel.ALIGN_LEFT);
                outer.setCellVerticalAlignment(h, VerticalPanel.ALIGN_MIDDLE);
            }
        }
    } else {
    }
}