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

protected CheckBox(Element elem) 

Source Link

Usage

From source file:fr.aliasource.webmail.client.composer.MailComposer.java

License:GNU General Public License

public MailComposer(View ui) {
    this.ui = ui;
    setWidth("100%");
    northActions = new ComposerActions(ui, this);
    add(northActions, DockPanel.NORTH);/*from   www .jav  a2s.  c  o  m*/
    setCellHorizontalAlignment(northActions, DockPanel.ALIGN_LEFT);

    enveloppe = new VerticalPanel();
    enveloppeActions = new HorizontalPanel();
    to = new RecipientsPanel(ui, I18N.strings.to() + ": ");
    cc = new RecipientsPanel(ui, I18N.strings.cc() + ": ");
    bcc = new RecipientsPanel(ui, I18N.strings.bcc() + ": ");
    subject = new SubjectField(ui);

    if (WebmailController.get().getSetting("identities/nb_identities") != null) {
        if (identities == null && WebmailController.get().hasIdentities()) {
            identities = new IdentitiesPanel();
            enveloppe.add(identities);
        }
    }

    attach = new AttachmentsPanel();
    // crp = new CannedResponsePanel(ui, this);

    enveloppe.add(to);
    enveloppe.add(cc);
    cc.setVisible(false);
    enveloppe.add(bcc);
    bcc.setVisible(false);
    enveloppe.add(enveloppeActions);
    enveloppe.add(subject);

    // enveloppe.add(crp);
    enveloppe.add(attach);

    HorizontalPanel sendParams = new HorizontalPanel();
    sendParams.add(new Label());
    highPriority = new CheckBox(I18N.strings.importantMessage());
    sendParams.add(highPriority);
    askForDispositionNotification = new CheckBox(I18N.strings.askForDispositionNotification());
    sendParams.add(askForDispositionNotification);
    enveloppe.add(sendParams);
    sendParams.setCellVerticalAlignment(highPriority, HasVerticalAlignment.ALIGN_MIDDLE);
    highPriority.setStyleName("enveloppeField");

    enveloppe.setStyleName("enveloppe");

    createEnveloppeActions();

    add(enveloppe, DockPanel.NORTH);

    VerticalPanel vp = createBodyEditor(ui);
    add(vp, DockPanel.CENTER);

    southActions = new ComposerActions(ui, this);
    add(southActions, DockPanel.SOUTH);
    setCellHorizontalAlignment(southActions, DockPanel.ALIGN_LEFT);

    attach.registerUploadListener(northActions);
    attach.registerUploadListener(southActions);

    addTabPanelListener();
    focusTo();
    setTimerStarted(false);
    setEnableSaveButtons(false);
    addWindowResizeHandler();
}

From source file:fr.aliasource.webmail.client.filter.CreateAFilterForm.java

License:GNU General Public License

private void createSearchCriteriaForm(final View ui) {

    FlexTable ft = new FlexTable();

    if (from == null) {
        from = new TextBox();
        to = new TextBox();
        subject = new TextBox();
        hasTheWords = new TextBox();
        hasTheWords.setEnabled(false);/*  w w  w  . j av a2s .c  o m*/
        notTheWords = new TextBox();
        notTheWords.setEnabled(false);
        hasAttachment = new CheckBox(I18N.strings.hasAttachments());
        hasAttachment.setEnabled(false);
    }

    ft.setWidget(0, 0, new Label(I18N.strings.from() + ":"));
    ft.setWidget(0, 1, from);
    ft.setWidget(1, 0, new Label(I18N.strings.to() + ":"));
    ft.setWidget(1, 1, to);
    ft.setWidget(2, 0, new Label(I18N.strings.subject() + ":"));
    ft.setWidget(2, 1, subject);

    /*ft.setWidget(0, 2, new Label(I18N.strings.hasTheWords()));
    ft.setWidget(0, 3, hasTheWords);
    ft.setWidget(1, 2, new Label(I18N.strings.doNotHave()));
    ft.setWidget(1, 3, notTheWords);
    ft.setWidget(2, 3, hasAttachment);*/

    content.setStyleName("advancedSearchForm");
    content.setWidth("100%");
    HTML header = new HTML(I18N.strings.filterCriteriaHeader());
    content.add(header);
    content.add(ft);
    Widget w = createSearchCriteriaButtons(ui);
    content.add(w);
    content.setCellHorizontalAlignment(ft, VerticalPanel.ALIGN_CENTER);
    content.setCellHorizontalAlignment(w, VerticalPanel.ALIGN_CENTER);
}

