Set the pickers selection type.
553074
public void setSelectionType(MaterialDatePickerType selectionType) {
        this.selectionType = selectionType;
        switch (selectionType) {
            case MONTH_DAY:
                options.selectMonths = true;
                break;
            case YEAR_MONTH_DAY:
                options.selectYears = yearsToDisplay;
                options.selectMonths = true;
                break;
            case YEAR:
                options.selectYears = yearsToDisplay;
                options.selectMonths = false;
                break;
        }
    }
1112552
function _updatePicker() {
        var filter = getActiveFilter();
        if (filter && filter.patterns.length) {
            var label = filter.name || _getCondensedForm(filter.patterns);
            _picker.setButtonLabel(StringUtils.format(Strings.EXCLUDE_FILE_FILTER, label));
        } else {
            _picker.setButtonLabel(Strings.NO_FILE_FILTER);
        }
    }
1191968
def change_type(self, func):
        """"""
        model = self.model()
        index_list = self.selectedIndexes()
        [model.setData(i, '', change_type=func) for i in index_list]
416116
public void setJobType(int jobType) {
	String type = null;
	switch(jobType) {
	case JOBTYPE_SINGLE:
	    type = "single"; break;
	case JOBTYPE_MULTIPLE:
	    type = "multiple"; break;
	case JOBTYPE_MPI:
	    type = "mpi"; break;
	case JOBTYPE_CONDOR:
	    type = "condor"; break;
	}
	if (type != null) {
	    set("jobtype", type);
	}
    }
876609
public void setSelectMode(final SelectMode selectMode) {
		switch (selectMode) {
			case MULTIPLE:
				setSelectionMode(SelectionMode.MULTIPLE);
				break;
			case SINGLE:
				setSelectionMode(SelectionMode.SINGLE);
				break;
			default:
				setSelectionMode(SelectionMode.NONE);
		}
	}
97036
private void updateSelection() {
        Dateitem selectedItem = getSelectedItem();
        
        if (selectedItem == null) {
            addStyle("color", "gray");
        } else {
            addStyle("color", "inherit");
        }
        
        setFocus(false);
    }
887097
public void setSelectorColor(int selectorColor) {
        this.mSelectorColor = selectorColor;
        this.mSelectorFilter = new PorterDuffColorFilter(Color.argb(mSelectorAlpha, Color.red(mSelectorColor), Color.green(mSelectorColor), Color.blue(mSelectorColor)), PorterDuff.Mode.SRC_ATOP);
        this.invalidate();
    }
758192
def type_selection
      klasses = klass._types
      if klasses.size > 1
        { _type: { "$in" => klass._types }}
      else
        { _type: klass._types[0] }
      end
    end
921948
public void setDefaultSRE(ISREInstall sre) {
		if (sre == null) {
			setSelection(new StructuredSelection());
		} else {
			setSelection(new StructuredSelection(sre));
		}
	}
1161260
private void updateFromPicker() {

        checkTime();
        Date date = m_picker.getValue();
        if (!m_dateOnly) {
            String timeAsString = getTimeText();
            date = CmsDateConverter.getDateWithTime(date, timeAsString);
        }
        setValue(date);
        setErrorMessage(null);
        fireChange(date, false);
    }
1049570
function picker(iteratees) {
  iteratees = iteratees || ['name']
  return _.partial(_.pick, _, iteratees)
}
88231
def clear_selection(self):
        """"""
        cursor = self.textCursor()
        cursor.clearSelection()
        self.setTextCursor(cursor)
504174
function(options) {
   	inputEx.ColorField.superclass.setOptions.call(this, options);
   	
   	// Overwrite options
   	this.options.className = options.className ? options.className : 'inputEx-Field inputEx-ColorField inputEx-PickerField';
   	
   	// Added options
   	this.options.palette = options.palette;
   	this.options.colors = options.colors;
   	
   	if (options.ratio) { this.options.ratio = options.ratio;}
   	if (options.cellPerLine) { this.options.cellPerLine = options.cellPerLine;}
   }
798735
public void setType(TYPE type) {
    if(type == null) {
      type = TYPE.UNSET;
    }
    this.type = type;
  }
1177963
public void setSelectAllMode(final SelectAllType selectAllMode) {
		getOrCreateComponentModel().selectAllMode = selectAllMode == null ? SelectAllType.TEXT : selectAllMode;
	}
