public class FavoriteNode extends DefaultMutableTreeNode implements Comparable<FavoriteNode>
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
Modifier | Constructor and Description |
---|---|
|
FavoriteNode(Object userObject)
Creates an instance of this class with
the given Object as userObject of this node.
|
protected |
FavoriteNode(ObjectInputStream in,
int version)
Reads the node from an ObjectInputStream.
|
Modifier and Type | Method and Description |
---|---|
FavoriteNode |
add(Favorite fav)
Add a favorite to this node if this is a directory node.
|
int |
compareTo(FavoriteNode other) |
boolean |
containsFavorite()
Gets if this node contains a favorite.
|
boolean |
equals(Object o) |
Program[] |
getAllPrograms(boolean onlyNotExpiredPrograms)
Gets all programs contained in this node and all children of it.
|
Favorite |
getFavorite()
Gets the favorite contained by this node if there is one.
|
boolean |
isDirectoryNode()
Gets if this node is a directory node.
|
protected void |
setWasExpanded(boolean expanded) |
protected void |
store(ObjectOutputStream out) |
String |
toString() |
protected boolean |
wasExpanded() |
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
public FavoriteNode(Object userObject)
userObject
- The user object for this node.protected FavoriteNode(ObjectInputStream in, int version) throws IOException, ClassNotFoundException
in
- The ObjectInputStream to read from.version
- The version of the data file.IOException
- Thrown if something went wrong.ClassNotFoundException
- Thrown if something went wrong.public String toString()
toString
in class DefaultMutableTreeNode
public boolean containsFavorite()
True
if this node contains a favorite, false
otherwise.public boolean isDirectoryNode()
True
if this node is a directory node, false
otherwise.public Favorite getFavorite()
null
if
there is no favorite.protected boolean wasExpanded()
protected void setWasExpanded(boolean expanded)
public FavoriteNode add(Favorite fav)
fav
- The favorite to add.protected void store(ObjectOutputStream out) throws IOException
IOException
public int compareTo(FavoriteNode other)
compareTo
in interface Comparable<FavoriteNode>
public Program[] getAllPrograms(boolean onlyNotExpiredPrograms)
onlyNotExpiredPrograms
- true
if only not expired
programs should be returned, false
otherwise.TV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)