Interface GTreeFilterProvider

All Known Implementing Classes:
DefaultGTreeFilterProvider

public interface GTreeFilterProvider
Interface for providing a filter for GTrees.
  • 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 the GTreeFilter 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

      void setFilterText(String text)
      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

      void setDataTransformer(FilterTransformer<GTreeNode> transformer)
      Sets a FilterTransformer for preparing tree data to be filtered.
      Parameters:
      transformer - the transform for preparing tree data to be filtered
    • loadFilterPreference

      void loadFilterPreference(DockingWindowManager windowManager, String uniquePreferenceKey)
      Loads any filter preferences that have been saved.
      Parameters:
      windowManager - the DockingWindowManager to load preferences from
      uniquePreferenceKey - the preference key
    • setAccessibleNamePrefix

      void setAccessibleNamePrefix(String namePrefix)
      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.