105753
function(attr) {

            attr = attr || {};
            ColorPicker.superclass.initAttributes.call(this, attr);
            
            /**
             * The size of the picker. Trying to change this is not recommended.
             * @attribute pickersize
             * @default 180
             * @type int
             */
            this.setAttributeConfig(this.OPT.PICKER_SIZE, {
                    value: attr.size || this.DEFAULT.PICKER_SIZE
                });

            /**
             * The current hue value 0-360
             * @attribute hue
             * @type int
             */
            this.setAttributeConfig(this.OPT.HUE, {
                    value: attr.hue || 0,
                    validator: lang.isNumber
                });

            /**
             * The current saturation value 0-100
             * @attribute saturation
             * @type int
             */
            this.setAttributeConfig(this.OPT.SATURATION, {
                    value: attr.saturation || 0,
                    validator: lang.isNumber
                });

            /**
             * The current value/brightness value 0-100
             * @attribute value
             * @type int
             */
            this.setAttributeConfig(this.OPT.VALUE, {
                    value: lang.isNumber(attr.value) ? attr.value : 100,
                    validator: lang.isNumber
                });

            /**
             * The current red value 0-255
             * @attribute red
             * @type int
             */
            this.setAttributeConfig(this.OPT.RED, {
                    value: lang.isNumber(attr.red) ? attr.red : 255,
                    validator: lang.isNumber
                });

            /**
             * The current green value 0-255
             * @attribute green 
             * @type int
             */
            this.setAttributeConfig(this.OPT.GREEN, {
                    value: lang.isNumber(attr.green) ? attr.green : 255,
                    validator: lang.isNumber
                });

            /**
             * The current blue value 0-255
             * @attribute blue
             * @type int
             */
            this.setAttributeConfig(this.OPT.BLUE, {
                    value: lang.isNumber(attr.blue) ? attr.blue : 255,
                    validator: lang.isNumber
                });

            /**
             * The current hex value #000000-#FFFFFF, without the #
             * @attribute hex
             * @type string
             */
            this.setAttributeConfig(this.OPT.HEX, {
                    value: attr.hex || "FFFFFF",
                    validator: lang.isString
                });

            /**
             * The current rgb value.  Updates the state of all of the
             * other value fields.  Read-only: use setValue to set the
             * controls rgb value.
             * @attribute hex
             * @type [int, int, int]
             * @readonly
             */
            this.setAttributeConfig(this.OPT.RGB, {
                    value: attr.rgb || [255,255,255],
                    method: function(rgb) {

                        this.set(this.OPT.RED, rgb[0], true);
                        this.set(this.OPT.GREEN, rgb[1], true);
                        this.set(this.OPT.BLUE, rgb[2], true);

                        var websafe = Color.websafe(rgb),
                            hex = Color.rgb2hex(rgb),
                            hsv = Color.rgb2hsv(rgb);

                        this.set(this.OPT.WEBSAFE, websafe, true);
                        this.set(this.OPT.HEX, hex, true);



                        // fix bug #1754338 - when saturation is 0, hue is
                        // silently always set to 0, but input field not updated
                        if (hsv[1]) {
                            this.set(this.OPT.HUE, hsv[0], true);
                        }
                        this.set(this.OPT.SATURATION, Math.round(hsv[1]*100), true);
                        this.set(this.OPT.VALUE, Math.round(hsv[2]*100), true);
                    },
                    readonly: true
                });

            /**
             * If the color picker will live inside of a container object,
             * set, provide a reference to it so the control can use the
             * container's events.
             * @attribute container
             * @type YAHOO.widget.Panel
             */
            this.setAttributeConfig(this.OPT.CONTAINER, {
                        value: null,
                        method: function(container) {
                            if (container) {
                                // Position can get out of sync when the
                                // control is manipulated while display is
                                // none.  Resetting the slider constraints
                                // when it is visible gets the state back in
                                // order.
                                container.showEvent.subscribe(function() {
                                    // this.pickerSlider.thumb.resetConstraints();
                                    // this.hueSlider.thumb.resetConstraints();
                                    this.pickerSlider.focus();
                                }, this, true);
                            }
                        }
                    });
            /**
             * The closest current websafe value
             * @attribute websafe
             * @type int
             */
            this.setAttributeConfig(this.OPT.WEBSAFE, {
                    value: attr.websafe || [255,255,255]
                });


            var ids = attr.ids || lang.merge({}, this.ID), i;

            if (!attr.ids && _pickercount > 1) {
                for (i in ids) {
                    if (lang.hasOwnProperty(ids, i)) {
                        ids[i] = ids[i] + _pickercount;
                    }
                }
            }


            /**
             * A list of element ids and/or element references used by the 
             * control.  The default is the this.ID list, and can be customized
             * by passing a list in the contructor
             * @attribute ids
             * @type {referenceid: realid}
             * @writeonce
             */
            this.setAttributeConfig(this.OPT.IDS, {
                    value: ids,
                    writeonce: true
                });

            /**
             * A list of txt strings for internationalization.  Default
             * is this.TXT
             * @attribute txt
             * @type {key: txt}
             * @writeonce
             */
            this.setAttributeConfig(this.OPT.TXT, {
                    value: attr.txt || this.TXT,
                    writeonce: true
                });

            /**
             * The img src default list
             * is this.IMAGES
             * @attribute images
             * @type {key: image}
             * @writeonce
             */
            this.setAttributeConfig(this.OPT.IMAGES, {
                    value: attr.images || this.IMAGE,
                    writeonce: true
                });
            /**
             * The element refs used by this control.  Set at initialization
             * @attribute elements
             * @type {id: HTMLElement}
             * @readonly
             */
            this.setAttributeConfig(this.OPT.ELEMENTS, {
                    value: {},
                    readonly: true
                });

            /**
             * Hide/show the entire set of controls
             * @attribute showcontrols
             * @type boolean
             * @default true
             */
            this.setAttributeConfig(this.OPT.SHOW_CONTROLS, {
                    value: lang.isBoolean(attr.showcontrols) ? attr.showcontrols : true,
                    method: function(on) {

                        var el = Dom.getElementsByClassName("bd", "div", 
                                this.getElement(this.ID.CONTROLS))[0];

                        this._hideShowEl(el, on);

                        this.getElement(this.ID.CONTROLS_LABEL).innerHTML = 
                            (on) ? this.get(this.OPT.TXT).HIDE_CONTROLS :
                                   this.get(this.OPT.TXT).SHOW_CONTROLS;

                    }
                });

            /**
             * Hide/show the rgb controls
             * @attribute showrgbcontrols
             * @type boolean
             * @default true
             */
            this.setAttributeConfig(this.OPT.SHOW_RGB_CONTROLS, {
                    value: lang.isBoolean(attr.showrgbcontrols) ? attr.showrgbcontrols : true,
                    method: function(on) {
                        this._hideShowEl(this.ID.RGB_CONTROLS, on);
                    }
                });

            /**
             * Hide/show the hsv controls
             * @attribute showhsvcontrols
             * @type boolean
             * @default false
             */
            this.setAttributeConfig(this.OPT.SHOW_HSV_CONTROLS, {
                    value: lang.isBoolean(attr.showhsvcontrols) ?
                                          attr.showhsvcontrols : false,
                    method: function(on) {
                        //Dom.setStyle(this.getElement(this.ID.HSV_CONTROLS), "visibility", (on) ? "" : "hidden");
                        this._hideShowEl(this.ID.HSV_CONTROLS, on);

                        // can't show both the hsv controls and the rbg hex summary
                        if (on && this.get(this.OPT.SHOW_HEX_SUMMARY)) {
                            this.set(this.OPT.SHOW_HEX_SUMMARY, false);
                        }
                    }
                });

            /**
             * Hide/show the hex controls
             * @attribute showhexcontrols
             * @type boolean
             * @default true
             */
            this.setAttributeConfig(this.OPT.SHOW_HEX_CONTROLS, {
                    value: lang.isBoolean(attr.showhexcontrols) ?
                                          attr.showhexcontrols : false,
                    method: function(on) {
                        this._hideShowEl(this.ID.HEX_CONTROLS, on);
                    }
                });

            /**
             * Hide/show the websafe swatch
             * @attribute showwebsafe
             * @type boolean
             * @default true
             */
            this.setAttributeConfig(this.OPT.SHOW_WEBSAFE, {
                    value: lang.isBoolean(attr.showwebsafe) ? attr.showwebsafe : true,
                    method: function(on) {
                        this._hideShowEl(this.ID.WEBSAFE_SWATCH, on);
                    }
                });

            /**
             * Hide/show the hex summary
             * @attribute showhexsummary
             * @type boolean
             * @default true
             */
            this.setAttributeConfig(this.OPT.SHOW_HEX_SUMMARY, {
                    value: lang.isBoolean(attr.showhexsummary) ? attr.showhexsummary : true,
                    method: function(on) {
                        this._hideShowEl(this.ID.HEX_SUMMARY, on);

                        // can't show both the hsv controls and the rbg hex summary
                        if (on && this.get(this.OPT.SHOW_HSV_CONTROLS)) {
                            this.set(this.OPT.SHOW_HSV_CONTROLS, false);
                        }
                    }
                });
            this.setAttributeConfig(this.OPT.ANIMATE, {
                    value: lang.isBoolean(attr.animate) ? attr.animate : true,
                    method: function(on) {
                        if (this.pickerSlider) {
                            this.pickerSlider.animate = on;
                            this.hueSlider.animate = on;
                        }
                    }
                });

            this.on(this.OPT.HUE + "Change", this._updateRGBFromHSV, this, true);
            this.on(this.OPT.SATURATION + "Change", this._updateRGBFromHSV, this, true);
            this.on(this.OPT.VALUE + "Change", this._updateRGBFromHSV, this, true);

            this.on(this.OPT.RED + "Change", this._updateRGB, this, true);
            this.on(this.OPT.GREEN + "Change", this._updateRGB, this, true);
            this.on(this.OPT.BLUE + "Change", this._updateRGB, this, true);

            this.on(this.OPT.HEX + "Change", this._updateHex, this, true);

            this._initElements();
        }
99202
def set_type(self, value):
        """"""
        if self.action == "remove" and value != "probes":
            log = "Sources field 'type' when action is remove should always be 'probes'."
            raise MalFormattedSource(log)
        self._type = value