Example usage for com.google.gwt.user.client.ui VerticalPanel setCellWidth

List of usage examples for com.google.gwt.user.client.ui VerticalPanel setCellWidth

Introduction

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

Prototype

public void setCellWidth(IsWidget w, String width) 

Source Link

Document

Overloaded version for IsWidget.

Usage

From source file:com.dimdim.conference.ui.common.client.list.ListPanel.java

License:Open Source License

/**
 * If the panel is being added to the first or second section, then add straight away.
 * For sticky entries add to the /*from w  w  w .j  a  va2 s  .  com*/
 * @param sectionPanel
 * @param listEntryPanel
 */
protected void addEntryPanelToSection(VerticalPanel sectionPanel, ListEntryPanel listEntryPanel) {
    //Window.alert("addEntryPanelToSection--1");
    if (sectionPanel != this.scrollableEntriesPanel) {
        sectionPanel.add(listEntryPanel);
        sectionPanel.setCellHorizontalAlignment(listEntryPanel, HasAlignment.ALIGN_LEFT);
        sectionPanel.setCellVerticalAlignment(listEntryPanel, HasAlignment.ALIGN_MIDDLE);
        sectionPanel.setCellWidth(listEntryPanel, "100%");

        listEntryPanel.setPanelVisible(true);
    } else {
        this.scrollablePanels.add(listEntryPanel);
        int i = this.getNumberOfScrollableEntries();
        if (this.scrollableEntriesPanel.getWidgetCount() < i) {
            sectionPanel.add(listEntryPanel);
            sectionPanel.setCellHorizontalAlignment(listEntryPanel, HasAlignment.ALIGN_LEFT);
            sectionPanel.setCellVerticalAlignment(listEntryPanel, HasAlignment.ALIGN_MIDDLE);
            sectionPanel.setCellWidth(listEntryPanel, "100%");

            listEntryPanel.setPanelVisible(true);
        } else {
            this.browseControl.numberOfPanelsChanged();
        }
    }
    //      listEntryPanel.setVisible(false);
    //      Window.alert("addEntryPanelToSection--3");
}

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

License:Open Source License

