|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.extended.tree.AsyncTreeNodesFilter<E>
public class AsyncTreeNodesFilter<E extends AsyncUniqueNode>
Special smart tree filter that doesn't filter out parent nodes which has childs that are accepted by filter. This can be used in any kind of filter fields to provide a proper visual feedback in tree.
Field Summary | |
---|---|
protected java.util.Map<java.lang.String,java.lang.Boolean> |
acceptStatesCache
Accept states by node IDs cache. |
protected boolean |
matchCase
Whether should match case or not. |
protected boolean |
searchFromStart
Whether should search from node text beginning or not. |
protected java.lang.String |
searchText
Search request text. |
protected TextProvider<E> |
textProvider
Nodes text provider. |
protected boolean |
useSpaceAsSeparator
Whether should use space character as requests separator or not. |
Constructor Summary | |
---|---|
AsyncTreeNodesFilter()
|
Method Summary | |
---|---|
boolean |
accept(E node)
Returns whether the specified object is accepted by this filter or not. |
protected boolean |
accept(java.lang.String nodeText,
java.lang.String searchRequest,
boolean searchFromStart)
Returns whether filter accepts specified node text or not. |
protected boolean |
acceptIncludingChilds(E node,
java.lang.String searchRequest)
Returns whether the specified node or any of its childs match the filter or not. |
protected boolean |
acceptNode(E node,
java.lang.String searchRequest)
Returns whether the specified node matches the filter or not. |
protected boolean |
acceptNodeImpl(E node,
java.lang.String searchRequest)
Returns whether the specified node matches the filter or not. |
void |
clearCache()
Clears accept states cache. |
void |
clearCache(E node)
Clears specific node accept state cache. |
void |
clearCache(java.lang.String nodeId)
Clears specific node accept state cache. |
java.lang.String |
getSearchText()
Returns search request text. |
TextProvider<E> |
getTextProvider()
Returns nodes text provider. |
boolean |
isMatchCase()
Returns whether should match case or not. |
boolean |
isSearchFromStart()
Returns whether should search from node text beginning or not. |
boolean |
isUseSpaceAsSeparator()
Returns whether should use space character as requests separator or not. |
void |
setMatchCase(boolean matchCase)
Returns whether should match case or not. |
void |
setSearchFromStart(boolean searchFromStart)
Sets whether should search from node text beginning or not. |
void |
setSearchText(java.lang.String searchText)
Sets search request text. |
void |
setTextProvider(TextProvider<E> textProvider)
Sets nodes text provider. |
void |
setUseSpaceAsSeparator(boolean useSpaceAsSeparator)
Sets whether should use space character as requests separator or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected TextProvider<E extends AsyncUniqueNode> textProvider
protected java.util.Map<java.lang.String,java.lang.Boolean> acceptStatesCache
protected boolean matchCase
protected boolean useSpaceAsSeparator
protected boolean searchFromStart
protected java.lang.String searchText
Constructor Detail |
---|
public AsyncTreeNodesFilter()
Method Detail |
---|
public TextProvider<E> getTextProvider()
public void setTextProvider(TextProvider<E> textProvider)
textProvider
- new nodes text providerpublic boolean isMatchCase()
public void setMatchCase(boolean matchCase)
matchCase
- whether should match case or notpublic boolean isUseSpaceAsSeparator()
public void setUseSpaceAsSeparator(boolean useSpaceAsSeparator)
useSpaceAsSeparator
- whether should use space character as requests separator or notpublic boolean isSearchFromStart()
public void setSearchFromStart(boolean searchFromStart)
searchFromStart
- whether should search from node text beginning or notpublic java.lang.String getSearchText()
public void setSearchText(java.lang.String searchText)
searchText
- search request textpublic void clearCache()
public void clearCache(E node)
public void clearCache(java.lang.String nodeId)
public boolean accept(E node)
accept
in interface Filter<E extends AsyncUniqueNode>
node
- object to process
protected boolean acceptIncludingChilds(E node, java.lang.String searchRequest)
node
- node to matchsearchRequest
- search request text
protected boolean acceptNode(E node, java.lang.String searchRequest)
node
- node to matchsearchRequest
- search request text
protected boolean acceptNodeImpl(E node, java.lang.String searchRequest)
node
- node to matchsearchRequest
- search request text
protected boolean accept(java.lang.String nodeText, java.lang.String searchRequest, boolean searchFromStart)
nodeText
- node textsearchRequest
- single search requestsearchFromStart
- whether should start searching from the beginning of the node text
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |