|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.miginfocom.calendar.category.CategoryFilter
public class CategoryFilter
A filter that can be used in a GridRow to exclude unwanted ActivityViews.
This filter has "OR" logic wich means it will accept a categorizable object as long as at least one of its categories is in the list of categories for this filter.
| Constructor Summary | |
|---|---|
CategoryFilter(Category category,
boolean includeSubCategories,
boolean acceptUncategorized)
Constructor. |
|
CategoryFilter(Category category,
boolean includeSubCategories,
boolean acceptUncategorized,
Filter subFilter)
Constructor. |
|
CategoryFilter(Filter subCatFilter)
Constructor for accepting all categories but filtering them with subCatFilter. |
|
CategoryFilter(java.lang.String name,
Category[] cats,
boolean includeSubCategories,
boolean acceptUncategorized)
Constructor. |
|
CategoryFilter(java.lang.String name,
Category[] cats,
boolean includeSubCategories,
boolean acceptUncategorized,
Filter subCatFilter)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
accept(java.lang.Object categorizable)
Returns if the categorizable is approved by the filter. |
static CategoryFilter[] |
createFilterRowsDeep(Category root,
boolean acceptUncategorized)
Creates one CategoryFilter row for every sub category under root. |
Category[] |
getCategories()
|
java.lang.String |
getName()
Returns a human readable name for the filter. |
boolean |
isOrLogic()
Returns true if OR-logic, which means that only one category needs to be equal for this filter to return true. |
void |
setOrLogic(boolean isOr)
Set to true if OR-logic, which means that only one category needs to be equal for this filter to return true. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CategoryFilter(Category category,
boolean includeSubCategories,
boolean acceptUncategorized)
category - The category that this filter represents. Not null.includeSubCategories - If categories below category should also be accepted.acceptUncategorized - If true Categorizable object that doesn't have a
category id will be accepted anyway.Category.getProperty(com.miginfocom.util.PropertyKey)
public CategoryFilter(Category category,
boolean includeSubCategories,
boolean acceptUncategorized,
Filter subFilter)
category - The category that this filter represents. Not null.includeSubCategories - If categories below category should also be accepted.acceptUncategorized - If true Categorizable object that doesn't have a
category id will be accepted anyway.subFilter - A filter that also have to be evaluated to true for the category
that matches. This can normally not be done with a CompositeFilter
since you can not with a composite filter know the category that was accepted.
If null no subfilter will be applied.
Category.getProperty(com.miginfocom.util.PropertyKey)
public CategoryFilter(java.lang.String name,
Category[] cats,
boolean includeSubCategories,
boolean acceptUncategorized)
name - The name of this filter.cats - The categories that this filter represents, if any. Not null.includeSubCategories - If categories below cats should also be accepted.acceptUncategorized - If true Categorizable object that doesn't have a
category id will be accepted anyway.Category.getProperty(com.miginfocom.util.PropertyKey)public CategoryFilter(Filter subCatFilter)
subCatFilter.
subCatFilter - A filter that have to be evaluated to true for at least one category
that matches. This can normally not be done with a CompositeFilter
since you can not with a composite filter know the category that was accepted. The filter will be sent
the Category as the PropertyProvider to its accept method.Category.getProperty(com.miginfocom.util.PropertyKey)
public CategoryFilter(java.lang.String name,
Category[] cats,
boolean includeSubCategories,
boolean acceptUncategorized,
Filter subCatFilter)
cats - The categories that this filter represents, if any. Not null.includeSubCategories - If categories below cats should also be accepted.subCatFilter - A filter that also have to be evaluated to true for the category
that matches. This can normally not be done with a CompositeFilter
since you can not with a composite filter know the category that was accepted. The filter will be sent
the Category as the PropertyProvider to its accept method.
If null no subfilter will be applied.
Category.getProperty(com.miginfocom.util.PropertyKey)| Method Detail |
|---|
public java.lang.String getName()
Filter
getName in interface Filterpublic Category[] getCategories()
public boolean isOrLogic()
true if OR-logic, which means that only one category needs to be equal for this filter to return true.
If set to false AND logic is used.
NOT IMPLEMENTED YET!
true is OR logic. false if AND logic.public void setOrLogic(boolean isOr)
true if OR-logic, which means that only one category needs to be equal for this filter to return true.
If set to false AND logic is used.
NOT IMPLEMENTED YET!
isOr - true is OR logic. false if AND logic.public final boolean accept(java.lang.Object categorizable)
accept in interface Filtercategorizable - The categorizable to approve. Not null and must be of type Categorizable.
public static CategoryFilter[] createFilterRowsDeep(Category root,
boolean acceptUncategorized)
CategoryFilter row for every sub category under root. Depth first.
root - The root category to start from. Will be the first one returned.acceptUncategorized - If true Categorizable object that doesn't have a
CategoryFilter row for every sub category under root. Depth first.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||