public interface VisibleFilter extends Filter
Element has a visible property, that indicate whether this element is visible. This property is defined on 'model' level in TWaver. In fact, components has been installed internal visible filter to make this property works. But visible filter is used on components (view level) to make a more flexible visible customization. You can use either of them.
Component like network and tree, they have method
isVisible(Element element)
to check whether
an element is visible on this component. This method will consider
all installed visible filters and return whether this element
should be visible.
Following code create a visible filter to hide all non-node-type elements:
network.addVisibleFilter(new VisibleFilter(){ public boolean isVisible(Element element) { return (element instanceof Node); } });
Modifier and Type | Method and Description |
---|---|
boolean |
isVisible(Element element)
Determines the specified element is visible.
|
boolean isVisible(Element element)
element
- the element to be checked.Copyright © 2002 - 2010 Serva Software. All Rights Reserved.