Example usage for com.google.gwt.user.client.ui CheckBox CheckBox

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

Introduction

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

Prototype

public CheckBox() 

Source Link

Document

Creates a check box with no label.

Usage

From source file:client.argon.panel.ArgonInternalLinkListPanel.java

License:Open Source License

/**
 * @param result/*from  w  ww  . j ava  2s .  c  o m*/
 *            the list of links
 */
@Override
public final void onData(final Object result) {

    final InternalLinkList links = (InternalLinkList) result;
    RudListener.getInstance().getChecked().clear();

    this.reset();

    for (int i = 0; i < links.getLinks().size(); ++i) {

        final TableRow row = new TableRow();
        final InternalLink l = ((InternalLink) links.getLinks().get(i));

        // TODO: make more generic
        this.fillTable(row, l);

        // the checkbox to delete a link
        final CheckBox deleteBox = new CheckBox();
        // Router can be identified by their LoopBackAddress
        deleteBox.setName(l.getUniqueLabel());
        deleteBox.addClickListener(RudListener.getInstance());
        row.addField(deleteBox);

        if (null != l.getPopup()) {
            row.setDialog(new InfoDialog("Info", l.getPopup()));
        }

        this.addRow(row);

    }

    if (0 == links.getLinks().size()) {
        this.addDummyRow("Nothing found...");
    }

    this.flush();

    // notify listeners (i.e. button and gif from ReservationAdmin)
}

From source file:client.template.panel.LinkListPanel.java

License:Open Source License

/**
 * @param result//from   w ww .  j a v a2  s  . c om
 *            the list of links
 */
@Override
public void onData(final Object result) {

    // enable buttons again, this should be somewhere else TODO

    final EndpointList links = (EndpointList) result;
    RudListener.getInstance().getChecked().clear();

    this.reset();

    for (int i = 0; i < links.getLinks().size(); ++i) {

        final TableRow row = new TableRow();
        final Endpoint l = ((Endpoint) links.getLinks().get(i));

        // TODO: make more generic
        this.fillTable(row, l);

        // the checkbox to delete a link
        final CheckBox deleteBox = new CheckBox();
        // Router can be identified by their LoopBackAddress
        deleteBox.setName(l.getUniqueLabel());
        deleteBox.addClickListener(RudListener.getInstance());
        row.addField(deleteBox);

        if (null != l.getPopup()) {
            row.setDialog(new InfoDialog("Info", l.getPopup()));
        }

        this.addRow(row);

    }

    if (0 == links.getLinks().size()) {
        this.addDummyRow("Nothing found...");
    }

    this.flush();

    // notify listeners (i.e. button and gif from ReservationAdmin)
}

From source file:client.template.panel.ReservationListPanel.java

License:Open Source License

/**
 *
 *//* www.  j a  v a2 s  .com*/
@Override
public final void onData(final Object result) {

    // enable buttons again, this should be somewhere else TODO

    final ReservationList reservations = (ReservationList) result;
    RudListener.getInstance().getChecked().clear();

    this.reset();

    for (int i = 0; i < reservations.getReservations().size(); ++i) {

        final TableRow row = new TableRow();
        final Reservation res = ((Reservation) reservations.getReservations().get(i));

        row.addField("" + res.getId());
        row.addField("-");
        row.addField("-");

        final CheckBox box = new CheckBox();
        box.setName("" + res.getId());
        box.addClickListener(RudListener.getInstance());
        row.addField(box);

        row.setDialog(this.getPopUp(res));

        for (int j = 0; j < res.getServices().size(); j++) {
            final Service service = (Service) res.getServices().get(j);

            // Take details from first service...
            if (0 == j) {
                final Vector<TableField> rowData = row.getFields();
                rowData.set(1, new TableField(service.getStartTime().toString()));
                rowData.set(2, new TableField(service.getDuration() + ""));
                if (this.isActive(service, service.getStartTime(), service.getDuration())) {
                    row.setSyle("list-Now");
                }
            }

            final TableRow detailRow = new TableRow();
            detailRow.addField(service.getId() + "");
            detailRow.addField(service.getStartTime().toString());
            detailRow.addField(service.getDuration() + "");
            detailRow.addField(" ");
            detailRow.setSyle("list-Detail");

            row.addDetail(detailRow);
        }

        this.addRow(row);
    }

    if (0 == reservations.getReservations().size()) {
        this.addDummyRow("Nothing found...");
    }

    this.flush();

    // notify listeners (i.e. button and gif from ReservationAdmin)
}

From source file:client.template.panel.RouterListPanel.java

License:Open Source License

