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.dialogues.client.FeedbackDialog.java

License:Open Source License

protected Widget getContent() {
    basePanel = new VerticalPanel();
    message = new TextArea();

    basePanel.add(this.rateExperienceComment);
    basePanel.setCellWidth(this.rateExperienceComment, "100%");
    basePanel.setCellVerticalAlignment(this.rateExperienceComment, VerticalPanel.ALIGN_MIDDLE);
    this.rateExperienceComment.setStyleName("invitations-preview-comment");

    HTML line1 = new HTML(" ");
    line1.setStyleName("line-break");
    basePanel.add(line1);/*from  w  w  w  .  j  a  v a  2 s  .  c  om*/

    HorizontalPanel excellentPanel = new HorizontalPanel();
    excellentPanel.add(this.excellent);
    this.excellent.addStyleName("feedback-button");
    excellentPanel.setCellVerticalAlignment(this.excellent, VerticalPanel.ALIGN_MIDDLE);
    excellentPanel.add(this.excellentButtonTag);
    excellentPanel.setCellVerticalAlignment(this.excellentButtonTag, VerticalPanel.ALIGN_MIDDLE);
    this.excellentButtonTag.setWordWrap(false);
    this.excellentButtonTag.setStyleName("invitations-preview-comment");
    this.excellentButtonTag.addStyleName("feedback-button-tag-text");
    basePanel.add(excellentPanel);

    HorizontalPanel goodPanel = new HorizontalPanel();
    goodPanel.add(this.good);
    this.good.addStyleName("feedback-button");
    goodPanel.setCellVerticalAlignment(this.good, VerticalPanel.ALIGN_MIDDLE);
    goodPanel.add(this.goodButtonTag);
    goodPanel.setCellVerticalAlignment(this.goodButtonTag, VerticalPanel.ALIGN_MIDDLE);
    this.goodButtonTag.setWordWrap(false);
    this.goodButtonTag.setStyleName("invitations-preview-comment");
    this.goodButtonTag.addStyleName("feedback-button-tag-text");
    basePanel.add(goodPanel);

    HorizontalPanel neutralPanel = new HorizontalPanel();
    neutralPanel.add(this.neutral);
    this.neutral.addStyleName("feedback-button");
    neutralPanel.setCellVerticalAlignment(this.neutral, VerticalPanel.ALIGN_MIDDLE);
    neutralPanel.add(this.neutralButtonTag);
    neutralPanel.setCellVerticalAlignment(this.neutralButtonTag, VerticalPanel.ALIGN_MIDDLE);
    this.neutralButtonTag.setWordWrap(false);
    this.neutralButtonTag.setStyleName("invitations-preview-comment");
    this.neutralButtonTag.addStyleName("feedback-button-tag-text");
    basePanel.add(neutralPanel);

    HorizontalPanel fairPanel = new HorizontalPanel();
    fairPanel.add(this.fair);
    this.fair.addStyleName("feedback-button");
    fairPanel.setCellVerticalAlignment(this.fair, VerticalPanel.ALIGN_MIDDLE);
    fairPanel.add(this.fairButtonTag);
    fairPanel.setCellVerticalAlignment(this.fairButtonTag, VerticalPanel.ALIGN_MIDDLE);
    this.fairButtonTag.setWordWrap(false);
    this.fairButtonTag.setStyleName("invitations-preview-comment");
    this.fairButtonTag.addStyleName("feedback-button-tag-text");
    basePanel.add(fairPanel);

    HorizontalPanel poorPanel = new HorizontalPanel();
    poorPanel.add(this.poor);
    this.poor.addStyleName("feedback-button");
    poorPanel.setCellVerticalAlignment(this.poor, VerticalPanel.ALIGN_MIDDLE);
    poorPanel.add(this.poorButtonTag);
    poorPanel.setCellVerticalAlignment(this.poorButtonTag, VerticalPanel.ALIGN_MIDDLE);
    this.poorButtonTag.setWordWrap(false);
    this.poorButtonTag.setStyleName("invitations-preview-comment");
    this.poorButtonTag.addStyleName("feedback-button-tag-text");
    basePanel.add(poorPanel);

    HTML line2 = new HTML(" ");
    line2.setStyleName("line-break");
    basePanel.add(line2);

    //      Window.alert("5");
    HTML messageComment = new HTML(UIGlobals.getFeedbackMessageComment());
    basePanel.add(messageComment);
    basePanel.setCellWidth(messageComment, "100%");
    messageComment.setStyleName("invitations-preview-comment");
    basePanel.add(message);
    message.setVisibleLines(4);
    basePanel.setCellWidth(message, "100%");
    message.setStyleName("invitations-preview-textarea");

    HTML line3 = new HTML(" ");
    line3.setStyleName("line-break");
    basePanel.add(line3);

    return basePanel;
}

From source file:com.dimdim.conference.ui.dialogues.client.SettingsDialog.java

License:Open Source License

protected Widget getContent() {
    SettingsModel currentSettings = ClientModel.getClientModel().getSettingsModel();
    RosterModel rosterModel = ClientModel.getClientModel().getRosterModel();
    String currentNetworkProfile = rosterModel.getCurrentUser().getNetProfile();
    String currentImageQuality = rosterModel.getCurrentUser().getImgQuality();
    int currentMaxAudios = rosterModel.getMaximumAttendeeAudios();
    UIParams uiParams = UIParams.getUIParams();
    basePanel = new VerticalPanel();

    //      basePanel.setStyleName("send-invitation-preview-box");
    basePanel.add(this.settingsMainComment);
    basePanel.setCellWidth(this.settingsMainComment, "100%");
    this.settingsMainComment.setStyleName("invitations-preview-comment");

    HTML line0 = new HTML(" ");
    line0.setStyleName("line-break");
    basePanel.add(line0);//from   www  .j  a  va2 s .  co  m

    //   Meeting Lobby

    HorizontalPanel lobbyControlButtons = new HorizontalPanel();
    lobbyControlButtons.add(this.meetingLobbyComment);
    lobbyControlButtons.setCellVerticalAlignment(this.meetingLobbyComment, VerticalPanel.ALIGN_MIDDLE);
    this.meetingLobbyComment.setStyleName("invitations-preview-comment");
    this.meetingLobbyComment.addStyleName("settings-item-heading");

    this.enableLobby.setChecked(currentSettings.isLobbyEnabled());
    lobbyControlButtons.add(this.enableLobby);
    lobbyControlButtons.setCellVerticalAlignment(this.enableLobby, VerticalPanel.ALIGN_MIDDLE);
    lobbyControlButtons.add(this.enableLobbyButtonTag);
    lobbyControlButtons.setCellVerticalAlignment(this.enableLobbyButtonTag, VerticalPanel.ALIGN_MIDDLE);
    this.enableLobbyButtonTag.setWordWrap(false);
    this.enableLobbyButtonTag.setStyleName("invitations-preview-comment");
    this.enableLobbyButtonTag.addStyleName("settings-button-tag-text");

    this.disableLobby.setChecked(!currentSettings.isLobbyEnabled());
    lobbyControlButtons.add(this.disableLobby);
    lobbyControlButtons.setCellVerticalAlignment(this.disableLobby, VerticalPanel.ALIGN_MIDDLE);
    lobbyControlButtons.add(this.disableLobbyButtonTag);
    lobbyControlButtons.setCellVerticalAlignment(this.disableLobbyButtonTag, VerticalPanel.ALIGN_MIDDLE);
    this.disableLobbyButtonTag.setWordWrap(false);
    this.disableLobbyButtonTag.setStyleName("invitations-preview-comment");
    this.disableLobbyButtonTag.addStyleName("settings-button-tag-text");

    basePanel.add(lobbyControlButtons);

    //   Network Profile

    if (ConferenceGlobals.publisherEnabled) {
        HTML line1 = new HTML(" ");
        line1.setStyleName("line-break");
        basePanel.add(line1);

        HorizontalPanel networkProfileButtons = new HorizontalPanel();
        networkProfileButtons.add(this.networkProfileComment);
        networkProfileButtons.setCellVerticalAlignment(this.networkProfileComment, VerticalPanel.ALIGN_MIDDLE);
        this.networkProfileComment.setStyleName("invitations-preview-comment");
        this.networkProfileComment.addStyleName("settings-item-heading");

        this.networkProfile1.setChecked(currentNetworkProfile.equals("1"));
        networkProfileButtons.add(this.networkProfile1);
        networkProfileButtons.setCellVerticalAlignment(this.networkProfile1, VerticalPanel.ALIGN_MIDDLE);
        networkProfileButtons.add(this.networkProfile1ButtonTag);
        networkProfileButtons.setCellVerticalAlignment(this.networkProfile1ButtonTag,
                VerticalPanel.ALIGN_MIDDLE);
        this.networkProfile1ButtonTag.setWordWrap(false);
        this.networkProfile1ButtonTag.setStyleName("invitations-preview-comment");
        this.networkProfile1ButtonTag.addStyleName("settings-button-tag-text");

        this.networkProfile2.setChecked(currentNetworkProfile.equals("2"));
        networkProfileButtons.add(this.networkProfile2);
        networkProfileButtons.setCellVerticalAlignment(this.networkProfile2, VerticalPanel.ALIGN_MIDDLE);
        networkProfileButtons.add(this.networkProfile2ButtonTag);
        networkProfileButtons.setCellVerticalAlignment(this.networkProfile2ButtonTag,
                VerticalPanel.ALIGN_MIDDLE);
        this.networkProfile2ButtonTag.setWordWrap(false);
        this.networkProfile2ButtonTag.setStyleName("invitations-preview-comment");
        this.networkProfile2ButtonTag.addStyleName("settings-button-tag-text");

        this.networkProfile3.setChecked(currentNetworkProfile.equals("3"));
        networkProfileButtons.add(this.networkProfile3);
        networkProfileButtons.setCellVerticalAlignment(this.networkProfile3, VerticalPanel.ALIGN_MIDDLE);
        networkProfileButtons.add(this.networkProfile3ButtonTag);
        networkProfileButtons.setCellVerticalAlignment(this.networkProfile3ButtonTag,
                VerticalPanel.ALIGN_MIDDLE);
        this.networkProfile3ButtonTag.setWordWrap(false);
        this.networkProfile3ButtonTag.setStyleName("invitations-preview-comment");
        this.networkProfile3ButtonTag.addStyleName("settings-button-tag-text");

        basePanel.add(networkProfileButtons);

        //         HTML line2 = new HTML(" ");
        //         line2.setStyleName("line-break");
        //         basePanel.add(line2);

        //   Image Quality

        //         HorizontalPanel imageQualityButtons = new HorizontalPanel();
        //         imageQualityButtons.add(this.imageQualityComment);
        //         imageQualityButtons.setCellVerticalAlignment(this.imageQualityComment, VerticalPanel.ALIGN_MIDDLE);
        //         this.imageQualityComment.setStyleName("invitations-preview-comment");
        //         this.imageQualityComment.addStyleName("settings-item-heading");
        //         
        //         this.imageQualityLow.setChecked(currentImageQuality.equalsIgnoreCase("low"));
        //         imageQualityButtons.add(this.imageQualityLow);
        //         imageQualityButtons.setCellVerticalAlignment(this.imageQualityLow, VerticalPanel.ALIGN_MIDDLE);
        //         imageQualityButtons.add(this.imageQualityLowButtonTag);
        //         imageQualityButtons.setCellVerticalAlignment(this.imageQualityLowButtonTag, VerticalPanel.ALIGN_MIDDLE);
        //         this.imageQualityLowButtonTag.setWordWrap(false);
        //         this.imageQualityLowButtonTag.setStyleName("invitations-preview-comment");
        //         this.imageQualityLowButtonTag.addStyleName("settings-button-tag-text");
        //         
        //         this.imageQualityMedium.setChecked(currentImageQuality.equalsIgnoreCase("medium"));
        //         imageQualityButtons.add(this.imageQualityMedium);
        //         imageQualityButtons.setCellVerticalAlignment(this.imageQualityMedium, VerticalPanel.ALIGN_MIDDLE);
        //         imageQualityButtons.add(this.imageQualityMediumButtonTag);
        //         imageQualityButtons.setCellVerticalAlignment(this.imageQualityMediumButtonTag, VerticalPanel.ALIGN_MIDDLE);
        //         this.imageQualityMediumButtonTag.setWordWrap(false);
        //         this.imageQualityMediumButtonTag.setStyleName("invitations-preview-comment");
        //         this.imageQualityMediumButtonTag.addStyleName("settings-button-tag-text");
        //         
        //         this.imageQualityHigh.setChecked(currentImageQuality.equalsIgnoreCase("high"));
        //         imageQualityButtons.add(this.imageQualityHigh);
        //         imageQualityButtons.setCellVerticalAlignment(this.imageQualityHigh, VerticalPanel.ALIGN_MIDDLE);
        //         imageQualityButtons.add(this.imageQualityHighButtonTag);
        //         imageQualityButtons.setCellVerticalAlignment(this.imageQualityHighButtonTag, VerticalPanel.ALIGN_MIDDLE);
        //         this.imageQualityHighButtonTag.setWordWrap(false);
        //         this.imageQualityHighButtonTag.setStyleName("invitations-preview-comment");
        //         this.imageQualityHighButtonTag.addStyleName("settings-button-tag-text");
        //         
        //         basePanel.add(imageQualityButtons);
        //         
        //         HTML line3 = new HTML(" ");
        //         line3.setStyleName("line-break");
        //         basePanel.add(line3);

        // Mouse Track

        //         HorizontalPanel mouseControlButtons = new HorizontalPanel();
        //         mouseControlButtons.add(this.mouseTrackComment);
        //         mouseControlButtons.setCellVerticalAlignment(this.mouseTrackComment, VerticalPanel.ALIGN_MIDDLE);
        //         this.mouseTrackComment.setStyleName("invitations-preview-comment");
        //         this.mouseTrackComment.addStyleName("settings-item-heading");
        //         
        //         this.enableMouseTrack.setChecked(currentSettings.isMouseTrackEnabled());
        //         mouseControlButtons.add(this.enableMouseTrack);
        //         mouseControlButtons.setCellVerticalAlignment(this.enableMouseTrack, VerticalPanel.ALIGN_MIDDLE);
        //         mouseControlButtons.add(this.enableMouseTrackButtonTag);
        //         mouseControlButtons.setCellVerticalAlignment(this.enableMouseTrackButtonTag, VerticalPanel.ALIGN_MIDDLE);
        //         this.enableMouseTrackButtonTag.setWordWrap(false);
        //         this.enableMouseTrackButtonTag.setStyleName("invitations-preview-comment");
        //         this.enableMouseTrackButtonTag.addStyleName("settings-button-tag-text");
        //         
        //         this.disableMouseTrack.setChecked(!currentSettings.isMouseTrackEnabled());
        //         mouseControlButtons.add(this.disableMouseTrack);
        //         mouseControlButtons.setCellVerticalAlignment(this.disableMouseTrack, VerticalPanel.ALIGN_MIDDLE);
        //         mouseControlButtons.add(this.disableMouseTrackButtonTag);
        //         mouseControlButtons.setCellVerticalAlignment(this.disableMouseTrackButtonTag, VerticalPanel.ALIGN_MIDDLE);
        //         this.disableMouseTrackButtonTag.setWordWrap(false);
        //         this.disableMouseTrackButtonTag.setStyleName("invitations-preview-comment");
        //         this.disableMouseTrackButtonTag.addStyleName("settings-button-tag-text");
        //         
        //         basePanel.add(mouseControlButtons);
    } //these settings make sense only whe publisher is enabled

    HTML line5 = new HTML(" ");
    line5.setStyleName("line-break");
    basePanel.add(line5);

    //   Maximum participants
    HorizontalPanel maxParticipantsPanel = new HorizontalPanel();
    maxParticipantsPanel.add(this.maxParticipantsComment);
    maxParticipantsPanel.setCellVerticalAlignment(this.maxParticipantsComment, VerticalPanel.ALIGN_MIDDLE);
    maxParticipantsComment.setStyleName("invitations-preview-comment");
    maxParticipantsComment.addStyleName("settings-item-heading");

    maxParticipantsOptions = prepareListBox(ConferenceGlobals.currentMaxParticipants,
            uiParams.getMaxParticipantsForAnyMeeting(), 5);
    maxParticipantsPanel.add(maxParticipantsOptions);
    maxParticipantsPanel.setCellVerticalAlignment(maxParticipantsOptions, VerticalPanel.ALIGN_MIDDLE);

    basePanel.add(maxParticipantsPanel);
    basePanel.setCellVerticalAlignment(maxParticipantsPanel, VerticalPanel.ALIGN_MIDDLE);

    HTML line4 = new HTML(" ");
    line4.setStyleName("line-break");
    basePanel.add(line4);

    String s = ConferenceGlobals.getOverrideMaxParticipants();
    if (s != null && s.equalsIgnoreCase("false")) {
        maxParticipantsOptions.setEnabled(false);
    }

    //   Maximum meeting time

    int hours = ConferenceGlobals.currentMaxMeetingTime / 60;
    int minutes = ConferenceGlobals.currentMaxMeetingTime % 60;

    HorizontalPanel currentMeetingLengthPanel = new HorizontalPanel();
    currentMeetingLengthComment.setStyleName("invitations-preview-comment");
    currentMeetingLengthComment.addStyleName("settings-item-heading");
    currentMeetingLengthPanel.add(currentMeetingLengthComment);
    currentMeetingLengthPanel.setCellVerticalAlignment(currentMeetingLengthComment, VerticalPanel.ALIGN_MIDDLE);

    currentMeetingLengthHoursSuffix.setStyleName("common-text");
    currentMeetingLengthHoursSuffix.addStyleName("common-label");
    currentMeetingLengthMinutesSuffix.setStyleName("common-text");
    currentMeetingLengthMinutesSuffix.addStyleName("common-label");

    Label h = new Label("" + hours);
    h.setStyleName("common-text");
    h.addStyleName("common-label");
    currentMeetingLengthPanel.add(h);
    currentMeetingLengthPanel.setCellVerticalAlignment(h, VerticalPanel.ALIGN_MIDDLE);
    currentMeetingLengthPanel.add(currentMeetingLengthHoursSuffix);
    currentMeetingLengthPanel.setCellVerticalAlignment(currentMeetingLengthHoursSuffix,
            VerticalPanel.ALIGN_MIDDLE);

    Label m = new Label("" + minutes);
    m.setStyleName("common-text");
    m.addStyleName("common-label");
    currentMeetingLengthPanel.add(m);
    currentMeetingLengthPanel.setCellVerticalAlignment(m, VerticalPanel.ALIGN_MIDDLE);
    currentMeetingLengthPanel.add(currentMeetingLengthMinutesSuffix);
    currentMeetingLengthPanel.setCellVerticalAlignment(currentMeetingLengthMinutesSuffix,
            VerticalPanel.ALIGN_MIDDLE);

    basePanel.add(currentMeetingLengthPanel);
    basePanel.setCellVerticalAlignment(currentMeetingLengthPanel, VerticalPanel.ALIGN_MIDDLE);

    HorizontalPanel maxMeetingTimePanel = new HorizontalPanel();
    maxMeetingTimePanel.add(this.maxMeetingTimeComment);
    maxMeetingTimePanel.setCellVerticalAlignment(this.maxMeetingTimeComment, VerticalPanel.ALIGN_MIDDLE);
    maxMeetingTimeComment.setStyleName("invitations-preview-comment");
    maxMeetingTimeComment.addStyleName("settings-item-heading");

    maxMeetingHoursSuffix.setStyleName("invitations-preview-comment");
    maxMeetingMinutesSuffix.setStyleName("invitations-preview-comment");

    prepateMeetingTimeListBoxes(ConferenceGlobals.currentMaxMeetingTime,
            uiParams.getMaxMeetingTimeForAnyMeeting());

    //      maxMeetingTimeOptions = prepareListBox(ConferenceGlobals.currentMaxMeetingTime,
    //            uiParams.getMaxMeetingTimeForAnyMeeting(), 20);

    maxMeetingTimePanel.add(this.maxMeetingHoursOptions);
    maxMeetingTimePanel.setCellVerticalAlignment(maxMeetingHoursOptions, VerticalPanel.ALIGN_MIDDLE);
    maxMeetingTimePanel.add(this.maxMeetingHoursSuffix);
    maxMeetingTimePanel.setCellVerticalAlignment(maxMeetingHoursSuffix, VerticalPanel.ALIGN_MIDDLE);

    maxMeetingTimePanel.add(this.maxMeetingMinutesOptions);
    maxMeetingTimePanel.setCellVerticalAlignment(maxMeetingMinutesOptions, VerticalPanel.ALIGN_MIDDLE);
    maxMeetingTimePanel.add(this.maxMeetingMinutesSuffix);
    maxMeetingTimePanel.setCellVerticalAlignment(maxMeetingMinutesSuffix, VerticalPanel.ALIGN_MIDDLE);

    basePanel.add(maxMeetingTimePanel);
    basePanel.setCellVerticalAlignment(maxMeetingTimePanel, VerticalPanel.ALIGN_MIDDLE);

    HTML line6 = new HTML(" ");
    line6.setStyleName("line-break");
    basePanel.add(line6);

    //   Maximum attendee mikes
    if (!ConferenceGlobals.isPresenterAVAudioDisabled() && !ConferenceGlobals.isMeetingVideoChat()) {
        HorizontalPanel maxAttendeeMikesPanel = new HorizontalPanel();
        maxAttendeeMikesPanel.add(this.maxAttendeeMikesComment);
        maxAttendeeMikesPanel.setCellVerticalAlignment(this.maxAttendeeMikesComment,
                VerticalPanel.ALIGN_MIDDLE);
        maxAttendeeMikesComment.setStyleName("invitations-preview-comment");
        maxAttendeeMikesComment.addStyleName("settings-item-heading");

        maxAttendeeMikes = new ListBox();
        String sm = getServerMaxAttendeeAudios();
        int smi = (new Integer(sm)).intValue();
        for (int i = currentMaxAudios; i <= smi; i++) {
            maxAttendeeMikes.addItem("" + i);
        }
        maxAttendeeMikesPanel.add(maxAttendeeMikes);
        maxAttendeeMikesPanel.setCellVerticalAlignment(maxAttendeeMikes, VerticalPanel.ALIGN_MIDDLE);
        maxAttendeeMikesPanel.setVisible(false);

        basePanel.add(maxAttendeeMikesPanel);
        basePanel.setCellVerticalAlignment(maxAttendeeMikesPanel, VerticalPanel.ALIGN_MIDDLE);

        HTML line7 = new HTML("&nbsp;");
        line7.setStyleName("line-break");
        line7.setVisible(false);
        basePanel.add(line7);
    }
    //   Track back url

    HorizontalPanel returnURLPanel = new HorizontalPanel();
    returnURLPanel.add(this.returnURLComment);
    returnURLPanel.setCellVerticalAlignment(this.returnURLComment, VerticalPanel.ALIGN_MIDDLE);
    returnURLComment.setStyleName("invitations-preview-comment");
    returnURLComment.addStyleName("settings-item-heading");

    returnURL = new TextBox();
    returnURL.setText(this.getReturnUrlForSettings());
    returnURL.setStyleName("common-text");
    returnURLPanel.add(returnURL);
    returnURLPanel.setCellVerticalAlignment(returnURL, VerticalPanel.ALIGN_MIDDLE);

    basePanel.add(returnURLPanel);
    basePanel.setCellVerticalAlignment(returnURLPanel, VerticalPanel.ALIGN_MIDDLE);

    HTML line8 = new HTML("&nbsp;");
    line8.setStyleName("line-break");
    basePanel.add(line8);

    //      Window.alert("7");
    return basePanel;
}

