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

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


      } );

      /*
       * Radio Buttons for duration
       */
      durationRadioButton = new RadioButton( "durationRadioGroup", "durationRadioButton" ); //$NON-NLS-1$ //$NON-NLS-2$
      durationRadioButton.setText( Messages.getString( "schedule.duration" ) );
      durationRadioButton.setValue( Boolean.TRUE );
      durationRadioButton.addClickHandler( new ClickHandler() {

        @Override
        public void onClick( ClickEvent event ) {
          blockoutEndTimePicker.getElement().getStyle().setDisplay( Display.NONE );
          durationPanel.getElement().getStyle().clearDisplay();
        }
      } );

      endTimeRadioButton = new RadioButton( "durationRadioGroup", "endTimeRadioButton" ); //$NON-NLS-1$ //$NON-NLS-2$
      endTimeRadioButton.setText( Messages.getString( "schedule.endTime" ) );
      endTimeRadioButton.addClickHandler( new ClickHandler() {

        @Override
        public void onClick( ClickEvent event ) {
View Full Code Here


public class RadioButtonExample implements EntryPoint {

  public void onModuleLoad() {
    // Make some radio buttons, all in one group.
    RadioButton rb0 = new RadioButton("myRadioGroup", "foo");
    RadioButton rb1 = new RadioButton("myRadioGroup", "bar");
    RadioButton rb2 = new RadioButton("myRadioGroup", "baz");

    // Check 'baz' by default.
    rb2.setChecked(true);

    // Add them to the root panel.
    FlowPanel panel = new FlowPanel();
    panel.add(rb0);
    panel.add(rb1);
View Full Code Here

    // Create some advanced options
    HorizontalPanel genderPanel = new HorizontalPanel();
    String[] genderOptions = constants.cwDisclosurePanelFormGenderOptions();
    for (int i = 0; i < genderOptions.length; i++) {
      genderPanel.add(new RadioButton("gender", genderOptions[i]));
    }
    Grid advancedOptions = new Grid(2, 2);
    advancedOptions.setCellSpacing(6);
    advancedOptions.setHTML(0, 0, constants.cwDisclosurePanelFormLocation());
    advancedOptions.setWidget(0, 1, new TextBox());
View Full Code Here

    TreeItem ba = new TreeItem("b.a");
    TreeItem bb = new TreeItem("b.b");
    TreeItem bba = new TreeItem("b.b.a");
    TreeItem bc = new TreeItem("b.c");
    TreeItem c = new TreeItem("c");
    TreeItem d = new TreeItem(new RadioButton("myradio",
        "I should line up nicely"));
    TreeItem e = new TreeItem(new CheckBox("I should line up nicely"));
    TreeItem f = new TreeItem(new CheckBox("I should also line up nicely"));
    f.addItem(new CheckBox("me to"));
    SimplePanel panel = new SimplePanel();
View Full Code Here

    b.addBlurHandler(handler);
    b.addFocusListener(handler);
    b.addValueChangeHandler(handler);

    // Rich text box:
    final RadioButton radio = new RadioButton("A", "With events");
    p.add(radio);
    final RadioButton radioPrime = new RadioButton("A", "No events");
    p.add(radioPrime);
    b.setTitle("Radio Button");
    p.add(radio);
    handler = new EventReporter<Boolean, Object>(p);
    radio.addKeyboardListener(handler);
View Full Code Here

    });

    // Create a bunch of input elements to test
    // TODO(jlabanca): divide this out into a separate issue 2707
    CheckBox checkBox = new CheckBox("CheckBox");
    RadioButton radio1 = new RadioButton("grouping", "RadioButton1");
    RadioButton radio2 = new RadioButton("grouping", "RadioButton2");
    ListBox list = new ListBox();
    list.addItem("test1");
    list.addItem("test2");
    list.addItem("test3");
    list.addItem("test4");
View Full Code Here

      Label label = new Label();
      label.setStylePrimaryName(styles.copyFormatLabel());
      label.setText("Copy as:");
      addLeftWidget(label);
     
      copyAsBitmapRadioButton_ = new RadioButton(
                                       "Format",
                                       SafeHtmlUtils.fromString("Bitmap"));
      copyAsBitmapRadioButton_.setStylePrimaryName(styles.copyFormatBitmap());
      addLeftWidget(copyAsBitmapRadioButton_);
     
      copyAsMetafileRadioButton_ = new RadioButton(
                                       "Format",
                                       SafeHtmlUtils.fromString("Metafile"));
      copyAsMetafileRadioButton_.setStylePrimaryName(styles.copyFormatMetafile());
      addLeftWidget(copyAsMetafileRadioButton_);
     
View Full Code Here

      choiceGrid.getColumnFormatter().setWidth(2, kActionCol2Width + "px");
      choiceGrid.addStyleName(RESOURCES.styles().choicesGrid());
      Label resolutionLabel =new Label("Resolution:");
      resolutionLabel.addStyleName(RESOURCES.styles().resolutionLabel());
      choiceGrid.setWidget(0, 0, resolutionLabel);
      snapshotChoice_ = new RadioButton("snapshot", "Update Packrat (Snapshot)");
      snapshotChoice_.addStyleName(RESOURCES.styles().choiceButton());
      choiceGrid.setWidget(0, 1, snapshotChoice_);
      snapshotChoice_.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
         @Override
         public void onValueChange(ValueChangeEvent<Boolean> event)
         {
            libraryChoice_.setValue(!event.getValue(), false);
         }
      });
      libraryChoice_ = new RadioButton("library", "Update Library (Restore)");
      libraryChoice_.addStyleName(RESOURCES.styles().choiceButton());
      choiceGrid.setWidget(0, 2, libraryChoice_);
      libraryChoice_.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
         @Override
         public void onValueChange(ValueChangeEvent<Boolean> event)
View Full Code Here

    assertTrue("Some kind of class should be set",
        widgetUi.totallyPrivateStyleSpan.getClassName().length() > 0);
  }

  public void testRadioButton() {
    RadioButton able = widgetUi.myRadioAble;
    RadioButton baker = widgetUi.myRadioBaker;
    assertTrue("able should be checked", able.getValue());
    assertFalse("baker should not be checked", baker.getValue());
    assertEquals("radios", able.getName());
    assertEquals("radios", baker.getName());
  }
View Full Code Here

            CheckBox op;
            if (isMultiselect()) {
                op = new VCheckBox();
                op.setText(opUidl.getStringAttribute("caption"));
            } else {
                op = new RadioButton(id, opUidl.getStringAttribute("caption"));
                op.setStyleName("v-radiobutton");
            }
            op.addStyleName(CLASSNAME_OPTION);
            op.setValue(opUidl.getBooleanAttribute("selected"));
            op.setEnabled(!opUidl.getBooleanAttribute("disabled")
View Full Code Here

TOP

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

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.