From source file:fr.aliasource.webmail.client.filter.CreateAFilterForm.java

License:GNU General Public License

private void createChooseActionForm(final View ui) {
    FlexTable ft = new FlexTable();

    if (markAsRead == null) {
        markAsRead = new CheckBox(I18N.strings.filterMarkItAsRead());
        starIt = new CheckBox(I18N.strings.filterStarIt());
        forwardTo = new ForwardToWidget();
        deliver = new DeliverIntoWidget();
        deleteIt = new CheckBox(I18N.strings.filterDeleteIt());
    }/*from w w w  . j a  v  a  2  s . co m*/

    ft.setWidget(0, 0, markAsRead);
    ft.setWidget(1, 0, starIt);
    ft.setWidget(2, 0, forwardTo);
    ft.setWidget(3, 0, deliver);
    ft.setWidget(4, 0, deleteIt);

    content.setStyleName("advancedSearchForm");
    content.setWidth("100%");
    HTML header = new HTML(I18N.strings.filterActionHeader());
    content.add(header);
    content.add(ft);
    Widget w = createChooseActionsButtons(ui);
    content.add(w);
    content.setCellHorizontalAlignment(ft, VerticalPanel.ALIGN_CENTER);
    content.setCellHorizontalAlignment(w, VerticalPanel.ALIGN_CENTER);

    deliver.startListeners();
}

From source file:fr.aliasource.webmail.client.filter.CreateAFilterForm.java

License:GNU General Public License

private Widget createChooseActionsButtons(final View ui) {
    HorizontalPanel hp = new HorizontalPanel();
    hp.setSpacing(3);/*from  w w w  .  jav a  2s . com*/

    Anchor showFilter = new Anchor(I18N.strings.showCurrentFilters());
    showFilter.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            WebmailController.get().getView().showFilterSettings();
        }
    });
    hp.add(showFilter);

    Button cancelButton = new Button(I18N.strings.cancel());
    cancelButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent sender) {
            cancelFilterCreation(ui);
        }
    });

    hp.add(cancelButton);

    Button back = new Button(" " + I18N.strings.filterBack());
    back.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent sender) {
            content.clear();
            createSearchCriteriaForm(ui);
        }
    });
    hp.add(back);

    Button createFilter = new Button(I18N.strings.createFilter());
    hp.add(createFilter);
    createFilter.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent sender) {
            FilterDefinition fd = getDefinition();
            ui.getSpinner().startSpinning();
            AjaxCall.filters.storeFilter(fd, new AsyncCallback<Void>() {
                public void onSuccess(Void result) {
                    ui.getSpinner().stopSpinning();
                    cancelFilterCreation(ui);
                    ui.notifyUser(I18N.strings.filterAddSuccess());
                }

                public void onFailure(Throwable caught) {
                    GWT.log("error creating filter", caught);
                    ui.getSpinner().stopSpinning();
                }
            });
        }
    });

    applyToMailbox = new CheckBox(I18N.strings.filterAlsoApplyNow());
    applyToMailbox.setEnabled(false); // TODO
    hp.add(applyToMailbox);

    for (int i = 0; i < hp.getWidgetCount(); i++) {
        hp.setCellVerticalAlignment(hp.getWidget(i), HorizontalPanel.ALIGN_MIDDLE);
    }

    return hp;
}

From source file:fr.aliasource.webmail.client.filter.DeliverIntoWidget.java

License:GNU General Public License

