Package com.kheops.jmap.client.layers
Interface DisplayFilter
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
LayerDisplayFilter
This interface is used by Layer objects to filter map elements display.
The accept method is called for each element of a layer and if
the method returns false, the element is ignored. Ignored elements
are not drawn and cannot be selected or queried either.
Filters have a name that can be used to identify them.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(K2DElement element) This method is called for each element to determine if the element should be ignored by the layer.clone()getName()booleanvoidsetEnabled(boolean enabled) Enables or disables this filter.
-
Method Details
-
getName
String getName()- Returns:
- the name of the filter
-
isEnabled
boolean isEnabled()- Returns:
- true if this filter is enabled.
-
setEnabled
void setEnabled(boolean enabled) Enables or disables this filter.- Parameters:
enabled- the new state of the filter
-
accept
This method is called for each element to determine if the element should be ignored by the layer. It typically checks the element or its attributes to determine if it should be ignored.- Parameters:
element- the element to test- Returns:
- false if the element should be ignored, true otherwise
-
clone
Object clone()
-