Filters the displayed projects.<p>

@param filter the filter
422424
public void filterTable(String filter) {

        m_container.removeAllContainerFilters();
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(filter)) {
            m_container.addContainerFilter(
                new Or(
                    new SimpleStringFilter(PROP_NAME, filter, true, false),
                    new SimpleStringFilter(PROP_DESCRIPTION, filter, true, false)));
        }
        if ((getValue() != null) & !((Set<CmsUUID>)getValue()).isEmpty()) {
            setCurrentPageFirstItemId(((Set<CmsUUID>)getValue()).iterator().next());
        }
    }
287305
public void addFilter(Filter filter) {
    filter.setInitialContext(initialContext);

    int minIndex = Integer.MAX_VALUE;
    String[] before = filter.before();
    for (int i = 0; i < before.length; i++) {
        String s = before[i];
        int index = index(activeFilters, s);
        if (index < minIndex) {
          minIndex = index;
        }
      }
      if (minIndex == Integer.MAX_VALUE) {
        // -1 is more usable for not-found than MAX_VALUE
        minIndex = -1;
      }

    if (contains(filter.before(), FIRST_IN_PIPE)) {
      activeFilters.add(0, filter);
    } else if (minIndex != -1) {
      activeFilters.add(minIndex, filter);
    } else {
      activeFilters.add(filter);
    }
  }
521887
public void addFilterAt(IRuleFilter filter, Class<? extends IRuleFilter> atFilter) {
        int index = getIndexOfClass(filters, atFilter);
        if (index == -1) {
            throw new FilterAddException("filter " + atFilter.getSimpleName() + " has not been added");
        }
        filters.remove(index);
        filters.add(index, filter);
    }
109061
public void addFilter(AbstractLogFilter<E> filter) {
                Validate.notNull(filter);
                filters.add(filter);
                uptodate = false;
                filter.addObserver(this);
        }
193207
public static cmpaction[] get_filtered(nitro_service service, String filter) throws Exception{
		cmpaction obj = new cmpaction();
		options option = new options();
		option.set_filter(filter);
		cmpaction[] response = (cmpaction[]) obj.getfiltered(service, option);
		return response;
	}
200635
public void addFilter(String name, String value)
    {
        if(this.filters == null)
            this.filters = new HashMap<String,String>();
        this.filters.put(name, value);
    }
368323
public void deleteRelationsFromResource(String resourceName, CmsRelationFilter filter) throws CmsException {

        CmsResource resource = readResource(resourceName, CmsResourceFilter.ALL);
        m_securityManager.deleteRelationsForResource(m_context, resource, filter);
    }
388598
public CmsLockFilter filterProject(CmsUUID projectId) {

        CmsLockFilter filter = (CmsLockFilter)clone();
        filter.m_projectId = projectId;
        return filter;
    }
470222
public void setFilter(String filter) {
		if(filter == null || filter.length() == 0 ) {
			this.filter = null;
		} else {
			this.filter = filter;
		}
		
		// Reload the list of files.
		this.loadFolder(this.currentFolder);
	}
1223666
public Collection<Project> getTargetedBy(ProjectFilter filter) {
        filter = (filter != null) ? filter : new ProjectFilter();

        filter.targets.clear();
        filter.targets.add(this);
        return getInstance().get().projects(filter);
    }
324773
public void initFilter(FunDapterFilter<T> filter) {

        if (filter == null)
            throw new IllegalArgumentException("Cannot pass a null filter to FunDapter");

        this.funDapterFilter = filter;

        mFilter = new Filter() {

            @Override
            protected void publishResults(CharSequence constraint, FilterResults results) {

                @SuppressWarnings("unchecked") List<T> list = (List<T>) results.values;

                if (results.count == 0) {
                    resetData();
                } else {
                    mDataItems = list;
                }

                notifyDataSetChanged();
            }

            @Override
            protected FilterResults performFiltering(CharSequence constraint) {

                FilterResults results = new FilterResults();
                if (constraint == null || constraint.length() == 0) {

                    // No constraint - no point in filtering.
                    results.values = mOrigDataItems;
                    results.count = mOrigDataItems.size();
                } else {
                    // Perform the filtering operation

                    List<T> filter =
                            funDapterFilter.filter(constraint.toString(), mOrigDataItems);

                    results.count = filter.size();
                    results.values = filter;

                }

                return results;
            }
        };
    }
