CheckBox will be created for this list item.
<p>See <a href="http://stackoverflow.com/a/13931919">Checkbox in ListView</a></p>
350392
public void setCheckBox(IconPos iconPos) {
        if (checkBoxInput != null) {
            if (iconPos == null) {
                controlGroup.remove(checkBoxInput);
                checkBoxInput = null;

                // refresh control group
                setControlGroup(false);
                setControlGroup(true);
            } else {
                JQMCommon.setIconPos(controlGroupRoot, iconPos);
            }
            return;
        }

        if (iconPos == null) return;
        TextBox cb = new TextBox();
        cb.getElement().setAttribute("type", "checkbox");
        checkBoxInput = cb;

        // controlGroupRoot needs to be either "label" for checkbox or "div" for other elements (radio group for example)
        setControlGroup(false);
        setControlGroup(true);
        JQMCommon.setIconPos(controlGroupRoot, iconPos);
        controlGroup.insert(cb, 0);
    }
413704
@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View v = inflater.inflate(R.layout.fragment_dialog_demo, container, false);

        ListView listView = (ListView) v.findViewById(R.id.dialog_content);
        listView.setAdapter(new ArrayAdapter<>(
                getActivity(),
                android.R.layout.simple_list_item_1,
                android.R.id.text1,
                new String[]{
                        "Enable History",
                        "Clear History",
                        "Search History",
                        "Select Currency",
                        "About"
                }
        ));
        return v;
    }
1186301
function checkbox(bind, el, param, value) {
  var attr = {type: 'checkbox', name: param.signal};
  if (value) attr.checked = true;
  var node = element('input', attr);

  el.appendChild(node);

  node.addEventListener('change', function() {
    bind.update(node.checked);
  });

  bind.elements = [node];
  bind.set = function(value) { node.checked = !!value || null; }
}
786561
private function AddCheckedField()
    {
        $field = new Fields\Checkbox('Checked', '1', $this->checkbox->GetChecked());
        $this->AddField($field);
    }
532137
public synchronized CheckBox setChecked(final boolean checked) {
        this.checked = checked;
        runOnGUIThreadIfExistsOtherwiseRunDirect(new Runnable() {
            @Override
            public void run() {
                for(Listener listener : listeners) {
                    listener.onStatusChanged(checked);
                }
            }
        });
        invalidate();
        return this;
    }
1353090
private function AddCheckedValueField()
    {
        $name = 'CheckedValue';
        $value = $this->checkbox->GetCheckedValue();  
        $field = Fields\Input::Text($name, $value ? $value : '1');
        $this->AddField($field);
        $this->SetRequired($name);
    }
1253354
private function AddCreateLayoutsField()
    {
        $name = 'CreateLayouts';
        $this->AddField(new Checkbox($name, $name, (bool)$this->group->GetCreateLayouts()));
    }
1356725
public String buildCheckContent() {

        StringBuffer retValue = new StringBuffer(256);

        retValue.append("<tr>\n\t<td colspan=\"3\" style=\"white-space: nowrap;\" unselectable=\"on\">");
        retValue.append("<input type=\"checkbox\" name=\"");
        retValue.append(PARAM_CONTENT);
        retValue.append("\" value=\"true\">&nbsp;");
        retValue.append(key(Messages.GUI_TOUCH_MODIFY_CONTENT_0));
        retValue.append("</td>\n</tr>\n");
        return retValue.toString();
    }
195192
function(data) {
        if (data.length === 0) {
            this.$leftListBody.html('<li class="biz-transfer-list-content-item">' + this.options.noContent + '</li>');
        }
        this.addItems(data);
        this.bindSelect();
        this.createButton();
    }
475400
public CheckBox addListener(Listener listener) {
        if(listener != null && !listeners.contains(listener)) {
            listeners.add(listener);
        }
        return this;
    }
