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

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


        add(m_bDayFeedback, "userBdayRow");
       
        /*
         User's gender
         */
        RadioButton female = new RadioButton("userGender", "Female");
        add(female, "userGender");
       
        RadioButton male = new RadioButton("userGender", "Male");
        male.addStyleName("radioOption");
        male.setValue(true);
        male.getElement().setId("userMale");
        add(male, "userGender");
       
        /*
         User description
         */
 
View Full Code Here


                    String descr = jo.get("description").toString();
                    String count = jo.get("count").toString();
                   
                    if(mSelectedPollId == null) {
                        final Integer index = new Integer(i);
                        RadioButton radio = new RadioButton("pollSelection", descr);
                        radio.addStyleName("pollItem");
                        radio.addClickListener(new ClickListener() {
                            public void onClick(Widget pSender) {
                                mSelectedPollId = index;
                                //RootPanel.get("poll").clear();
                                run();
                            }
View Full Code Here

    labelsPanel.add(addNewLabel);
  }

  private void createFailureBox() {
    failurePanel.clear();
    RadioButton button;
    for (FailureRate rate : FailureRate.values()) {
      button = new RadioButton("failure" + capability.getCapabilityId().toString(),
          rate.getDescription());
      failurePanel.add(button);
      if (rate.equals(capability.getFailureRate())) {
        button.setValue(true);
      }
    }
  }
View Full Code Here

    }
  }

  private void createImpactBox() {
    impactPanel.clear();
    RadioButton button;
    for (UserImpact impact : UserImpact.values()) {
      button = new RadioButton("impact" + capability.getCapabilityId().toString(),
          impact.getDescription());
      impactPanel.add(button);
      if (impact.equals(capability.getUserImpact())) {
        button.setValue(true);
      }
    }
  }
View Full Code Here

  }

  private void enableOrDisableAllRadioButtons(Panel panel, boolean enable) {
    for (Widget w : panel) {
      if (w instanceof RadioButton) {
        RadioButton b = (RadioButton) w;
        b.setEnabled(enable);
      }
    }
  }
View Full Code Here

  }

  private String getSelectedOptionInPanel(Panel panel) {
    for (Widget w : panel) {
      if (w instanceof RadioButton) {
        RadioButton b = (RadioButton) w;
        if (b.getValue()) {
          return b.getText();
        }
      }
    }
    return null;
  }
View Full Code Here

                final List<RadioButton> options = new ArrayList<RadioButton>();
                VerticalPanel vert = new VerticalPanel();
                for (int i = 0; i < snaps.length; i++) {
                    // cant copy onto to itself...
                    if (!snaps[i].getName().equals(snapshotName)) {
                        RadioButton existing = new RadioButton("snapshotNameGroup",
                                snaps[i].getName()); // NON-NLS
                        options.add(existing);
                        vert.add(existing);
                    }
                }

                HorizontalPanel newNameHorizontalPanel = new HorizontalPanel();
                final TextBox newNameTextBox = new TextBox();
                final String newNameText = constants.NEW()
                        + ": ";

                final RadioButton newNameRadioButton = new RadioButton("snapshotNameGroup",
                        newNameText);
                newNameHorizontalPanel.add(newNameRadioButton);
                newNameTextBox.setEnabled(false);
                newNameRadioButton.addClickHandler(new ClickHandler() {
                    public void onClick(ClickEvent event) {
                        newNameTextBox.setEnabled(true);
                    }
                });

                newNameHorizontalPanel.add(newNameTextBox);
                options.add(newNameRadioButton);
                vert.add(newNameHorizontalPanel);

                copy.addAttribute(constants.ExistingSnapshots(),
                        vert);

                Button ok = new Button(constants.OK());
                copy.addAttribute("",
                        ok);
                ok.addClickHandler(new ClickHandler() {
                    public void onClick(ClickEvent event) {
                        if (!isOneButtonSelected(options)) {
                            Window.alert(constants.YouHaveToEnterOrChoseALabelNameForTheSnapshot());
                            return;
                        }

                        if (newNameRadioButton.getValue()) {
                            if (checkUnique(snaps,
                                    newNameTextBox.getText())) {
                                serv.copyOrRemoveSnapshot(packageName,
                                        snapshotName,
                                        false,
View Full Code Here

        addAttribute( constants.Pattern(),
                      pattern );

        // now a radio button with the type
        RadioButton literal = new RadioButton( "constraintValueType",
                                               constants.LiteralValue() );// NON-NLS
        RadioButton formula = new RadioButton( "constraintValueType",
                                               constants.Formula() ); // NON-NLS
        RadioButton predicate = new RadioButton( "constraintValueType",
                                                 constants.Predicate() ); // NON-NLS

        HorizontalPanel valueTypes = new HorizontalPanel();
        valueTypes.add( literal );
        valueTypes.add( formula );
        valueTypes.add( predicate );
        addAttribute( constants.CalculationType(),
                      valueTypes );

        switch ( editingCol.getConstraintValueType() ) {
            case BaseSingleFieldConstraint.TYPE_LITERAL :
                literal.setValue( true );
                break;
            case BaseSingleFieldConstraint.TYPE_RET_VALUE :
                formula.setValue( true );
                break;
            case BaseSingleFieldConstraint.TYPE_PREDICATE :
                predicate.setValue( true );
        }

        literal.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                editingCol.setFactField( null );
                applyConsTypeChange( BaseSingleFieldConstraint.TYPE_LITERAL );
            }
        } );

        formula.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                editingCol.setFactField( null );
                applyConsTypeChange( BaseSingleFieldConstraint.TYPE_RET_VALUE );
            }
        } );
        predicate.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent w) {
                editingCol.setFactField( null );
                applyConsTypeChange( BaseSingleFieldConstraint.TYPE_PREDICATE );
            }
        } );
View Full Code Here

            if (isMultiselect()) {
                op = new VCheckBox();
                op.setHTML(itemHtml);
            } else {
                op = new RadioButton(id, itemHtml, true);
                op.setStyleName("v-radiobutton");
            }

            if (icon != null && icon.length() != 0) {
                Util.sinkOnloadForImages(op.getElement());
View Full Code Here

        Messages.getString( "overwritePromptDialogTitle" ), Messages.getString( "ok" ), Messages.getString( "cancel" ), false, true ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    VerticalPanel rootPanel = new VerticalPanel();
    Label overwriteInstructions = new Label( Messages.getString( "overwriteInstructions" ) ); //$NON-NLS-1$
    Label selectOption = new Label( Messages.getString( "selectOption" ) ); //$NON-NLS-1$
    renameRb = new RadioButton( RADIO_GROUP_NAME, Messages.getString( "renameRbTitle" ) ); //$NON-NLS-1$
    overwriteRb = new RadioButton( RADIO_GROUP_NAME, Messages.getString( "overwriteRbTitle" ) ); //$NON-NLS-1$
    noRenameOrOverwriteRb = new RadioButton( RADIO_GROUP_NAME, Messages.getString( "noOverwriteOrRenameRbTitle" ) ); //$NON-NLS-1$
    renameRb.setValue( true );

    rootPanel.add( overwriteInstructions );
    rootPanel.add( selectOption );
    rootPanel.add( renameRb );
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.