Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.CheckBox


        add(label);
       
        PackratContext context = options.getPackratContext();
        RProjectPackratOptions packratOptions = options.getPackratOptions();
                
        chkUsePackrat_ = new CheckBox("Use packrat with this project");
        chkUsePackrat_.setValue(context.isPackified());
        chkUsePackrat_.addValueChangeHandler(
                                new ValueChangeHandler<Boolean>() {

         @Override
         public void onValueChange(ValueChangeEvent<Boolean> event)
         {
            if (event.getValue())
               verifyPrerequisites();
            else
               manageUI(false);
         }
        });
      
        spaced(chkUsePackrat_);
        add(chkUsePackrat_);
       
        chkAutoSnapshot_ = new CheckBox("Automatically snapshot local changes");
        chkAutoSnapshot_.setValue(packratOptions.getAutoSnapshot());
        lessSpaced(chkAutoSnapshot_);
        add(chkAutoSnapshot_);
       
        String vcsName = session_.getSessionInfo().getVcsName();
        chkVcsIgnoreLib_ = new CheckBox(vcsName + " ignore packrat library");
        chkVcsIgnoreLib_.setValue(packratOptions.getVcsIgnoreLib());
        lessSpaced(chkVcsIgnoreLib_);
        add(chkVcsIgnoreLib_);
       
        chkVcsIgnoreSrc_ = new CheckBox(vcsName + " ignore packrat sources");
        chkVcsIgnoreSrc_.setValue(packratOptions.getVcsIgnoreSrc());
        lessSpaced(chkVcsIgnoreSrc_);
        add(chkVcsIgnoreSrc_);
       
        chkUseCache_ = new CheckBox("Use global cache for installed packages");
        chkUseCache_.setValue(packratOptions.getUseCache());
        spaced(chkUseCache_);
        add(chkUseCache_);
       
        panelExternalPackages_ = new VerticalPanel();
View Full Code Here


      private final TextBox textBox_;
   }
  
   protected CheckBox checkBox(String caption)
   {
      CheckBox chk = new CheckBox(caption);
      chk.addStyleName(RES.styles().buildToolsCheckBox());
      return chk;
   }
View Full Code Here

                Icon icon = client.getIcon(iconUrl);
                itemHtml = icon.getElement().getString() + itemHtml;
            }

            String key = opUidl.getStringAttribute("key");
            CheckBox op = keysToOptions.get(key);

            // Need to recreate object if isMultiselect is changed (#10451)
            // OR if htmlContentAllowed changed due to Safari 5 issue
            if ((op == null) || (htmlContentAllowed != wasHtmlContentAllowed)
                    || (isMultiselect() != wasMultiselect)) {
                // Create a new element
                if (isMultiselect()) {
                    op = new VCheckBox();
                } else {
                    op = new RadioButton(paintableId);
                    op.setStyleName("v-radiobutton");
                }
                if (iconUrl != null && iconUrl.length() != 0) {
                    Util.sinkOnloadForImages(op.getElement());
                    op.addHandler(iconLoadHandler, LoadEvent.getType());
                }

                op.addStyleName(CLASSNAME_OPTION);
                op.addClickHandler(this);

                optionsToKeys.put(op, key);
            }

            op.setHTML(itemHtml);
            op.setValue(opUidl.getBooleanAttribute("selected"));
            boolean optionEnabled = !opUidl
                    .getBooleanAttribute(OptionGroupConstants.ATTRIBUTE_OPTION_DISABLED);
            boolean enabled = optionEnabled && !isReadonly() && isEnabled();
            op.setEnabled(enabled);
            optionsEnabled.put(op, optionEnabled);

            setStyleName(op.getElement(),
                    ApplicationConnection.DISABLED_CLASSNAME,
                    !(optionEnabled && isEnabled()));

            newwidgets.add(op);
        }
View Full Code Here

    @Override
    public void onClick(ClickEvent event) {
        super.onClick(event);
        if (event.getSource() instanceof CheckBox) {
            CheckBox source = (CheckBox) event.getSource();

            if (BrowserInfo.get().isWebkit()) {
                // Webkit does not focus non-text input elements on click
                // (#11854)
                source.setFocus(true);
            }

            final boolean selected = source.getValue();
            final String key = optionsToKeys.get(source);
            if (!isMultiselect()) {
                selectedKeys.clear();
            }
            if (selected) {
View Full Code Here

  public MarkWidget(final Dto viewable, final UpdateServiceAsync updateService) {
    this.moduleDto = DtoModuleRegistry.instance().get(viewable.getModule());

    final long id = viewable.getId();
    final CheckBox markBox = new CheckBox();

    markBox.setValue(viewable.getMarked());

    markBox.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        // mark dto on client side and do a usual update call on the server side.
        // this assumes the data in the dto is still up to date.
        viewable.set("marked", markBox.getValue());

        updateService.update(viewable, new AsyncCallback<Void>() {
//        commonService.mark(viewable.getModule(), id, markBox.getValue(), new AsyncCallback<Void>() {
          @Override
          public void onFailure(Throwable caught) {
View Full Code Here

    return ((CheckBox) w).getValue();
  }

  @Override
  protected Widget editField() {
    return new CheckBox();
  }
View Full Code Here

    };
  }

  @Override
  protected Widget detailField() {
    return new CheckBox();
  }
View Full Code Here

  public Tasks() {
    SimplePanel panel = new SimplePanel();
    VerticalPanel list = new VerticalPanel();
    panel.setWidget(list);
    list.add(new CheckBox("Get groceries"));
    list.add(new CheckBox("Walk the dog"));
    list.add(new CheckBox("Start Web 2.0 company"));
    list.add(new CheckBox("Write cool app in GWT"));
    list.add(new CheckBox("Get funding"));
    list.add(new CheckBox("Take a vacation"));
    initWidget(panel);
    setStyleName("mail-Tasks");
  }
View Full Code Here

public class CheckboxCollapser extends AbstractCollapser {

    private CheckBox checkBox;

    public CheckboxCollapser() {
        this(new CheckBox());
        checkBox.setStylePrimaryName("CheckboxCollapser");
    }
View Full Code Here

    public BooleanEditor(boolean defaultValue) {
        this(defaultValue, true);
    }

    public BooleanEditor(boolean defaultValue, boolean enabled) {
        this(new CheckBox(), defaultValue, enabled);
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.CheckBox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.