354269
public void addFilter(Filter filter) {
		List<Filter> filters = filterFactory.getAllFilter();
		
		int index = searchFilterIndex(filters, filter.getId(), 0, filters.size());
		
		if (index == -1) {
			// not found - put at the end
			filters.add(filter);
		} else {
			filters.add(index, filter);
		}
	}
181960
private static void displayAvailableFilters(ProjectFile project)
   {
      System.out.println("Unknown filter name supplied.");
      System.out.println("Available task filters:");
      for (Filter filter : project.getFilters().getTaskFilters())
      {
         System.out.println("   " + filter.getName());
      }

      System.out.println("Available resource filters:");
      for (Filter filter : project.getFilters().getResourceFilters())
      {
         System.out.println("   " + filter.getName());
      }

   }
610457
public void updateFilters(List<CmsDataViewFilter> newFilters) {

        if (newFilters.isEmpty()) {
            m_filterContainer.setVisible(false);
        }
        if (m_filters.equals(newFilters)) {
            return;
        }
        m_filterContainer.removeAllComponents();
        m_filters = newFilters;
        m_filterMap.clear();
        for (CmsDataViewFilter filter : newFilters) {
            m_filterMap.put(filter.getId(), filter);
            final CmsDataViewFilter finalFilter = filter;
            ComboBox select = new ComboBox(filter.getNiceName());
            select.setWidth("175px");
            select.setNullSelectionAllowed(false);
            select.setPageLength(0);
            Map<String, String> options = filter.getOptions();
            for (Map.Entry<String, String> entry : options.entrySet()) {
                String key = entry.getKey();
                String value = entry.getValue();
                select.addItem(key);
                select.setItemCaption(key, value);
            }
            select.setValue(filter.getValue());
            if (filter.getHelpText() != null) {
                select.setDescription(filter.getHelpText());
            }

            select.addValueChangeListener(new ValueChangeListener() {

                private static final long serialVersionUID = 1L;

                public void valueChange(ValueChangeEvent event) {

                    String newValue = (String)(event.getProperty().getValue());
                    updateFilter(finalFilter.getId(), newValue);
                }
            });
            m_filterContainer.addComponent(select);
        }
    }
680501
public static <T> List<T> filter(Collection<T> c, Filter<T> filter){
        if(c.size()==0)
            return Collections.emptyList();

        List<T> filteredList = new ArrayList<T>(c.size());
        for(T element: c){
            if(filter.select(element))
                filteredList.add(element);
        }
        return filteredList;
    }
1365826
public static cmppolicy[] get_filtered(nitro_service service, String filter) throws Exception{
		cmppolicy obj = new cmppolicy();
		options option = new options();
		option.set_filter(filter);
		cmppolicy[] response = (cmppolicy[]) obj.getfiltered(service, option);
		return response;
	}
837295
private void processFilterAction() {
		if (!(chkFilter.isSelected())) {
			applyFilters(new ArrayList<>());
		}
		if (chkFilter.isSelected()) {
			if (txtFilter.getText().isEmpty()) {
				chkFilter.setSelected(false);
				applyFilters(new ArrayList<>());
				return;
			}
			try {
				List<TreeModelFilter<SQLPPTriplesMap>> filters = parseSearchString(txtFilter.getText());
				if (filters == null) {
					throw new Exception("Impossible to parse search string");
				}
				applyFilters(filters);
			} catch (Exception e) {
				LoggerFactory.getLogger(this.getClass()).debug(e.getMessage(), e);
				JOptionPane.showMessageDialog(this, e.getMessage());
			}
		}
	}