/**
 * @param result/*from ww w  .jav  a 2 s.  c o  m*/
 *            the data to be filled in the table
 */
@Override
public final void onData(final Object result) {

    // enable buttons again, this should be somewhere else TODO

    final RouterList router = (RouterList) result;
    RudListener.getInstance().getChecked().clear();

    this.reset();

    for (int i = 0; i < router.getRouter().size(); ++i) {

        final TableRow row = new TableRow();
        final Router r = ((Router) router.getRouter().get(i));

        // TODO: more generic
        this.fillTable(row, r);

        final CheckBox box = new CheckBox();
        // Router can be identified by their LoopBackAddress
        box.setName(r.getLoopBackAddress());
        box.addClickListener(RudListener.getInstance());
        row.addField(box);

        if (null != r.getPopup()) {
            row.setDialog(new InfoDialog("Info", r.getPopup()));
        }

        this.addRow(row);

    }

    if (0 == router.getRouter().size()) {
        this.addDummyRow("Nothing found...");
    }
    this.flush();

    // notify listeners (i.e. button and gif from ReservationAdmin)
}

From source file:co.fxl.gui.gwt.GWTContainer.java

License:Open Source License

@Override
public ICheckBox checkBox() {
    setComponent((T) new CheckBox());
    return (ICheckBox) (element = new GWTCheckBox((GWTContainer<CheckBox>) this));
}

From source file:com.audata.client.admin.UserDialog.java

License:Open Source License

public UserDialog(UserPanel parent, String uuid, HashMap details) {
    this.parent = parent;
    this.uuid = uuid;
    if (this.uuid != "") {
        this.setText(LANG.edit_user_Text());
        //call details
    } else {/*w  ww . j a v a  2  s.co m*/
        this.setText(LANG.new_user_Text());
    }
    //build empty
    VerticalPanel main = new VerticalPanel();

    HorizontalPanel fname = new HorizontalPanel();
    fname.setSpacing(5);
    Label flabel = new Label(LANG.forename_Text());
    flabel.setWidth("150px");
    fname.add(flabel);
    this.forename = new TextBox();
    fname.add(this.forename);
    main.add(fname);

    HorizontalPanel sname = new HorizontalPanel();
    sname.setSpacing(5);
    Label slabel = new Label(LANG.surname_Text());
    slabel.setWidth("150px");
    sname.add(slabel);
    this.surname = new TextBox();
    sname.add(this.surname);
    main.add(sname);

    HorizontalPanel uname = new HorizontalPanel();
    uname.setSpacing(5);
    Label ulabel = new Label(LANG.username_Text());
    ulabel.setWidth("150px");
    uname.add(ulabel);
    this.username = new TextBox();
    uname.add(this.username);
    main.add(uname);
    if (this.uuid.equals("")) {
        HorizontalPanel p1 = new HorizontalPanel();
        p1.setSpacing(5);
        Label p1label = new Label(LANG.password_Text());
        p1label.setWidth("150px");
        p1.add(p1label);
        this.pass1 = new PasswordTextBox();
        p1.add(this.pass1);
        main.add(p1);

        HorizontalPanel p2 = new HorizontalPanel();
        p2.setSpacing(5);
        Label p2label = new Label(LANG.password_reenter_Text());
        p2label.setWidth("150px");
        p2.add(p2label);
        this.pass2 = new PasswordTextBox();
        p2.add(this.pass2);
        main.add(p2);
    }

    HorizontalPanel adminPanel = new HorizontalPanel();
    adminPanel.setSpacing(5);
    Label adminlabel = new Label(LANG.is_admin_Text());
    adminlabel.setWidth("150px");
    adminPanel.add(adminlabel);
    this.isAdmin = new CheckBox();
    adminPanel.add(this.isAdmin);
    main.add(adminPanel);

    HorizontalPanel levPanel = new HorizontalPanel();
    levPanel.setSpacing(5);
    Label levlabel = new Label(LANG.security_level_Text());
    levlabel.setWidth("150px");
    levPanel.add(levlabel);
    this.secLevel = new ListBox();
    levPanel.add(this.secLevel);
    main.add(levPanel);

    HorizontalPanel cavPanel = new HorizontalPanel();
    cavPanel.setSpacing(5);
    Label cavlabel = new Label(LANG.security_caveats_Text());
    cavlabel.setWidth("150px");
    cavPanel.add(cavlabel);
    this.caveats = new ListBox();
    this.caveats.setMultipleSelect(true);
    this.caveats.setVisibleItemCount(5);
    cavPanel.add(this.caveats);
    main.add(cavPanel);

    HorizontalPanel butPanel = new HorizontalPanel();
    butPanel.setSpacing(5);
    this.saveBut = new Button(LANG.save_Text());
    this.saveBut.addClickListener(this);
    butPanel.add(this.saveBut);
    this.cancelBut = new Button(LANG.cancel_Text());
    this.cancelBut.addClickListener(this);
    butPanel.add(this.cancelBut);
    main.add(butPanel);

    this.popLists();

    this.setWidget(main);
    //this.show();
    int left = (Window.getClientWidth() - this.getOffsetWidth()) / 2;
    int top = (Window.getClientHeight() - this.getOffsetHeight()) / 2;
    this.setPopupPosition(left, top);

    if (details != null) {
        this.setValues(details);
    }
}

