Example usage for com.google.gwt.user.client.ui CheckBox getText

List of usage examples for com.google.gwt.user.client.ui CheckBox getText

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui CheckBox getText.

Prototype

@Override
    public String getText() 

Source Link

Usage

From source file:org.openxdata.designer.client.widget.skiprule.ValueWidget.java

public void onClose(CloseEvent<PopupPanel> event) {
    String value = "";
    VerticalPanel panel = (VerticalPanel) popup.getWidget();
    int count = panel.getWidgetCount();
    for (int i = 0; i < count; i++) {
        CheckBox checkbox = (CheckBox) panel.getWidget(i);
        if (checkbox.getValue() == true) {
            if (value.length() > 0)
                value += LIST_SEPARATOR;
            value += checkbox.getText();
        }/* w  ww.j  a  v  a 2  s .co  m*/
    }
    if (value.length() == 0)
        value = EMPTY_VALUE;
    valueAnchor.setText(value);
}

From source file:org.openxdata.querybuilder.client.widget.ValueWidget.java

public void onClose(CloseEvent<PopupPanel> event) {
    String value = "";
    VerticalPanel panel = (VerticalPanel) popup.getWidget();
    int count = panel.getWidgetCount();
    for (int i = 0; i < count; i++) {
        CheckBox checkbox = (CheckBox) panel.getWidget(i);
        if (checkbox.getValue() == true) {
            if (value.length() > 0)
                value += LIST_SEPARATOR;
            value += checkbox.getText();
        }/*from  w  w  w  .  ja  va2s .  com*/
    }
    if (value.length() == 0)
        value = EMPTY_VALUE;
    valueHyperlink.setText(value);
}

From source file:org.pathvisio.wikipathways.client.FactorPanel.java

License:Apache License

void factorChecked(CheckBox box) {
    String factorType = factorBox.getItemText(factorBox.getSelectedIndex());
    Set<String> selected = selectedFactors.get(factorType);
    if (box.isChecked()) {
        if (selected == null) {
            selectedFactors.put(factorType, selected = new HashSet<String>());
        }/*from   w w w  .j a  v  a 2  s  .  c om*/
        selected.add(box.getText());
    } else {
        if (selected != null) {
            selected.remove(box.getText());
        }
    }
}

From source file:org.pepstock.jem.gwt.client.panels.resources.inspector.widgets.CheckBoxesFieldPanel.java

License:Open Source License

@Override
public String[] getSelectedValue() {
    Set<String> selected = new HashSet<String>();
    for (CheckBox cb : checkBoxes) {
        if (cb.getValue()) {
            selected.add(cb.getText());
        }//from   ww  w  .j  av  a2s . c  o m
    }
    return selected.toArray(new String[0]);
}

From source file:org.pepstock.jem.gwt.client.panels.resources.inspector.widgets.CheckBoxesFieldPanel.java

License:Open Source License

@Override
public void setSelectedValue(String[] value) {
    List<String> toBeSelectedTexts = Arrays.asList(value);
    for (CheckBox cb : checkBoxes) {
        if (toBeSelectedTexts.contains(cb.getText())) {
            cb.setValue(true);/*  w  w w .  ja v a 2  s.  co  m*/
        } else {
            cb.setValue(false);
        }
    }
}