tvbrowser.ui.filter.dlgs

## Class FilterTreeModel

- java.lang.Object
- - javax.swing.tree.DefaultTreeModel
  - - tvbrowser.ui.filter.dlgs.FilterTreeModel

- All Implemented Interfaces:
    java.io.Serializable, javax.swing.tree.TreeModel

      public class FilterTreeModel
      extends javax.swing.tree.DefaultTreeModel

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class javax.swing.tree.DefaultTreeModel

      `asksAllowsChildren, listenerList, root`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FilterTreeModel(javax.swing.tree.TreeNode root)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `FilterNode` | `addDirectory(java.lang.String name, FilterNode parent)` Adds a filter to this tree at the given target node.
    `void` | `addFilter(ProgramFilter filter)` Adds a filter to this tree at the root node.
    `FilterNode` | `addFilter(ProgramFilter filter, FilterNode parent, FilterTree tree)` Adds a filter to this tree at the given target node.
    `void` | `addPluginsProgramFilters()`
    `void` | `createMenu(javax.swing.JMenu menu, ProgramFilter curFilter)`
    `void` | `deleteFilter(ProgramFilter filter)`
    `(package private) void` | `fireFilterAdded(ProgramFilter filter)`
    `(package private) void` | `fireFilterDefaultChanged(ProgramFilter filter)`
    `(package private) void` | `fireFilterRemoved(ProgramFilter filter)`
    `(package private) void` | `fireFilterTouched(ProgramFilter filter)`
    `ProgramFilter[]` | `getAllFilters()`
    `FilterNode` | `getDirectoryNode(java.lang.String name, FilterNode parent)`
    `static FilterTreeModel` | `getInstance()`
    `static FilterTreeModel` | `initInstance(java.io.ObjectInputStream in)`
    `static FilterTreeModel` | `initInstance(ProgramFilter[] filterArr)`
    `boolean` | `isLeaf(java.lang.Object nodeObject)`
    `void` | `registerFilterChangeListener(FilterChangeListener listener)` Deprecated. since 3.3.4 use `registerFilterChangeListener(FilterChangeListenerV2)` instead
    `void` | `registerFilterChangeListener(FilterChangeListenerV2 listener)`
    `void` | `reload(FilterTree tree, javax.swing.tree.TreeNode node)`
    `void` | `sort(FilterNode node, java.util.Comparator<FilterNode> comp, java.lang.String title)` Sorts the path from the given node to all leafs alphabetically.
    `void` | `storeData(java.io.ObjectOutputStream out)` Saves the data of this tree into the given stream.
    `void` | `unregisterFilterChangeListener(FilterChangeListener listener)` Deprecated. since 3.3.4 use `unregisterFilterChangeListener(FilterChangeListenerV2)` instead
    `void` | `unregisterFilterChangeListener(FilterChangeListenerV2 listener)`
    `void` | `updateAvailableChannels(Channel[] channels, java.lang.String directoryName, java.lang.String aboveDirectory)`

    - ### Methods inherited from class javax.swing.tree.DefaultTreeModel

      `addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged`

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

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

- - ### Constructor Detail

    - #### FilterTreeModel

          public FilterTreeModel(javax.swing.tree.TreeNode root)

  - ### Method Detail

    - #### initInstance

          public static FilterTreeModel initInstance(ProgramFilter[] filterArr)

    - #### initInstance

          public static FilterTreeModel initInstance(java.io.ObjectInputStream in)
                                              throws java.io.IOException,
                                                     java.lang.ClassNotFoundException

      Throws:
        `java.io.IOException`
        `java.lang.ClassNotFoundException`

    - #### storeData

          public void storeData(java.io.ObjectOutputStream out)
                         throws java.io.IOException

      Saves the data of this tree into the given stream.
      Parameters:
        `out` - The stream to write the data to.
      Throws:
        `java.io.IOException` - Thrown if something went wrong

    - #### getInstance

          public static FilterTreeModel getInstance()

    - #### isLeaf

          public boolean isLeaf(java.lang.Object nodeObject)

      Specified by:
        `isLeaf` in interface `javax.swing.tree.TreeModel`
      Overrides:
        `isLeaf` in class `javax.swing.tree.DefaultTreeModel`

    - #### deleteFilter

          public void deleteFilter(ProgramFilter filter)

    - #### addFilter

          public void addFilter(ProgramFilter filter)

      Adds a filter to this tree at the root node.
      Parameters:
        `filter` - The filter to add.

    - #### addFilter

          public FilterNode addFilter(ProgramFilter filter,
                             FilterNode parent,
                             FilterTree tree)

      Adds a filter to this tree at the given target node.
      Parameters:
        `filter` - The filter to add.
        `parent` - The parent node to add the filter to or `null` if the root node should be used.
      Returns:
        the newly created node for the filter

    - #### addDirectory

          public FilterNode addDirectory(java.lang.String name,
                                FilterNode parent)

      Adds a filter to this tree at the given target node.
      Parameters:
        `filter` - The filter to add.
        `parent` - The parent node to add the filter to or `null` if the root node should be used.
      Returns:
        the newly created node for the filter

    - #### getAllFilters

          public ProgramFilter[] getAllFilters()

    - #### updateAvailableChannels

          public void updateAvailableChannels(Channel[] channels,
                                     java.lang.String directoryName,
                                     java.lang.String aboveDirectory)

    - #### addPluginsProgramFilters

          public void addPluginsProgramFilters()

    - #### getDirectoryNode

          public FilterNode getDirectoryNode(java.lang.String name,
                                    FilterNode parent)

    - #### createMenu

          public void createMenu(javax.swing.JMenu menu,
                        ProgramFilter curFilter)

    - #### reload

          public void reload(FilterTree tree,
                    javax.swing.tree.TreeNode node)

    - #### fireFilterAdded

          void fireFilterAdded(ProgramFilter filter)

    - #### fireFilterRemoved

          void fireFilterRemoved(ProgramFilter filter)

    - #### fireFilterTouched

          void fireFilterTouched(ProgramFilter filter)

    - #### fireFilterDefaultChanged

          void fireFilterDefaultChanged(ProgramFilter filter)

    - #### registerFilterChangeListener

          public void registerFilterChangeListener(FilterChangeListener listener)

      Deprecated. since 3.3.4 use `registerFilterChangeListener(FilterChangeListenerV2)` instead

    - #### unregisterFilterChangeListener

          public void unregisterFilterChangeListener(FilterChangeListener listener)

      Deprecated. since 3.3.4 use `unregisterFilterChangeListener(FilterChangeListenerV2)` instead

    - #### registerFilterChangeListener

          public void registerFilterChangeListener(FilterChangeListenerV2 listener)

    - #### unregisterFilterChangeListener

          public void unregisterFilterChangeListener(FilterChangeListenerV2 listener)

    - #### sort

          public void sort(FilterNode node,
                  java.util.Comparator<FilterNode> comp,
                  java.lang.String title)

      Sorts the path from the given node to all leafs alphabetically.
      Parameters:
        `node` - The node to sort from.
        `comp` - Comparator for sorting
        `title` - Title of confirmation message dialog

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