protected Widget getContent() {
    ScrollPanel scroller = new ScrollPanel();
    scroller.setStyleName("list-popup-scroll-panel");
    VerticalPanel table = new VerticalPanel();
    VerticalPanel scrolledTable = new VerticalPanel();
    scroller.add(scrolledTable);/*from  ww  w.j av  a2s  . co  m*/
    //      table.setStyleName("list-control-table");

    /*
    HorizontalPanel header1 = new HorizontalPanel();
    header1.add(createLabel("Conference Permissions","conference-permissions-header"));
            
    Label chat1 = createLabel("Chat","conference-chat-button-header");
    header1.add(chat1);
    Label audio1 = createLabel("Audio","conference-chat-button-header");
    header1.add(audio1);
    Label video1 = createLabel("Video","conference-chat-button-header");
    header1.add(video1);
            
    header1.addStyleName("common-dialog-row");
    table.add(header1);
            
    HorizontalPanel defaultsRow = new HorizontalPanel();
    defaultsRow.addStyleName("common-dialog-row");
    Label text1 = createTextHTML("Let all attendees to:",
       "conference-permissions-comment-1");
    defaultsRow.add(text1);
            
    HorizontalPanel hp21 = new HorizontalPanel();
    CheckBox cb11 = new CheckBox();
    hp21.add(cb11);
    hp21.setStyleName("user-chat-button");
    hp21.setCellHorizontalAlignment(cb11,HorizontalPanel.ALIGN_LEFT);
    hp21.setCellVerticalAlignment(cb11,VerticalPanel.ALIGN_MIDDLE);
    defaultsRow.add(hp21);
    defaultsRow.setCellHorizontalAlignment(hp21,HorizontalPanel.ALIGN_LEFT);
    defaultsRow.setCellVerticalAlignment(hp21,VerticalPanel.ALIGN_MIDDLE);
            
    HorizontalPanel hp31 = new HorizontalPanel();
    CheckBox cb21 = new CheckBox();
    hp31.add(cb21);
    hp31.setStyleName("user-chat-button");
    hp31.setCellHorizontalAlignment(cb21,HorizontalPanel.ALIGN_LEFT);
    hp31.setCellVerticalAlignment(cb21,VerticalPanel.ALIGN_MIDDLE);
    defaultsRow.add(hp31);
    defaultsRow.setCellHorizontalAlignment(hp31,HorizontalPanel.ALIGN_LEFT);
    defaultsRow.setCellVerticalAlignment(hp31,VerticalPanel.ALIGN_MIDDLE);
            
    HorizontalPanel hp41 = new HorizontalPanel();
    CheckBox cb31 = new CheckBox();
    hp41.add(cb31);
    hp41.setStyleName("user-chat-button");
    hp41.setCellHorizontalAlignment(cb31,HorizontalPanel.ALIGN_LEFT);
    hp41.setCellVerticalAlignment(cb31,VerticalPanel.ALIGN_MIDDLE);
    defaultsRow.add(hp41);
    defaultsRow.setCellHorizontalAlignment(hp41,HorizontalPanel.ALIGN_LEFT);
    defaultsRow.setCellVerticalAlignment(hp41,VerticalPanel.ALIGN_MIDDLE);
            
    table.add(defaultsRow);
            
    HTML line1 = new HTML("&nbsp;");
    line1.setStyleName("section-break");
    table.add(line1);
            
    HorizontalPanel header2 = new HorizontalPanel();
    header2.add(createLabel("Enable Meeting Lobby","conference-permissions-header"));
            
    HorizontalPanel hp22 = new HorizontalPanel();
    CheckBox cb12 = new CheckBox();
    hp22.add(cb12);
    hp22.setStyleName("user-chat-button");
    hp22.setCellHorizontalAlignment(cb12,HorizontalPanel.ALIGN_LEFT);
    hp22.setCellVerticalAlignment(cb12,VerticalPanel.ALIGN_MIDDLE);
    header2.add(hp22);
    header2.setCellHorizontalAlignment(hp22,HorizontalPanel.ALIGN_LEFT);
    header2.setCellVerticalAlignment(hp22,VerticalPanel.ALIGN_MIDDLE);
            
    HTML filler1 = new HTML(".");
    filler1.setStyleName("conference-button-filler");
    header2.setCellHorizontalAlignment(filler1,HorizontalPanel.ALIGN_LEFT);
    header2.setCellVerticalAlignment(filler1,VerticalPanel.ALIGN_MIDDLE);
    header2.add(filler1);
            
    HTML filler2 = new HTML(".");
    filler2.setStyleName("conference-button-filler");
    header2.setCellHorizontalAlignment(filler2,HorizontalPanel.ALIGN_LEFT);
    header2.setCellVerticalAlignment(filler2,VerticalPanel.ALIGN_MIDDLE);
    header2.add(filler2);
            
    header2.addStyleName("common-dialog-row");
    table.add(header2);
            
    HTML line2 = new HTML("&nbsp;");
    line2.setStyleName("section-break");
    table.add(line2);
            
    */

    int size = this.listModel.getListSize();
    //   Now all the users if any are available.
    if (size > 0) {
        UIResources uiResources = UIResources.getUIResources();
        HorizontalPanel header = new HorizontalPanel();
        header.add(createLabel(ConferenceGlobals.getDisplayString("console.moodlabel", "Mood"),
                "user-image-header"));
        header.add(createLabel(UIStrings.getNameLabel(), "user-name-header"));
        //header.add(createLabel(UIStrings.getEmailLabel(),"user-email-header"));

        //if private chat is disbaled as feature 
        if (ConferenceGlobals.privateChatEnabled) {
            chatHeaderLabel = createLabel(UIStrings.getChatLabel(), "user-chat-button-header");
            chatHeaderLabel.addStyleName("common-anchor-default-color");
            header.add(chatHeaderLabel);
            chatHeaderLabel.addClickListener(this);
        }
        if (!ConferenceGlobals.isPresenterAVAudioDisabled() && ConferenceGlobals.partListEnabled) {
            String label = UIStrings.getAudioLabel();
            if (ConferenceGlobals.isPresenterAVVideoOnly()) {
                label = UIStrings.getVideoLabel();
                audioCheckBoxSet.setMaxChecked(userManager.getMaximumAttendeeVideos());
            }
            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.add(scroller);
        table.setCellWidth(scroller, "100%");
        int i = 0;
        for (i = 0; i < size; i++) {
            UserListEntry ule = (UserListEntry) this.listModel.getListEntryAt(i);
            final UIRosterEntry user = ule.getUser();
            if (user.isHost()) {
                continue;
            }
            HorizontalPanel row = new HorizontalPanel();

            HorizontalPanel hp1 = new HorizontalPanel();
            Image image = UserGlobals.getUserGlobals().getMoodImageUrl(user.getMood());
            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");
            if (ConferenceGlobals.privateChatEnabled) {
                nameLabel.addClickListener(new ClickListener() {
                    public void onClick(Widget sender) {
                        NewChatController.getController().showChatPopupIfPossible(user);
                        hide();
                    }
                });
                nameLabel.addStyleName("common-anchor-default-color");
            }
            row.add(nameLabel);

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

            if (!ConferenceGlobals.isPresenterAVAudioDisabled() && ConferenceGlobals.partListEnabled) {
                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);
                if (user.isVideoOn() && !ConferenceGlobals.isPresenterAVVideoOnly()) {
                    cb2.setChecked(user.isVideoOn());
                    cb2.setEnabled(false);
                } else {
                    cb2.setChecked(user.isAudioOn());
                    if (ConferenceGlobals.isPresenterAVVideoOnly()) {
                        cb2.setChecked(user.isVideoOn());
                    }
                    this.audioCheckBoxes.put(user.getUserId(), cb2);
                    this.audioCheckBoxSet.addCheckBox(cb2);
                }
            }
            /*
            HorizontalPanel hp4 = new HorizontalPanel();
            CheckBox cb3 = new CheckBox();
            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);
            cb3.setChecked(user.isVideoOn());
            this.videoCheckBoxes.put(user.getUserId(),cb3);
            */

            row.addStyleName("common-dialog-row");
            scrolledTable.add(row);
        }
    } else {
        HorizontalPanel header2 = new HorizontalPanel();
        header2.add(createLabel(UIStrings.getNoParticipantsMessage(), "conference-permissions-header"));

        table.add(header2);
    }
    return table;
}

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