From source file:com.dimdim.conference.ui.envcheck.client.layout.CommonMessagePopup.java

License:Open Source License

protected void drawDialog() {
    vp = new VerticalPanel();
    RoundedPanel rp = new RoundedPanel(vp);

    vp.setStyleName("common-dialog-outer-panel");
    rp.setStyleName("common-dialog-rounded-corner-panel");

    DockPanel buttonPanel = new DockPanel();
    if (this.showCloseButton) {
        closeButton = new Button(closeButtonText, new ClickListener() {
            public void onClick(Widget sender) {
                hide();// w ww .  j  a v a 2  s.c  om
                History.back(); //   TODO move out into a listener.
            }
        });
        closeButton.setStyleName("dm-popup-close-button");
        buttonPanel.add(closeButton, DockPanel.EAST);
        buttonPanel.setSpacing(0);
        HTML filler1 = new HTML("&nbsp;");
        buttonPanel.add(filler1, DockPanel.EAST);
    }
    if (this.dialogName != null) {
        //   Create a width adjustment panel.
        String widthStyle = this.dialogName + "-dialog-width";
        String heightStyle1 = this.dialogName + "-dialog-height-one";
        String heightStyle2 = this.dialogName + "-dialog-height-two";
        String contentWidthStyle = this.dialogName + "-dialog-content";

        content.addStyleName(contentWidthStyle);
        HorizontalPanel upperPanel = new HorizontalPanel();

        HTML upperLeftBar = new HTML("&nbsp;");
        upperLeftBar.setStyleName(heightStyle1);
        upperPanel.add(upperLeftBar);
        upperPanel.add(content);
        upperPanel.setCellWidth(content, "100%");
        upperPanel.setCellVerticalAlignment(content, VerticalPanel.ALIGN_MIDDLE);

        HorizontalPanel lowerPanel = new HorizontalPanel();
        lowerPanel.setStyleName(widthStyle);

        HTML lowerLeftBar = new HTML("&nbsp;");
        lowerLeftBar.setStyleName(heightStyle2);
        lowerPanel.add(lowerLeftBar);
        lowerPanel.add(buttonPanel);
        lowerPanel.setCellWidth(buttonPanel, "100%");
        lowerPanel.setCellHorizontalAlignment(buttonPanel, HorizontalPanel.ALIGN_RIGHT);
        lowerPanel.setCellVerticalAlignment(buttonPanel, VerticalPanel.ALIGN_MIDDLE);

        vp.add(upperPanel);
        vp.add(lowerPanel);
        this.addStyleName(this.dialogName + "-dialog-size");
    } else {
        vp.add(content);
        vp.setCellWidth(content, "100%");

        vp.add(buttonPanel);
        vp.setCellWidth(buttonPanel, "100%");
        vp.setCellHorizontalAlignment(buttonPanel, HorizontalPanel.ALIGN_RIGHT);
    }
    this.addPopupListener(this);

    this.add(vp);
}

