|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.refractions.udig.ui.operations.AdaptsToFilter
public class AdaptsToFilter
Default impl of OpFilter
Field Summary |
---|
Fields inherited from interface net.refractions.udig.ui.operations.OpFilter |
---|
FALSE, TRUE |
Constructor Summary | |
---|---|
AdaptsToFilter(java.lang.String targetClass)
|
Method Summary | |
---|---|
boolean |
accept(java.lang.Object object)
Returns true if the object is accepted by the filter |
void |
addListener(IOpFilterListener listener)
Adds a listener to listen for events indicating the value has changed. |
boolean |
canCacheResult()
Returns true if the results can be cached. |
boolean |
isBlocking()
Returns true if processing this filter may block when OpFilter.accept(Object) is called or takes a large amount
of time to execute. |
void |
removeListener(IOpFilterListener listener)
Removes a listeners |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdaptsToFilter(java.lang.String targetClass)
targetClass
- Class that the object must resolve to.Method Detail |
---|
public boolean accept(java.lang.Object object)
OpFilter
accept
in interface OpFilter
object
- object to test
public boolean canCacheResult()
OpFilter
A result can be cached if
OpFilter.addListener(IOpFilterListener)
methodTherefore this method only returns false if it must be calculated each time because there is no way to listen for state changes. If it is non-blocking that is fine, if it is blocking then try to do this rarely.
WARNING: If this returns true then the listeners must be notified for the new value to be recognized
canCacheResult
in interface OpFilter
public boolean isBlocking()
OpFilter
OpFilter.accept(Object)
is called or takes a large amount
of time to execute.
isBlocking
in interface OpFilter
OpFilter.accept(Object)
is called.public void addListener(IOpFilterListener listener)
OpFilter
OpFilter.canCacheResult()
returns true.
addListener
in interface OpFilter
listener
- listener to addpublic void removeListener(IOpFilterListener listener)
OpFilter
removeListener
in interface OpFilter
listener
- listener to remove
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |