Update the file chooser's filter settings.
491076
protected void setFileFilter()
   {
      String[] extensions = m_model.getExtensions();
      for (String extension : extensions)
      {
         m_fileChooser.setFileFilter(new FileNameExtensionFilter(extension.toUpperCase() + " Files", extension));
      }
      m_fileChooser.setFileFilter(new FileNameExtensionFilter("Project Files", m_model.getExtensions()));
   }
351639
void setFilters(Map<Object, Object> filters) {

        for (Object column : filters.keySet()) {
            Object filterValue = filters.get(column);
            if ((filterValue != null) && !filterValue.toString().isEmpty() && !m_table.isColumnCollapsed(column)) {
                m_table.setFilterFieldValue(column, filterValue);
            }
        }
    }
236907
function getActiveFilter() {
        var filterSets        = PreferencesManager.get("fileFilters") || [],
            activeFilterIndex = PreferencesManager.getViewState("activeFileFilter"),
            oldFilter         = PreferencesManager.getViewState("search.exclusions") || [],
            activeFilter      = null;

        if (activeFilterIndex === undefined && oldFilter.length) {
            activeFilter = { name: "", patterns: oldFilter };
            activeFilterIndex = _getFilterIndex(filterSets, activeFilter);

            // Migrate the old filter into the new filter storage
            if (activeFilterIndex === -1) {
                activeFilterIndex = filterSets.length;
                filterSets.push(activeFilter);
                PreferencesManager.set("fileFilters", filterSets);
            }
            PreferencesManager.setViewState("activeFileFilter", activeFilterIndex);
        } else if (activeFilterIndex > -1 && activeFilterIndex < filterSets.length) {
            activeFilter = filterSets[activeFilterIndex];
        }

        return activeFilter;
    }
1365630
def filtered(self, efilter):
        '''
        
        '''
        if not self.params:
            self.params={'filter' : efilter}
            return self
        if not self.params.has_key('filter'):
            self.params['filter'] = efilter
            return self
        self.params['filter'].update(efilter)
        return self
449372
def set_filters(self, can_filers=None):
        
        if self.__set_filters_has_been_called:
            log.warn("using filters is not supported like this, see note on IXXATBus")
        else:
            # allow the constructor to call this without causing a warning
            self.__set_filters_has_been_called = True
362435
def setFilterData(self, key, value):
        
        self._filterData[nativestring(key)] = nativestring(value)
357268
def update_filter(self):
        
        # Consider the filter invalid
        self.valid_filter = False

        try:
            # Format the new filter
            filter_str = self._original_filter.format(
                **self._component_context.properties
            )
        except KeyError as ex:
            # An entry is missing: abandon
            logging.warning("Missing filter value: %s", ex)
            raise ValueError("Missing filter value")

        try:
            # Parse the new LDAP filter
            new_filter = ldapfilter.get_ldap_filter(filter_str)
        except (TypeError, ValueError) as ex:
            logging.warning("Error parsing filter: %s", ex)
            raise ValueError("Error parsing filter")

        # The filter is valid
        self.valid_filter = True

        # Compare to the "old" one
        if new_filter != self.requirement.filter:
            # Replace the requirement filter
            self.requirement.filter = new_filter
            return True

        # Same filter
        return False
977228
def update_filter_dict(d, user, status):
    
    if user is not None:
        if not user.id:
            return None
        d['user'] = user
    if status is not None:
        d['status'] = status
283067
def _apply_filter_settings(self):
        """"""
        # TODO: Allow easy customization of filters
        if self.mipmap:
            gl.glTexParameterf(self.target, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR_MIPMAP_LINEAR)
        else:
            gl.glTexParameterf(self.target, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR)
        gl.glTexParameterf(self.target, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR)

        gl.glTexParameterf(self.target, gl.GL_TEXTURE_WRAP_S, gl.GL_CLAMP_TO_EDGE)
        gl.glTexParameterf(self.target, gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_EDGE)
943531
def set_filters(self, filters):
        
        if filters == None or isinstance(filters, (tuple, list)):
            self.filters = filters
        else:
            self.filters = [ filters ]