License:Open Source License

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

    //UIResources  uiResources = UIResources.getUIResources();
    //String   subject = uiResources.getConferenceInfo("subject");
    int size = this.listModel.getListSize();
    int i = 0;
    if (size > 0) {
        HorizontalPanel header = new HorizontalPanel();
        header.add(createLabel(ConferenceGlobals.getDisplayString("console.moodlabel", "Mood"),
                "user-image-header"));
        header.add(createLabel(UIStrings.getNameLabel(), "user-name-header"));
        //header.add(createLabel(UIStrings.getEmailLabel(),"user-email-header"));

        if (this.allowUserControl) {
            Label chat = createLabel(UIStrings.getChatLabel(), "user-chat-button-header");
            chat.addStyleName("common-anchor-default-color");
            header.add(chat);
            String label = UIStrings.getAudioLabel();
            if (ConferenceGlobals.isPresenterAVVideoOnly()) {
                label = UIStrings.getVideoLabel();
            }
            Label audio = createLabel(label, "user-chat-button-header");
            audio.addStyleName("common-anchor-default-color");
            header.add(audio);

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

        for (i = 0; i < size; i++) {
            UserListEntry ule = (UserListEntry) this.listModel.getListEntryAt(i);
            final UIRosterEntry user = ule.getUser();
            //            UIListEntryPanelMouseAndClickListener mcl = new UIListEntryPanelMouseAndClickListener(
            //                  ule,this.userListAndEntryProperties,this.userListEntryManager);
            //            mcl.setSecondLevelPopup(true);

            HorizontalPanel row = new HorizontalPanel();

            HorizontalPanel hp1 = new HorizontalPanel();
            Image image = UserGlobals.getUserGlobals().getMoodImageUrl(user.getMood());
            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 = createTextLabel(user.getDisplayName(), "user-name");
            if (!me.getUserId().equals(user.getUserId())) {
                if (ConferenceGlobals.privateChatEnabled) {
                    nameLabel.addStyleName("common-anchor-default-color");
                    nameLabel.addClickListener(new ClickListener() {
                        public void onClick(Widget sender) {
                            NewChatController.getController().showChatPopupIfPossible(user);
                            hide();
                        }
                    });
                }
            }
            //            nameLabel.addClickListener(mcl);
            //            nameLabel.addMouseListener(mcl);
            row.add(nameLabel);

            if (this.allowUserControl) {
                HorizontalPanel hp2 = new HorizontalPanel();
                CheckBox cb1 = new CheckBox();
                hp2.add(cb1);
                hp2.setStyleName("user-chat-button");
                hp2.setCellHorizontalAlignment(cb1, HorizontalPanel.ALIGN_LEFT);
                hp2.setCellVerticalAlignment(cb1, VerticalPanel.ALIGN_MIDDLE);
                row.add(hp2);
                row.setCellHorizontalAlignment(hp2, HorizontalPanel.ALIGN_LEFT);
                row.setCellVerticalAlignment(hp2, VerticalPanel.ALIGN_MIDDLE);

                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);

                //               HorizontalPanel hp4 = new HorizontalPanel();
                //               CheckBox cb3 = new CheckBox();
                //               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);
        }
    } else {
        HorizontalPanel header2 = new HorizontalPanel();
        header2.add(createLabel(UIStrings.getNoParticipantsMessage(), "conference-permissions-header"));

        table.add(header2);
    }

    return table;
}

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