908285
function () {
            var allCheckboxes = $("li input[type='checkbox']:enabled", this.$ul),
                visibleCheckboxes = allCheckboxes.filter(":visible"),
                allCheckboxesCount = allCheckboxes.length,
                visibleCheckboxesCount = visibleCheckboxes.length;

            visibleCheckboxes.prop('checked', true);
            $("li:not(.divider):not(.disabled)", this.$ul).filter(":visible").addClass(this.options.selectedClass);

            if (allCheckboxesCount === visibleCheckboxesCount) {
                $("option:enabled", this.$select).prop('selected', true);
            }
            else {
                var values = visibleCheckboxes.map(function() { return $(this).val() }).get();
                $("option:enabled", this.$select).filter(function(index){ return $.inArray($(this).val(), values) !== -1; }).prop('selected', true);
            }
        }
1340339
private CmsTreeItem buildTreeItem(CmsCategoryTreeEntry category, Collection<String> selectedCategories) {

        // generate the widget that should be shown in the list
        CmsDataValue dataValue = new CmsDataValue(
            600,
            3,
            CmsCategoryBean.SMALL_ICON_CLASSES,
            true,
            category.getTitle(),
            "rtl:" + category.getPath(),
            "hide:" + category.getSitePath());

        // create the check box for this item
        CmsCheckBox checkBox = new CmsCheckBox();
        // if it has to be selected, select it
        boolean isPartofPath = false;
        Iterator<String> it = selectedCategories.iterator();
        while (it.hasNext()) {
            String path = it.next();
            if (path.startsWith(category.getPath()) || path.contains("/" + category.getPath())) {
                isPartofPath = true;
            }
        }
        if (isPartofPath) {
            checkBox.setChecked(true);
        }
        if (!isEnabled()) {
            checkBox.disable(m_disabledReason);
        }
        if (category.getPath().isEmpty()) {
            checkBox.setVisible(false);
        }
        // bild the CmsTreeItem out of the widget and the check box
        CmsTreeItem treeItem = new CmsTreeItem(true, checkBox, dataValue);
        // abb the handler to the check box
        dataValue.addClickHandler(new DataValueClickHander(treeItem));

        checkBox.addValueChangeHandler(new CheckBoxValueChangeHandler(treeItem));

        // set the right style for the small view
        treeItem.setSmallView(true);
        treeItem.setId(category.getPath());
        // add it to the list of all categories
        m_categories.put(treeItem.getId(), treeItem);
        return treeItem;
    }
178448
private OnClickListener createListItemListener() {
        return new OnClickListener() {

            @Override
            public void onClick(final DialogInterface dialog, final int which) {
                selectedIndex = which;
                ListPreference.this.onClick(dialog, DialogInterface.BUTTON_POSITIVE);
                dialog.dismiss();
            }
        };
    }
1303780
public synchronized CheckBoxList<V> addItem(V object, boolean checkedState) {
        itemStatus.add(checkedState);
        return super.addItem(object);
    }
1242882
private void initializeCheckedItems() {
        if (checkedItems != null) {
            for (int i = 0; i < checkedItems.length; i++) {
                adapter.setItemChecked(i, checkedItems[i]);
            }
        }
    }
43427
def collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {})
      bootstrap = form_bootstrap.scoped(options.delete(:bootstrap))
      return super if bootstrap.disabled

      content = "".html_safe
      unless options[:include_hidden] == false
        content << hidden_field(method, multiple: true, value: "")
      end

      args = [bootstrap, :check_box, method, collection, value_method, text_method, options, html_options]
      content << draw_choices(*args) do |m, v, opts|
        opts[:multiple]       = true
        opts[:include_hidden] = false
        ActionView::Helpers::FormBuilder.instance_method(:check_box).bind(self).call(m, opts, v)
      end
    end
392869
public static final boolean setSelectedValue(ListBox list, String value, boolean addMissingValues) {
	if (value == null) {
	    list.setSelectedIndex(0);
	    return false;
	}
	else {
	    int index = findValueInListBox(list, value);
	    if (index >= 0) {
		list.setSelectedIndex(index);
		return true;
	    }

	    if (addMissingValues) {
		list.addItem(value, value);

		// now that it's there, search again
		index = findValueInListBox(list, value);
		list.setSelectedIndex(index);
		return true;
	    }

	    return false;
	}
    }