Package docking.widgets.tree
Class DefaultGTreeFilterProvider
java.lang.Object
docking.widgets.tree.DefaultGTreeFilterProvider
- All Implemented Interfaces:
GTreeFilterProvider
-
Constructor Summary
-
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
setFilterOptions
(FilterOptions filterOptions) void
setFilterText
(String text) Sets the filter text for the filter.
-
Constructor Details
-
DefaultGTreeFilterProvider
-
-
Method Details
-
getFilterComponent
Description copied from interface:GTreeFilterProvider
Returns the component to place at the bottom of a GTree to provider filtering capabilites.- Specified by:
getFilterComponent
in interfaceGTreeFilterProvider
- Returns:
- the filter component
-
setFilterText
Description copied from interface:GTreeFilterProvider
Sets the filter text for the filter.- Specified by:
setFilterText
in interfaceGTreeFilterProvider
- Parameters:
text
- the text to filter on
-
setEnabled
public void setEnabled(boolean enabled) Description copied from interface:GTreeFilterProvider
Sets the active state for the filter component.- Specified by:
setEnabled
in interfaceGTreeFilterProvider
- Parameters:
enabled
- true, the filter component is enabled
-
setAccessibleNamePrefix
Description copied from interface:GTreeFilterProvider
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.
- Specified by:
setAccessibleNamePrefix
in interfaceGTreeFilterProvider
- 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.
-
setFilterOptions
-
loadFilterPreference
Description copied from interface:GTreeFilterProvider
Loads any filter preferences that have been saved.- Specified by:
loadFilterPreference
in interfaceGTreeFilterProvider
- Parameters:
windowManager
- theDockingWindowManager
to load preferences fromuniquePreferenceKey
- the preference key
-
getFilter
Description copied from interface:GTreeFilterProvider
returns theGTreeFilter
object to apply to the GTree whenever the filter component is manipulated- Specified by:
getFilter
in interfaceGTreeFilterProvider
- Returns:
- the GTreeFilter to apply to the tree
-
getFilterText
Description copied from interface:GTreeFilterProvider
Returns the current filter text.- Specified by:
getFilterText
in interfaceGTreeFilterProvider
- Returns:
- the current filter text
-
setDataTransformer
Description copied from interface:GTreeFilterProvider
Sets aFilterTransformer
for preparing tree data to be filtered.- Specified by:
setDataTransformer
in interfaceGTreeFilterProvider
- Parameters:
transformer
- the transform for preparing tree data to be filtered
-