License:Open Source License

private void fillTextPresenter() {
    String text = EnvGlobals.getDisplayString("oscheck.label", "Operating systems Check");
    Label lbl = new Label(text);
    //lbl.setStyleName("console-label");
    RootPanel.get("os_check_text").add(lbl);

    text = EnvGlobals.getDisplayString("browsercheck.label", "Browser Support Check");
    lbl = new Label(text);
    //lbl.setStyleName("console-label");
    RootPanel.get("browser_check_text").add(lbl);

    text = EnvGlobals.getDisplayString("flashcheck.label", "Flash Player version check");
    lbl = new Label(text);
    //lbl.setStyleName("console-label");
    RootPanel.get("flash_check_text").add(lbl);

    String osType = getOSType();/*from  ww w .jav  a 2  s .  co m*/
    if ("true".equalsIgnoreCase(getPubEnabled()) && !EnvGlobals.OS_MAC.equals(osType)
            && !EnvGlobals.OS_LINUX.equals(osType) && !EnvGlobals.OS_UNIX.equals(osType)) {
        text = EnvGlobals.getDisplayString("pubcheck.label", "Plugin Check");
        lbl = new Label(text);
        //lbl.setStyleName("console-label");
        RootPanel.get("plugin_check_text").add(lbl);
    }

    VerticalPanel description = new VerticalPanel();
    Label header = new Label(EnvGlobals.getDisplayString("desc.label", "Description"));
    header.setStyleName("subheadders");
    description.add(header);
    HTML seperator1 = new HTML("&nbsp;");
    description.add(seperator1);
    description.setCellWidth(seperator1, "100%");

    Label check1 = new Label(EnvGlobals.getDisplayString("oscheck.desc",
            " 1. A Meeting can be started Windows XP/Vista/2003/2000, Mac and Linux."));
    Label check2 = new Label(EnvGlobals.getDisplayString("browsercheck.desc",
            "2. A Meeting can be started on Firefox 1.5 onwards and IE 6 onwards."));
    //Window.alert("flsh desc...."+EnvGlobals.getDisplayString("flashcheck.desc","3. A Meeeting can be started on Adobe Flash Player (version 9 or higher)."));
    HTML check3 = new HTML(EnvGlobals.getDisplayString("flashcheck.desc",
            "3. A Meeeting can be started on Adobe Flash Player (version 9 or higher)."));
    Label check4 = new Label(EnvGlobals.getDisplayString("pubcheck.desc",
            "4. Dimdim Publisher is required to use screen share."));

    check1.setStyleName("console-label");
    check2.setStyleName("console-label");
    check3.setStyleName("console-label");
    check4.setStyleName("console-label");

    description.add(check1);
    HTML seperator2 = new HTML("&nbsp;");
    description.add(seperator2);
    description.setCellWidth(seperator2, "100%");

    description.add(check2);
    HTML seperator3 = new HTML("&nbsp;");
    description.add(seperator3);
    description.setCellWidth(seperator3, "100%");

    description.add(check3);
    HTML seperator4 = new HTML("&nbsp;");
    description.add(seperator4);
    description.setCellWidth(seperator4, "100%");

    description.add(check4);

    RootPanel.get("description_box").add(description);
    //Window.alert("after fillTextPresenter...");
}

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