From source file:com.dimdim.conference.ui.envcheck.client.layout.SignInControls.java

License:Open Source License

public SignInControls() {
    initWidget(basePanel);//from  w  w  w . j  a v a2  s .  c om

    /**
     * Assemble the form body top bar
     */
    topBar = new HorizontalPanel();

    PNGImage topLeftCorner = new PNGImage("images/form-area-leftcorner.png", 47, 47);
    topBar.add(topLeftCorner);
    topBar.setCellHorizontalAlignment(topLeftCorner, HorizontalPanel.ALIGN_LEFT);
    topBar.setCellVerticalAlignment(topLeftCorner, VerticalPanel.ALIGN_TOP);

    PNGImage topCenter = new PNGImage("images/formarea-top-back.png", 305, 47);
    topBar.add(topCenter);
    topBar.setCellHorizontalAlignment(topCenter, HorizontalPanel.ALIGN_LEFT);
    topBar.setCellVerticalAlignment(topCenter, VerticalPanel.ALIGN_TOP);

    PNGImage topRightCorner = new PNGImage("images/formarea-right-corner.png", 47, 47);
    topBar.add(topRightCorner);
    topBar.setCellHorizontalAlignment(topRightCorner, HorizontalPanel.ALIGN_LEFT);
    topBar.setCellVerticalAlignment(topRightCorner, VerticalPanel.ALIGN_TOP);

    basePanel.add(topBar);
    basePanel.setCellHorizontalAlignment(topBar, HorizontalPanel.ALIGN_LEFT);
    basePanel.setCellVerticalAlignment(topBar, VerticalPanel.ALIGN_TOP);

    /**
     * Assemble the form body
     */
    formBody = new HorizontalPanel();

    PNGImage bodyLeft = new PNGImage("images/formarea-left-tile.png", 47, 431);
    formBody.add(bodyLeft);
    formBody.setCellHorizontalAlignment(bodyLeft, HorizontalPanel.ALIGN_LEFT);
    formBody.setCellVerticalAlignment(bodyLeft, VerticalPanel.ALIGN_TOP);

    formContainer = new VerticalPanel();
    formContainer.setWidth("305px");
    formContainer.setHeight("431px");

    buttonsContainer = new VerticalPanel();
    buttonsContainer.setWidth("305px");
    buttonsContainer.setHeight("431px");

    buttonsPanel = new VerticalPanel();
    buttonsPanel.setWidth("305px");
    buttonsPanel.setHeight("431px");

    formContainer.add(buttonsContainer);
    formContainer.setCellHorizontalAlignment(buttonsContainer, HorizontalPanel.ALIGN_CENTER);
    formContainer.setCellVerticalAlignment(buttonsContainer, VerticalPanel.ALIGN_TOP);
    formContainer.setStyleName("signin-form-body-center");

    buttonsContainer.add(buttonsPanel);
    buttonsContainer.setCellHorizontalAlignment(buttonsPanel, HorizontalPanel.ALIGN_CENTER);
    buttonsContainer.setCellVerticalAlignment(buttonsPanel, VerticalPanel.ALIGN_MIDDLE);

    formBody.add(formContainer);
    formBody.setCellHorizontalAlignment(formContainer, HorizontalPanel.ALIGN_CENTER);
    formBody.setCellVerticalAlignment(formContainer, VerticalPanel.ALIGN_MIDDLE);

    PNGImage bodyRight = new PNGImage("images/formarea-right-tile.png", 47, 431);
    formBody.add(bodyRight);
    formBody.setCellHorizontalAlignment(bodyRight, HorizontalPanel.ALIGN_LEFT);
    formBody.setCellVerticalAlignment(bodyRight, VerticalPanel.ALIGN_TOP);

    basePanel.add(formBody);
    basePanel.setCellHorizontalAlignment(formBody, HorizontalPanel.ALIGN_LEFT);
    basePanel.setCellVerticalAlignment(formBody, VerticalPanel.ALIGN_TOP);

    /**
     * Assemble the form bottom bar
     */
    bottomBar = new HorizontalPanel();

    PNGImage bottomLeftCorner = new PNGImage("images/formarea-bot-left-corner.png", 47, 46);
    bottomBar.add(bottomLeftCorner);
    bottomBar.setCellHorizontalAlignment(bottomLeftCorner, HorizontalPanel.ALIGN_LEFT);
    bottomBar.setCellVerticalAlignment(bottomLeftCorner, VerticalPanel.ALIGN_TOP);

    PNGImage bottomCenter = new PNGImage("images/formarea-bottom-tile.png", 305, 46);
    bottomBar.add(bottomCenter);
    bottomBar.setCellHorizontalAlignment(bottomCenter, HorizontalPanel.ALIGN_LEFT);
    bottomBar.setCellVerticalAlignment(bottomCenter, VerticalPanel.ALIGN_TOP);

    PNGImage bottomRightCorner = new PNGImage("images/formarea-bot-right-corner.png", 47, 46);
    bottomBar.add(bottomRightCorner);
    bottomBar.setCellHorizontalAlignment(bottomRightCorner, HorizontalPanel.ALIGN_LEFT);
    bottomBar.setCellVerticalAlignment(bottomRightCorner, VerticalPanel.ALIGN_TOP);

    basePanel.add(bottomBar);
    basePanel.setCellHorizontalAlignment(bottomBar, HorizontalPanel.ALIGN_LEFT);
    basePanel.setCellVerticalAlignment(bottomBar, VerticalPanel.ALIGN_TOP);

    /**
     * Privacy and copyright policy links
     */
    HorizontalPanel linksPanel = new HorizontalPanel();
    linksPanel.setStyleName("bottom-panel-links");

    privacyPolicyLink = new Label(
            EnvGlobals.getDisplayString("dimdim_privacy_policy_link", "dimdim privacy policy"));
    privacyPolicyLink.setStyleName("common-text");
    privacyPolicyLink.addStyleName("common-anchor");
    privacyPolicyLink.addStyleName("bottom-panel-link");
    privacyPolicyLink.addClickListener(this);

    copyrightPolicyLink = new Label(EnvGlobals.getDisplayString("dimdim_copyright_policy_link",
            "dimdim trademark and copyright policy"));
    copyrightPolicyLink.setStyleName("common-text");
    copyrightPolicyLink.addStyleName("common-anchor");
    copyrightPolicyLink.addStyleName("bottom-panel-link");
    copyrightPolicyLink.addClickListener(this);

    linksPanel.add(privacyPolicyLink);
    linksPanel.setCellHorizontalAlignment(privacyPolicyLink, HorizontalPanel.ALIGN_LEFT);
    linksPanel.setCellVerticalAlignment(privacyPolicyLink, VerticalPanel.ALIGN_MIDDLE);

    HTML seperator1 = new HTML("|");
    seperator1.setStyleName("bottom-panel-links-seperator");
    linksPanel.add(seperator1);
    linksPanel.setCellHorizontalAlignment(seperator1, HorizontalPanel.ALIGN_LEFT);
    linksPanel.setCellVerticalAlignment(seperator1, VerticalPanel.ALIGN_MIDDLE);

    linksPanel.add(copyrightPolicyLink);
    linksPanel.setCellHorizontalAlignment(copyrightPolicyLink, HorizontalPanel.ALIGN_LEFT);
    linksPanel.setCellVerticalAlignment(copyrightPolicyLink, VerticalPanel.ALIGN_MIDDLE);

    basePanel.add(linksPanel);
    basePanel.setCellHorizontalAlignment(linksPanel, HorizontalPanel.ALIGN_CENTER);
    basePanel.setCellVerticalAlignment(linksPanel, VerticalPanel.ALIGN_MIDDLE);
}

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);/*from w  w w .j av a2s  .  c o  m*/
    row.setCellHorizontalAlignment(okImage, HorizontalPanel.ALIGN_LEFT);
    row.setCellVerticalAlignment(okImage, VerticalPanel.ALIGN_MIDDLE);

    row.add(errorImage);
    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.resources.client.ResourceControlDialog.java

