Class DefaultGTreeFilterProvider

java.lang.Object
docking.widgets.tree.DefaultGTreeFilterProvider
All Implemented Interfaces:
GTreeFilterProvider

public class DefaultGTreeFilterProvider extends Object implements GTreeFilterProvider
  • Constructor Details

    • DefaultGTreeFilterProvider

      public DefaultGTreeFilterProvider(GTree gTree)
  • Method Details

    • copy

      public GTreeFilterProvider copy(GTree newTree)
      Description copied from interface: GTreeFilterProvider
      Creates 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:
      copy in interface GTreeFilterProvider
      Parameters:
      newTree - the new tree for the new filter
      Returns:
      the copy
    • getFilterComponent

      public JComponent getFilterComponent()
      Description copied from interface: GTreeFilterProvider
      Returns the component to place at the bottom of a GTree to provider filtering capabilities.
      Specified by:
      getFilterComponent in interface GTreeFilterProvider
      Returns:
      the filter component
    • setFilterText

      public void setFilterText(String text)
      Description copied from interface: GTreeFilterProvider
      Sets the filter text for the filter.
      Specified by:
      setFilterText in interface GTreeFilterProvider
      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 interface GTreeFilterProvider
      Parameters:
      enabled - true, the filter component is enabled
    • setAccessibleNamePrefix

      public void setAccessibleNamePrefix(String namePrefix)
      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 interface GTreeFilterProvider
      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

      public void setFilterOptions(FilterOptions filterOptions)
    • getFilterOptions

      public FilterOptions getFilterOptions()
    • loadFilterPreference

      public void loadFilterPreference(DockingWindowManager windowManager)
      Description copied from interface: GTreeFilterProvider
      Loads any filter preferences that have been saved.
      Specified by:
      loadFilterPreference in interface GTreeFilterProvider
      Parameters:
      windowManager - the DockingWindowManager to load preferences from
    • getFilter

      public GTreeFilter getFilter()
      Description copied from interface: GTreeFilterProvider
      returns the GTreeFilter object to apply to the GTree whenever the filter component is manipulated
      Specified by:
      getFilter in interface GTreeFilterProvider
      Returns:
      the GTreeFilter to apply to the tree
    • getFilterText

      public String getFilterText()
      Description copied from interface: GTreeFilterProvider
      Returns the current filter text.
      Specified by:
      getFilterText in interface GTreeFilterProvider
      Returns:
      the current filter text
    • setDataTransformer

      public void setDataTransformer(FilterTransformer<GTreeNode> transformer)
      Description copied from interface: GTreeFilterProvider
      Sets a FilterTransformer for preparing tree data to be filtered.
      Specified by:
      setDataTransformer in interface GTreeFilterProvider
      Parameters:
      transformer - the transform for preparing tree data to be filtered