From source file:com.databasepreservation.visualization.client.common.lists.AsyncTableCell.java

public void createSelectAllPanel() {
    selectAllPanel = new FlowPanel();
    selectAllPanelBody = new FlowPanel();
    selectAllCheckBox = new CheckBox();
    selectAllLabel = new Label("Select all");

    selectAllPanelBody.add(selectAllCheckBox);
    selectAllPanelBody.add(selectAllLabel);
    selectAllPanel.add(selectAllPanelBody);
    selectAllPanel.setVisible(false);//  w  w  w .  ja va  2s.c  om

    selectAllPanel.addStyleName("panel");
    selectAllPanelBody.addStyleName("panel-body");

    selectAllCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {

        @Override
        public void onValueChange(ValueChangeEvent<Boolean> event) {
            fireOnCheckboxSelectionChanged();
        }
    });

}

From source file:com.databasepreservation.visualization.client.common.search.SearchFieldPanel.java

public SearchFieldPanel() {
    panel = new FlowPanel();
    leftPanel = new FlowPanel();
    inputPanel = new FlowPanel();
    fieldLabel = new Label();
    searchAdvancedFields = new ListBox();
    columnVisibility = new CheckBox();

    setVisibilityCheckboxValue(true, false);

    columnVisibilityPanel = new SimplePanel(columnVisibility);

    DateBox.DefaultFormat dateFormat = new DateBox.DefaultFormat(DateTimeFormat.getFormat("yyyy-MM-dd"));

    inputText = new TextBox();

    inputDateFromForDate = new UTCDateBox();
    inputDateFromForDate.getDateBox().setFormat(dateFormat);
    inputDateFromForDate.getDateBox().getDatePicker().setYearArrowsVisible(true);
    inputDateFromForDate.getDateBox().setFireNullValues(true);
    inputDateFromForDate.getElement().setPropertyString("placeholder",
            messages.searchFieldDateFromPlaceHolder());

    inputDateToForDate = new UTCDateBox();
    inputDateToForDate.getDateBox().setFormat(dateFormat);
    inputDateToForDate.getDateBox().getDatePicker().setYearArrowsVisible(true);
    inputDateToForDate.getDateBox().setFireNullValues(true);
    inputDateToForDate.getElement().setPropertyString("placeholder", messages.searchFieldDateToPlaceHolder());

    inputDateFromForDateTime = new UTCDateBox();
    inputDateFromForDateTime.getDateBox().setFormat(dateFormat);
    inputDateFromForDateTime.getDateBox().getDatePicker().setYearArrowsVisible(true);
    inputDateFromForDateTime.getDateBox().setFireNullValues(true);
    inputDateFromForDateTime.getElement().setPropertyString("placeholder",
            messages.searchFieldDateFromPlaceHolder());

    inputTimeFromForDateTime = new UTCTimeBox(timeFormat);
    inputTimeFromForDateTime.getElement().setPropertyString("placeholder",
            messages.searchFieldTimeFromPlaceHolder());

    inputDateToForDateTime = new UTCDateBox();
    inputDateToForDateTime.getDateBox().setFormat(dateFormat);
    inputDateToForDateTime.getDateBox().getDatePicker().setYearArrowsVisible(true);
    inputDateToForDateTime.getDateBox().setFireNullValues(true);
    inputDateToForDateTime.getElement().setPropertyString("placeholder",
            messages.searchFieldDateToPlaceHolder());

    inputTimeToForDateTime = new UTCTimeBox(timeFormat);
    inputTimeToForDateTime.getElement().setPropertyString("placeholder",
            messages.searchFieldTimeToPlaceHolder());

    inputTimeFromForTime = new UTCTimeBox(timeFormat);
    inputTimeFromForTime.getElement().setPropertyString("placeholder",
            messages.searchFieldTimeFromPlaceHolder());

    inputTimeToForTime = new UTCTimeBox(timeFormat);
    inputTimeToForTime.getElement().setPropertyString("placeholder", messages.searchFieldTimeToPlaceHolder());

    inputNumeric = new TextBox();
    inputNumeric.getElement().setPropertyString("placeholder", messages.searchFieldNumericPlaceHolder());
    inputNumeric.getElement().setAttribute("type", "number");
    inputNumericFrom = new TextBox();
    inputNumericFrom.getElement().setPropertyString("placeholder",
            messages.searchFieldNumericFromPlaceHolder());
    inputNumericFrom.getElement().setAttribute("type", "number");
    inputNumericTo = new TextBox();
    inputNumericTo.getElement().setPropertyString("placeholder", messages.searchFieldNumericToPlaceHolder());
    inputNumericTo.getElement().setAttribute("type", "number");

    inputStorageSizeFrom = new TextBox();
    inputStorageSizeFrom.getElement().setPropertyString("placeholder",
            messages.searchFieldNumericFromPlaceHolder());
    inputStorageSizeFrom.getElement().setAttribute("type", "number");
    inputStorageSizeTo = new TextBox();
    inputStorageSizeTo.getElement().setPropertyString("placeholder",
            messages.searchFieldNumericToPlaceHolder());
    inputStorageSizeTo.getElement().setAttribute("type", "number");
    inputStorageSizeList = new ListBox();
    for (String unit : Humanize.UNITS) {
        inputStorageSizeList.addItem(unit, unit);
    }/*from ww  w.  j ava 2 s.com*/

    inputCheckBox = new CheckBox();

    labelTo = new Label("to");
    labelAt1 = new Label("at");
    labelAt2 = new Label("at");

    panel.add(leftPanel);

    initWidget(panel);

    searchAdvancedFields.addChangeHandler(new ChangeHandler() {
        @Override
        public void onChange(ChangeEvent event) {
            listBoxSearchField(searchAdvancedFields.getSelectedValue());

            // handle checkbox
            String columnDisplayName = getSearchField().getLabel();
            if (columnDisplayNameToVisibleState.containsKey(columnDisplayName)) {
                columnVisibility.setValue(columnDisplayNameToVisibleState.get(columnDisplayName), false);
            } else {
                columnVisibility.setValue(true, false);
            }
        }
    });

    panel.addStyleName("search-field");
    leftPanel.addStyleName("search-field-left-panel");
    inputPanel.addStyleName("search-field-input-panel");
    inputPanel.addStyleName("full_width");
    remove.addStyleName("search-field-remove");
    fieldLabel.addStyleName("search-field-label");
    searchAdvancedFields.addStyleName("form-listbox");
    // columnVisibilityPanel.setStyleName("form-listbox search-field-input-panel");
    columnVisibility.setStyleName("visibility-checkbox");

    labelTo.addStyleName("label");
    labelAt1.addStyleName("label");
    labelAt2.addStyleName("label");
    inputText.addStyleName("form-textbox");
    inputDateFromForDate.addStyleName("form-textbox form-textbox-small");
    inputDateToForDate.addStyleName("form-textbox form-textbox-small");
    inputDateFromForDateTime.addStyleName("form-textbox form-textbox-small");
    inputDateToForDateTime.addStyleName("form-textbox form-textbox-small");
    inputTimeFromForDateTime.addStyleName("form-textbox form-textbox-small");
    inputTimeToForDateTime.addStyleName("form-textbox form-textbox-small");
    inputTimeFromForTime.addStyleName("form-textbox form-textbox-small");
    inputTimeToForTime.addStyleName("form-textbox form-textbox-small");
    inputNumeric.addStyleName("form-textbox form-textbox-small");
    inputNumericFrom.addStyleName("form-textbox form-textbox-small");
    inputNumericTo.addStyleName("form-textbox form-textbox-small");
    inputStorageSizeFrom.addStyleName("form-textbox form-textbox-small");
    inputStorageSizeTo.addStyleName("form-textbox form-textbox-small");
    inputStorageSizeList.addStyleName("form-listbox");
    inputCheckBox.addStyleName("form-checkbox");
}

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 a  2  s .c  o  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.PermissionsControlDialog.java

License:Open Source License

protected Widget createHeaderWidget(String text, String style) {
    HorizontalPanel hp = new HorizontalPanel();
    CheckBox cb = new CheckBox();
    cb.setStyleName("control-table-header-checkbox");
    hp.setCellVerticalAlignment(cb, VerticalPanel.ALIGN_MIDDLE);

    hp.add(createLabel(text, style));//from w  ww.  ja v a  2 s .co m
    hp.add(cb);
    hp.setStyleName("control-table-header-checkbox-combo");

    return hp;
}