tvbrowser.core.filters

## Class FilterManagerImpl

- java.lang.Object
- - tvbrowser.core.filters.FilterManagerImpl

- All Implemented Interfaces:
    FilterManager

      public class FilterManagerImpl
      extends java.lang.Object
      implements FilterManager

  Is the implementation of the FilterManager.
  Since:
    2.5
  Author:
    René Mach

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addFilter(PluginsProgramFilter filter)`
    `java.lang.String` | `addNewChannelFilterComponent()` Opens a dialog to create new channel filter components.
    `boolean` | `deleteFilter(PluginsProgramFilter filter)`
    `ProgramFilter` | `getAllFilter()` Gets the "ShowAll" filter of the program table.
    `ChannelFilter[]` | `getAvailableChannelFilters()` Gets the available channel filters.
    `ProgramFilter[]` | `getAvailableFilters()` Returns an array of all available filters.
    `java.lang.String[]` | `getChannelFilterComponentNames()` Gets the names of the channel filter components.
    `ChannelFilter` | `getCurrentChannelFilter()` Gets the current channel filter.
    `ProgramFilter` | `getCurrentFilter()` Returns the current selected filter of the program table.
    `ProgramFilter` | `getDefaultFilter()` Returns the default filter of the program table.
    `static FilterManager` | `getInstance()` Creates an instance of this class if there is no one and returns it.
    `boolean` | `isPluginFilter(ProgramFilter filter)` Tests if the filter is a plugin filter.
    `void` | `registerChannelFilterChangeListener(ChannelFilterChangeListener listener)` Registers the given ChannelFilterChangeListener.
    `void` | `registerFilterChangeListener(FilterChangeListener listener)` Registers the given FilterChangeListener.
    `void` | `registerFilterChangeListener(FilterChangeListenerV2 listener)` Registers the given FilterChangeListener.
    `void` | `setChannelFilter(ChannelFilter filter)` Sets the current channel filter.
    `void` | `setCurrentFilter(ProgramFilter filter)` Activates a filter.
    `void` | `unregisterChannelFilterChangeListener(ChannelFilterChangeListener listener)` Unregisters the given ChannelFilterChangeListener.
    `void` | `unregisterFilterChangeListener(FilterChangeListener listener)` Unregisters the given FilterChangeListener.
    `void` | `unregisterFilterChangeListener(FilterChangeListenerV2 listener)` Unregisters the given FilterChangeListener.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static FilterManager getInstance()

      Creates an instance of this class if there is no one and returns it.
      Returns:
        The instance of this class.

    - #### getCurrentFilter

          public ProgramFilter getCurrentFilter()

      Returns the current selected filter of the program table.
      Specified by:
        `getCurrentFilter` in interface `FilterManager`
      Returns:
        The current selected filter of the program table.

    - #### setCurrentFilter

          public void setCurrentFilter(ProgramFilter filter)

      Activates a filter.
      Specified by:
        `setCurrentFilter` in interface `FilterManager`
      Parameters:
        `filter` - The filter to activate.

    - #### getAvailableFilters

          public ProgramFilter[] getAvailableFilters()

      Returns an array of all available filters.
      Specified by:
        `getAvailableFilters` in interface `FilterManager`
      Returns:
        An array of all available filters.

    - #### addFilter

          public boolean addFilter(PluginsProgramFilter filter)

      Specified by:
        `addFilter` in interface `FilterManager`
      Parameters:
        `filter` - The filter to add.
      Returns:
        True if the filter could be added.

    - #### deleteFilter

          public boolean deleteFilter(PluginsProgramFilter filter)

      Specified by:
        `deleteFilter` in interface `FilterManager`
      Parameters:
        `filter` - The filter to delete.
      Returns:
        True if the filter could be deleted.

    - #### getDefaultFilter

          public ProgramFilter getDefaultFilter()

      Returns the default filter of the program table.
      Specified by:
        `getDefaultFilter` in interface `FilterManager`
      Returns:
        The default filter of the program table.

    - #### getAllFilter

          public ProgramFilter getAllFilter()

      Gets the "ShowAll" filter of the program table.
      Specified by:
        `getAllFilter` in interface `FilterManager`
      Returns:
        The "ShowAll" filter of the program table.

    - #### isPluginFilter

          public boolean isPluginFilter(ProgramFilter filter)

      Tests if the filter is a plugin filter.
      Specified by:
        `isPluginFilter` in interface `FilterManager`
      Parameters:
        `filter` - The filter to test.
      Returns:
        `True` if the filter is a plugin filter, `false` otherwise.
      Since:
        2.6

    - #### getChannelFilterComponentNames

          public java.lang.String[] getChannelFilterComponentNames()

      Description copied from interface: `FilterManager`
      Gets the names of the channel filter components.

      Specified by:
        `getChannelFilterComponentNames` in interface `FilterManager`
      Returns:
        The names of the channel filter components.

    - #### addNewChannelFilterComponent

          public java.lang.String addNewChannelFilterComponent()

      Description copied from interface: `FilterManager`
      Opens a dialog to create new channel filter components.

      Specified by:
        `addNewChannelFilterComponent` in interface `FilterManager`
      Returns:
        The name of the created filter component, or `null` if no component was created.

    - #### registerFilterChangeListener

          public void registerFilterChangeListener(FilterChangeListener listener)

      Description copied from interface: `FilterManager`
      Registers the given FilterChangeListener.

      Specified by:
        `registerFilterChangeListener` in interface `FilterManager`
      Parameters:
        `listener` - The listener to register.

    - #### unregisterFilterChangeListener

          public void unregisterFilterChangeListener(FilterChangeListener listener)

      Description copied from interface: `FilterManager`
      Unregisters the given FilterChangeListener.

      Specified by:
        `unregisterFilterChangeListener` in interface `FilterManager`
      Parameters:
        `listener` - The listener to remove.

    - #### registerFilterChangeListener

          public void registerFilterChangeListener(FilterChangeListenerV2 listener)

      Description copied from interface: `FilterManager`
      Registers the given FilterChangeListener.

      Specified by:
        `registerFilterChangeListener` in interface `FilterManager`
      Parameters:
        `listener` - The listener to register.

    - #### unregisterFilterChangeListener

          public void unregisterFilterChangeListener(FilterChangeListenerV2 listener)

      Description copied from interface: `FilterManager`
      Unregisters the given FilterChangeListener.

      Specified by:
        `unregisterFilterChangeListener` in interface `FilterManager`
      Parameters:
        `listener` - The listener to remove.

    - #### getCurrentChannelFilter

          public ChannelFilter getCurrentChannelFilter()

      Description copied from interface: `FilterManager`
      Gets the current channel filter.

      Specified by:
        `getCurrentChannelFilter` in interface `FilterManager`
      Returns:
        The current channel filter or `null` if no channel filter is active.

    - #### setChannelFilter

          public void setChannelFilter(ChannelFilter filter)

      Description copied from interface: `FilterManager`
      Sets the current channel filter.

      Specified by:
        `setChannelFilter` in interface `FilterManager`
      Parameters:
        `filter` - The channel filter to set or `null` to disable current channel filter.

    - #### getAvailableChannelFilters

          public ChannelFilter[] getAvailableChannelFilters()

      Description copied from interface: `FilterManager`
      Gets the available channel filters.

      Specified by:
        `getAvailableChannelFilters` in interface `FilterManager`
      Returns:
        The available channel filters.

    - #### registerChannelFilterChangeListener

          public void registerChannelFilterChangeListener(ChannelFilterChangeListener listener)

      Description copied from interface: `FilterManager`
      Registers the given ChannelFilterChangeListener.

      Specified by:
        `registerChannelFilterChangeListener` in interface `FilterManager`
      Parameters:
        `listener` - The listener to register

    - #### unregisterChannelFilterChangeListener

          public void unregisterChannelFilterChangeListener(ChannelFilterChangeListener listener)

      Description copied from interface: `FilterManager`
      Unregisters the given ChannelFilterChangeListener.

      Specified by:
        `unregisterChannelFilterChangeListener` in interface `FilterManager`
      Parameters:
        `listener` - The listener to unregister.

TV-Browser 3.4.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)