public DeliverIntoWidget() {
    cb = new CheckBox(I18N.strings.actionDeliverInto());
    folderQuery = new ListBox(false);
    folderQuery.addItem(I18N.strings.deliverFolderPlaceholder(), null);

    add(cb);//from  ww w. ja  va2  s.c  o  m
    add(new HTML("&nbsp;"));
    add(folderQuery);
}

From source file:fr.aliasource.webmail.client.filter.ForwardToWidget.java

License:GNU General Public License

public ForwardToWidget() {
    cb = new CheckBox(I18N.strings.actionForwardItTo());

    addr = new TextBox();
    addr.setText(I18N.strings.forwardPlaceholder());
    add(cb);/*from   w ww .  j a  va  2s  .  co m*/
    add(new HTML("&nbsp;"));
    add(addr);

    reg = addr.addFocusHandler(new FocusHandler() {
        public void onFocus(FocusEvent sender) {
            addr.setText("");
            reg.removeHandler();
        }
    });
}

From source file:gov.nih.nci.ncicb.tcgaportal.level4.gwt.anomalysearch.client.filter.CopyNumberWidget.java

public CopyNumberWidget(final ColumnType cType) {
    super(cType);
    gisticCheckBox = new CheckBox("Avg. Across Patients");
    gisticCheckBox.addStyleName(StyleConstants.MARGIN_BOTTOM_5PX);
    gisticCheckBox.addStyleName(StyleConstants.MARGIN_LEFT_10PX);
    frequencyPanel.add(gisticCheckBox);//from  w  w  w .ja v a2s  .com
    setUpGisticClickListeners();
}

From source file:gov.nih.nci.ncicb.tcgaportal.level4.gwt.anomalysearch.client.filter.RegionWidget.java

public RegionWidget() {
    includeRegion = new CheckBox("Chrom");
    includeRegion.setChecked(true);//w w  w  .j a  v a2s  .com

    chromosome = new ListBox();
    chromosome.setWidth("55px");
    for (int ichrom = 1; ichrom <= 22; ichrom++) {
        chromosome.addItem(ichrom + "");
    }

    start = WidgetHelper.getTextBoxWithValidator();
    start.removeStyleName(StyleConstants.TEXTBOX_WIDTH);
    start.setVisibleLength(5);
    stop = WidgetHelper.getTextBoxWithValidator();
    stop.removeStyleName(StyleConstants.TEXTBOX_WIDTH);
    stop.setVisibleLength(5);

    HorizontalPanel geneRegionSubPanel = new HorizontalPanel();
    geneRegionSubPanel.add(includeRegion);
    geneRegionSubPanel.add(chromosome);
    geneRegionSubPanel.add(new HTML("Start"));
    geneRegionSubPanel.add(start);
    geneRegionSubPanel.add(new HTML("Stop"));
    geneRegionSubPanel.add(stop);
    geneRegionSubPanel.addStyleName("marginLeft10px");
    geneRegionSubPanel.setSpacing(3);
    initWidget(geneRegionSubPanel);
}

From source file:gov.nih.nci.ncicb.tcgaportal.level4.gwt.anomalysearch.client.results.ResultsTablePatient.java

protected void populateRowHeaderCell(int resultsRow) {
    int displayRow = resultsRow + 1;
    CheckBox patientCb = new CheckBox(results.getRow(resultsRow).getName());
    setWidget(displayRow, 0, patientCb);
    getCellFormatter().addStyleName(displayRow, 0, StyleConstants.RESULTS_TABLE_CELL);
}

From source file:gwtquery.plugins.enhance.client.gwt.CheckBoxWidgetFactory.java

License:Apache License

public CheckBox create(Element e) {

    CheckBox checkBox = new CheckBox(e.getInnerText());
    if ("input".equalsIgnoreCase(e.getTagName())) {
        copyAttributes((InputElement) e.cast(), (InputElement) checkBox.getElement().cast());
    }/*from   w w w.j av  a 2 s .com*/
    WidgetsUtils.replaceOrAppend(e, checkBox);
    return checkBox;

}