Package docking.widgets.tree
Interface GTreeFilterProvider
- All Known Implementing Classes:
DefaultGTreeFilterProvider
public interface GTreeFilterProvider
Interface for providing a filter for GTrees.
-
Method Summary
Modifier and TypeMethodDescriptionreturns theGTreeFilter
object to apply to the GTree whenever the filter component is manipulatedReturns the component to place at the bottom of a GTree to provider filtering capabilites.Returns the current filter text.void
loadFilterPreference
(DockingWindowManager windowManager, String uniquePreferenceKey) Loads any filter preferences that have been saved.void
setAccessibleNamePrefix
(String namePrefix) Sets an accessible name on the filter component.void
setDataTransformer
(FilterTransformer<GTreeNode> transformer) Sets aFilterTransformer
for preparing tree data to be filtered.void
setEnabled
(boolean enabled) Sets the active state for the filter component.void
setFilterText
(String text) Sets the filter text for the filter.
-
Method Details
-
getFilterComponent
JComponent getFilterComponent()Returns the component to place at the bottom of a GTree to provider filtering capabilites.- Returns:
- the filter component
-
getFilter
GTreeFilter getFilter()returns theGTreeFilter
object to apply to the GTree whenever the filter component is manipulated- Returns:
- the GTreeFilter to apply to the tree
-
setEnabled
void setEnabled(boolean enabled) Sets the active state for the filter component.- Parameters:
enabled
- true, the filter component is enabled
-
setFilterText
Sets the filter text for the filter.- Parameters:
text
- the text to filter on
-
getFilterText
String getFilterText()Returns the current filter text.- Returns:
- the current filter text
-
setDataTransformer
Sets aFilterTransformer
for preparing tree data to be filtered.- Parameters:
transformer
- the transform for preparing tree data to be filtered
-
loadFilterPreference
Loads any filter preferences that have been saved.- Parameters:
windowManager
- theDockingWindowManager
to load preferences fromuniquePreferenceKey
- the preference key
-
setAccessibleNamePrefix
Sets an accessible name on the filter component. This prefix will be used to assign meaningful accessible names to the filter text field and the filter options button such that screen readers will properly describe them.This prefix should be the base name that describes the type of items in the tree. This method will then append the necessary information to name the text field and the button.
- Parameters:
namePrefix
- the accessible name prefix to assign to the filter component. For example if the tree contains fruits, then "Fruits" would be an appropriate prefix name.
-