License:Open Source License

private void fillTextAttendee() {
    String text = EnvGlobals.getDisplayString("browsercheck.label", "Browser Support Check");
    Label lbl = new Label(text);
    //lbl.setStyleName("console-label");
    RootPanel.get("browser_check_text").add(lbl);

    text = EnvGlobals.getDisplayString("flashcheck.label", "Flash Player version check");
    lbl = new Label(text);
    //lbl.setStyleName("console-label");
    RootPanel.get("flash_check_text").add(lbl);

    VerticalPanel description = new VerticalPanel();
    Label header = new Label(EnvGlobals.getDisplayString("desc.label", "Description"));
    header.setStyleName("subheadders");
    description.add(header);/*from   w w w  .  j a v a  2s .c om*/
    HTML seperator1 = new HTML("&nbsp;");
    description.add(seperator1);
    description.setCellWidth(seperator1, "100%");

    Label check2 = new Label(EnvGlobals.getDisplayString("browsercheck.att.desc",
            " A Meeting can be joined on Firefox 1.5 onwards and IE 6 onwards."));
    HTML check3 = new HTML(EnvGlobals.getDisplayString("flashcheck.att.desc",
            "A Meeeting can be joined on Adobe Flash Player (version 8 or higher)."));

    check2.setStyleName("console-label");
    check3.setStyleName("console-label");

    description.add(check2);
    HTML seperator3 = new HTML("&nbsp;");
    description.add(seperator3);
    description.setCellWidth(seperator3, "100%");

    description.add(check3);
    HTML seperator4 = new HTML("&nbsp;");
    description.add(seperator4);
    description.setCellWidth(seperator4, "100%");

    RootPanel.get("description_box").add(description);
    //Window.alert("after fillTextAttendee...");
}

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);/* w ww . j a v  a2s  .  co  m*/
    headerPanel1.add(filler1Panel, DockPanel.CENTER);
    headerPanel1.setCellWidth(filler1Panel, "100%");

    basePanel.add(headerPanel1);
    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);/*from   w  w  w.  j  a va 2  s .co m*/
    headerPanel1.add(filler1Panel, DockPanel.CENTER);
    headerPanel1.setCellWidth(filler1Panel, "100%");

    basePanel.add(headerPanel1);
    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.resources.client.ResourceTypeListEntryPopupPanel.java

License:Open Source License

private void writeListPanel(DockPanel outer) {
    Vector vec = new Vector();
    UIResourceObject currentActiveResource = ConferenceGlobals.getCurrentSharedResource();
    numberOfItems = 0;/*from ww  w. ja  va 2 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 {
    }
}

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  www .j a v a 2  s .co  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);//from  w  w w.j av  a2s.co  m
    //      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;
}