TV-Browser 3.3.3 API

tvbrowser.ui.filter.dlgs
Class FilterNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by tvbrowser.ui.filter.dlgs.FilterNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class FilterNode
extends javax.swing.tree.DefaultMutableTreeNode

The node for the filter tree.

Since:
3.0.2
Author:
René Mach
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
  FilterNode(java.lang.Object userObject)
          Creates an instance of this class with the given Object as userObject of this node.
protected FilterNode(java.io.ObjectInputStream in, int version)
          Reads the node from an ObjectInputStream.
 
Method Summary
 FilterNode addDirectory(java.lang.String value)
           
 FilterNode addFilter(ProgramFilter filter)
          Adds a filter to this node if this is a directory node.
 boolean contains(java.lang.Object o)
           
 boolean containsFilter()
          Gets if this node contains a filter.
 boolean containsSeparator()
          Gets if this node contains a separator.
 void createMenu(javax.swing.JMenu menu, ProgramFilter curFilter)
           
 boolean equals(java.lang.Object o)
           
 ProgramFilter[] getAllFilters()
          Gets all filters contained in this node and all children of it.
 ProgramFilter getFilter()
          Gets the filter contained by this node if there is one.
 boolean isDeletingAllowed()
           
 boolean isDirectoryNode()
          Gets if this node is a directory node.
 boolean isValidFilter()
           
protected  void setWasExpanded(boolean expanded)
           
 void store(java.io.ObjectOutputStream out)
           
 boolean testAndSetToPluginsProgramFilter(PluginsProgramFilter filter)
           
 java.lang.String toString()
           
protected  boolean wasExpanded()
           
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilterNode

public FilterNode(java.lang.Object userObject)
Creates an instance of this class with the given Object as userObject of this node.

Parameters:
userObject - The user object for this node.

FilterNode

protected FilterNode(java.io.ObjectInputStream in,
                     int version)
              throws java.io.IOException,
                     java.lang.ClassNotFoundException
Reads the node from an ObjectInputStream.

Parameters:
in - The ObjectInputStream to read from.
version - The version of the data file.
Throws:
java.io.IOException - Thrown if something went wrong.
java.lang.ClassNotFoundException - Thrown if something went wrong.
Method Detail

isValidFilter

public boolean isValidFilter()

store

public void store(java.io.ObjectOutputStream out)
           throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class javax.swing.tree.DefaultMutableTreeNode

containsSeparator

public boolean containsSeparator()
Gets if this node contains a separator.

Returns:
True if this node contains a separator, false otherwise.

containsFilter

public boolean containsFilter()
Gets if this node contains a filter.

Returns:
True if this node contains a filter, false otherwise.

isDirectoryNode

public boolean isDirectoryNode()
Gets if this node is a directory node.

Returns:
True if this node is a directory node, false otherwise.

getFilter

public ProgramFilter getFilter()
Gets the filter contained by this node if there is one.

Returns:
The filter contained by this node or null if there is no filter.

wasExpanded

protected boolean wasExpanded()

setWasExpanded

protected void setWasExpanded(boolean expanded)

addFilter

public FilterNode addFilter(ProgramFilter filter)
Adds a filter to this node if this is a directory node.

Parameters:
filter - The filter to add.
Returns:
The added filter node or null if no node was added.

addDirectory

public FilterNode addDirectory(java.lang.String value)

contains

public boolean contains(java.lang.Object o)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getAllFilters

public ProgramFilter[] getAllFilters()
Gets all filters contained in this node and all children of it.

Returns:
All filters contained in this node and all children of it.

isDeletingAllowed

public boolean isDeletingAllowed()

testAndSetToPluginsProgramFilter

public boolean testAndSetToPluginsProgramFilter(PluginsProgramFilter filter)

createMenu

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

TV-Browser 3.3.3 API

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