License:Open Source License

protected Widget getContent() {
    table = new VerticalPanel();
    Widget content = table;//  www. j  av  a  2  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.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;//www. ja  va  2  s  .  co m
    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 a va2 s .  c o m*/

    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 {
    }
}

From source file:com.dimdim.conference.ui.user.client.email.EmailControlPanel.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);/*from w ww. j ava 2 s.  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++) {
        EmailTaskListEntry etle = (EmailTaskListEntry) this.listModel.getListEntryAt(i);
        this.results.addElement(etle);

        HorizontalPanel row = new HorizontalPanel();

        HorizontalPanel hp1 = new HorizontalPanel();
        Image image = etle.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(etle.getName(), "lobby-name");
        nameLabel.addStyleName("common-anchor");
        row.add(nameLabel);
        Label emailLabel = createTextHTML(etle.getEmailResult().getTarget(), "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.meetinglobby.MeetingLobbyControlPanel.java

License:Open Source License

protected Widget getContent() {
    ScrollPanel scroller = new ScrollPanel();
    scroller.setStyleName("list-popup-scroll-panel");
    VerticalPanel table = new VerticalPanel();
    scrolledTable = new VerticalPanel();
    scroller.add(scrolledTable);/* w ww  .  j a v a  2s.  com*/
    //      table.setStyleName("list-control-table");

    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.getAcceptLabel(), "user-chat-button-header");
    accept.addStyleName("common-anchor");
    accept.addClickListener(this.acceptList);
    header.add(accept);
    Label deny = createLabel(UIStrings.getDenyLabel(), "user-chat-button-header");
    deny.addStyleName("common-anchor");
    deny.addClickListener(this.denyList);
    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();
        RadioButton cb2 = new RadioButton(user.getUserId());
        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.acceptBoxes.addElement(cb2);
        this.acceptList.addRadioButton(cb2);

        HorizontalPanel hp4 = new HorizontalPanel();
        //         CheckBox cb3 = new CheckBox();
        RadioButton cb3 = new RadioButton(user.getUserId());
        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);
        this.denyBoxes.addElement(cb3);
        this.denyList.addRadioButton(cb3);

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

    return table;
}