239281
public void addSubFileFilter()
    {
        // Override this if it is not correct.
        SubFileFilter listener = null;
        this.getMainRecord().setKeyArea(BaseFolder.PARENT_FOLDER_ID_KEY);
        this.getMainRecord().addListener(listener = new SubFileFilter(this.getHeaderRecord()));
        if (this.getMainRecord().getKeyArea().getField(DBConstants.MAIN_KEY_FIELD).isNullable() == false)
        {
            listener.setFilterIfNull(true);
            listener.setAddNewHeaderOnAdd(false);
        }
        // Set it back
        if (DBConstants.TRUE.equalsIgnoreCase(this.getProperty("fakeHeader")))
            this.setProperty(DBParams.HEADER_OBJECT_ID, DBConstants.BLANK);
    }
1239416
private void updateTintFilter() {
        if (mTint == null) {
            mTintFilter = null;
            return;
        }
        // setMode, setColor of PorterDuffColorFilter are not public method in SDK v7. (Thanks @Google still not accessible in API v24)
        // Therefore we create a new one all the time here. Don't expect this is called often.
        int color = mTint.getColorForState(getState(), Color.TRANSPARENT);
        mTintFilter = new PorterDuffColorFilter(color, mTintMode);
    }
688903
protected function setSelectedFileManager()
    {
        foreach ($this->session->get('file_manager_selected', array()) as $path) {
            $file = new SplFileInfo(gplcart_file_absolute($path));
            if (is_object($file)) {
                $this->data_selected[$path] = $file;
            }
        }
    }
323063
public void updateAll(boolean clearFilter) {

        try {
            readFolder(m_currentFolder, clearFilter);
            Set<Object> ids = Sets.newHashSet();
            ids.addAll(m_fileTree.getItemIds());
            for (Object id : ids) {
                updateTree((CmsUUID)id);
            }
        } catch (CmsException e) {
            CmsErrorDialog.showErrorDialog(
                CmsVaadinUtils.getMessageText(Messages.ERR_EXPLORER_CAN_NOT_READ_RESOURCE_1, m_currentFolder),
                e);
            LOG.error(e.getLocalizedMessage(), e);
        }
    }
602788
def update_metadata_filters(metadata, jupyter_md, cell_metadata):
    """"""

    cell_metadata = [m for m in cell_metadata if m not in ['language', 'magic_args']]

    if 'cell_metadata_filter' in metadata.get('jupytext', {}):
        metadata_filter = metadata_filter_as_dict(metadata.get('jupytext', {})['cell_metadata_filter'])
        if isinstance(metadata_filter.get('excluded'), list):
            metadata_filter['excluded'] = [key for key in metadata_filter['excluded'] if key not in cell_metadata]
        metadata_filter.setdefault('additional', [])
        if isinstance(metadata_filter.get('additional'), list):
            for key in cell_metadata:
                if key not in metadata_filter['additional']:
                    metadata_filter['additional'].append(key)
        metadata.setdefault('jupytext', {})['cell_metadata_filter'] = metadata_filter_as_string(metadata_filter)

    if not jupyter_md:
        # Set a metadata filter equal to the current metadata in script
        cell_metadata = {'additional': cell_metadata, 'excluded': 'all'}
        metadata.setdefault('jupytext', {})['notebook_metadata_filter'] = '-all'
        metadata.setdefault('jupytext', {})['cell_metadata_filter'] = metadata_filter_as_string(cell_metadata)
279557
protected void updateFromSelection() {
    DBIDSelection sel = context.getSelection();
    if(sel != null) {
      this.dbids = DBIDUtil.newArray(sel.getSelectedIds());
      this.dbids.sort();
    }
    else {
      this.dbids = DBIDUtil.newArray();
    }
  }
389384
function _handleDeleteFilter(e) {
        // Remove the filter set from the preferences and
        // clear the active filter set index from view state.
        var filterSets        = PreferencesManager.get("fileFilters") || [],
            activeFilterIndex = PreferencesManager.getViewState("activeFileFilter"),
            filterIndex       = $(e.target).parent().data("index") - FIRST_FILTER_INDEX;

        // Don't let the click bubble upward.
        e.stopPropagation();

        filterSets.splice(filterIndex, 1);
        PreferencesManager.set("fileFilters", filterSets);

        if (activeFilterIndex === filterIndex) {
            // Removing the active filter, so clear the active filter
            // both in the view state.
            setActiveFilter(null);
        } else if (activeFilterIndex > filterIndex) {
            // Adjust the active filter index after the removal of a filter set before it.
            --activeFilterIndex;
            setActiveFilter(filterSets[activeFilterIndex], activeFilterIndex);
        }

        _updatePicker();
        _doPopulate();
        _picker.refresh();
    }