Examples of RadioButton


Examples of ch.sahits.game.graphic.layout.RadioButton

   * @param selected flag indicating if the button is currently selected.
   * @param group the button belongs to
   * @return created RadioButton
   */
  private RadioButton addRadioButton(String label, boolean selected, SelectableGroup group) {
    RadioButton radio = new RadioButton(group, metic, font);
    radio.setSelected(selected);
    radio.setText(label);
    group.add(radio);
    add(radio,new MaximalGridLayoutConstraints(ECellPosition.TOP_LEFT));
    return radio;
  }
View Full Code Here

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

    table.setCellEditor(2, new TextCellEditor<Serializable>(intOnlyTextBox));

    // Gender cell editor
    RadioCellEditor<Serializable> genderEditor = new RadioCellEditor<Serializable>();
    genderEditor.setLabel("Select a gender:");
    genderEditor.addRadioButton(new RadioButton("editorGender", "male"));
    genderEditor.addRadioButton(new RadioButton("editorGender", "female"));
    table.setCellEditor(3, genderEditor);

    // Race cell editor
    ListCellEditor<Serializable> raceEditor = new ListCellEditor<Serializable>();
    ListBox raceBox = raceEditor.getListBox();
    for (int i = 0; i < DataSourceData.races.length; i++) {
      raceBox.addItem(DataSourceData.races[i]);
    }
    table.setCellEditor(4, raceEditor);

    // Color cell editor
    RadioCellEditor<Serializable> colorEditor = new RadioCellEditor<Serializable>() {
      /**
       * An element used to string the HTML portion of the color.
       */
      private HTML html = new HTML();

      @Override
      protected void setValue(Object value) {
        html.setHTML(value.toString());
        super.setValue(html.getText());
      }
    };
    colorEditor.setLabel("Select a color:");
    for (int i = 0; i < DataSourceData.colors.length; i++) {
      String color = DataSourceData.colors[i];
      colorEditor.addRadioButton(new RadioButton("editorColor", color));
    }
    table.setCellEditor(5, colorEditor);

    // Sport cell editor
    ListCellEditor<Serializable> sportEditor = new ListCellEditor<Serializable>();
View Full Code Here

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

  @Override
  public void editCell(CellEditInfo<R> cellEditInfo, Callback<R> callback) {
    super.editCell(cellEditInfo, callback);
    Iterator<Widget> it = vpanel.iterator();
    while (it.hasNext()) {
      RadioButton radio = (RadioButton) it.next();
      if (radio.isChecked()) {
        radio.setFocus(true);
        return;
      }
    }
  }
View Full Code Here

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

  @Override
  protected Object getValue() {
    Iterator<Widget> it = vpanel.iterator();
    while (it.hasNext()) {
      RadioButton radio = (RadioButton) it.next();
      if (radio.isChecked()) {
        return radio.getText();
      }
    }
    return null;
  }
View Full Code Here

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

  @Override
  protected void setValue(Object value) {
    Iterator<Widget> it = vpanel.iterator();
    while (it.hasNext()) {
      RadioButton radio = (RadioButton) it.next();
      if (radio.getText().equals(value)) {
        radio.setChecked(true);
      } else {
        radio.setChecked(false);
      }
    }
  }
View Full Code Here

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

      };
      for (int i = 0; i < separators.length; i += 2 ) {
        String label = separators[i];
        String separator = separators[i + 1];
        optionSeparatorMap.put(label, separator);
        RadioButton rb = new RadioButton("separator", label);
        if ( i == 0 ) {
          rb.setChecked(true);
          selectedOption = label;
        }
        rb.addClickListener(this);
        this.add(rb);
      }
    }
View Full Code Here

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

        rb.addClickListener(this);
        this.add(rb);
      }
    }
    public void onClick(Widget sender) {
      RadioButton rb = (RadioButton) sender;
      selectedOption = rb.getText();
    }
View Full Code Here

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

    FlexTable panel = new FlexTable();
    formPanel.setWidget(panel);
   
   
   
    rb0 = new RadioButton("grp", "Local file:");

   
    final HorizontalPanel uploadContainer = new HorizontalPanel();
    uploadContainer.add(upload);
    rb0.setChecked(true);
View Full Code Here

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

    FlexTable panel = new FlexTable();
    formPanel.setWidget(panel);
   
   
   
    rb0 = new RadioButton("grp", "Local file:");

   
    final HorizontalPanel uploadContainer = new HorizontalPanel();
    uploadContainer.add(upload);
    rb0.setChecked(true);
View Full Code Here

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

      position.insertCell(1, 1);
      position.setWidget(0, 0, herePosition);
      position.setWidget(0, 1, topPosition);
      position.setWidget(1, 0, bottomPosition);
      position.setWidget(1, 1, floatPosition);
    oneColumn = new RadioButton("expansion", "One column");
      oneColumn.setValue(true);
    twoColumns = new RadioButton("expansion", "Two columns");
    HorizontalPanel expansion = new HorizontalPanel();
    expansion.add(oneColumn);
    expansion.add(twoColumns);
      addField(image, "Image:");
    addHeader("Caption");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.