Package docking.widgets.tree
Class DefaultGTreeFilterProvider
java.lang.Object
docking.widgets.tree.DefaultGTreeFilterProvider
- All Implemented Interfaces:
GTreeFilterProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a copy of this filter with all current filter settings.returns theGTreeFilterobject to apply to the GTree whenever the filter component is manipulatedReturns the component to place at the bottom of a GTree to provider filtering capabilities.Returns the current filter text.voidloadFilterPreference(DockingWindowManager windowManager) Loads any filter preferences that have been saved.voidsetAccessibleNamePrefix(String namePrefix) Sets an accessible name on the filter component.voidsetDataTransformer(FilterTransformer<GTreeNode> transformer) Sets aFilterTransformerfor preparing tree data to be filtered.voidsetEnabled(boolean enabled) Sets the active state for the filter component.voidsetFilterOptions(FilterOptions filterOptions) voidsetFilterText(String text) Sets the filter text for the filter.
-
Constructor Details
-
DefaultGTreeFilterProvider
-
-
Method Details
-
copy
Description copied from interface:GTreeFilterProviderCreates a copy of this filter with all current filter settings.This is meant to be used for GTrees that support creating a new copy.
Note: Filter providers that do not support copying will return null from this method.
- Specified by:
copyin interfaceGTreeFilterProvider- Parameters:
newTree- the new tree for the new filter- Returns:
- the copy
-
getFilterComponent
Description copied from interface:GTreeFilterProviderReturns the component to place at the bottom of a GTree to provider filtering capabilities.- Specified by:
getFilterComponentin interfaceGTreeFilterProvider- Returns:
- the filter component
-
setFilterText
Description copied from interface:GTreeFilterProviderSets the filter text for the filter.- Specified by:
setFilterTextin interfaceGTreeFilterProvider- Parameters:
text- the text to filter on
-
setEnabled
public void setEnabled(boolean enabled) Description copied from interface:GTreeFilterProviderSets the active state for the filter component.- Specified by:
setEnabledin interfaceGTreeFilterProvider- Parameters:
enabled- true, the filter component is enabled
-
setAccessibleNamePrefix
Description copied from interface:GTreeFilterProviderSets 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:
setAccessibleNamePrefixin 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
-
getFilterOptions
-
loadFilterPreference
Description copied from interface:GTreeFilterProviderLoads any filter preferences that have been saved.- Specified by:
loadFilterPreferencein interfaceGTreeFilterProvider- Parameters:
windowManager- theDockingWindowManagerto load preferences from
-
getFilter
Description copied from interface:GTreeFilterProviderreturns theGTreeFilterobject to apply to the GTree whenever the filter component is manipulated- Specified by:
getFilterin interfaceGTreeFilterProvider- Returns:
- the GTreeFilter to apply to the tree
-
getFilterText
Description copied from interface:GTreeFilterProviderReturns the current filter text.- Specified by:
getFilterTextin interfaceGTreeFilterProvider- Returns:
- the current filter text
-
setDataTransformer
Description copied from interface:GTreeFilterProviderSets aFilterTransformerfor preparing tree data to be filtered.- Specified by:
setDataTransformerin interfaceGTreeFilterProvider- Parameters:
transformer- the transform for preparing tree data to be filtered
-