|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.tree.DefaultTreeModel tvbrowser.extras.favoritesplugin.dlgs.FavoriteTreeModel
public class FavoriteTreeModel
The model for the favorite tree.
Field Summary |
---|
Fields inherited from class javax.swing.tree.DefaultTreeModel |
---|
asksAllowsChildren, listenerList, root |
Method Summary | |
---|---|
void |
addFavorite(Favorite fav)
Adds a favorite to this tree at the root node. |
FavoriteNode |
addFavorite(Favorite fav,
FavoriteNode parent)
Adds a favorite to this tree at the given target node. |
void |
deleteFavorite(Favorite favorite)
Deletes a favorite. |
Favorite[] |
getFavoriteArr()
Gets all favorites in an array. |
static java.lang.String |
getFavoriteLabel(Favorite favorite,
Program program)
|
static java.lang.String |
getFavoriteLabel(Favorite favorite,
Program p,
Channel currentChannel)
|
Favorite[] |
getFavoritesContainingProgram(Program program)
get an array of all favorites containing the given program |
Favorite[] |
getFavoritesContainingReceiveTarget(ProgramReceiveTarget target)
Gets the Favorites containing the given receive target in an array. |
static FavoriteTreeModel |
getInstance()
|
static int[] |
getProgramsCount(FavoriteNode node)
Calculates the number of programs contained in the children |
static FavoriteTreeModel |
initInstance(Favorite[] favoriteArr)
|
static FavoriteTreeModel |
initInstance(java.io.ObjectInputStream in,
int version)
|
boolean |
isContainedByOtherFavorites(Favorite favorite,
Program p)
Check if a program is marked by other Favorites to. |
boolean |
isInMultipleFavorites(Program program)
|
boolean |
isLeaf(java.lang.Object nodeObject)
|
void |
reload()
|
void |
reload(FavoriteTree tree,
javax.swing.tree.TreeNode node)
|
void |
reload(javax.swing.tree.TreeNode node)
|
void |
resetMultiplesCounter()
|
void |
reValidateChannelLimitations()
|
void |
sort(FavoriteNode node,
java.util.Comparator<FavoriteNode> 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 |
updatePluginTree(PluginTreeNode topicNode,
java.util.ArrayList<Program> allPrograms)
|
void |
updatePluginTree(PluginTreeNode node,
java.util.ArrayList<Program> allPrograms,
FavoriteNode parentFavorite)
|
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, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static FavoriteTreeModel initInstance(Favorite[] favoriteArr)
public static FavoriteTreeModel initInstance(java.io.ObjectInputStream in, int version) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public static FavoriteTreeModel getInstance()
public void reload(javax.swing.tree.TreeNode node)
reload
in class javax.swing.tree.DefaultTreeModel
public void reload(FavoriteTree tree, javax.swing.tree.TreeNode node)
public void reload()
reload
in class javax.swing.tree.DefaultTreeModel
public boolean isLeaf(java.lang.Object nodeObject)
isLeaf
in interface javax.swing.tree.TreeModel
isLeaf
in class javax.swing.tree.DefaultTreeModel
public Favorite[] getFavoriteArr()
public void deleteFavorite(Favorite favorite)
favorite
- The favorite to delete.public boolean isContainedByOtherFavorites(Favorite favorite, Program p)
favorite
- The Favorite that wants to check this.p
- The program to check.
public void addFavorite(Favorite fav)
fav
- The favorite to add.public FavoriteNode addFavorite(Favorite fav, FavoriteNode parent)
fav
- The favorite to add.parent
- The parent node to add the favorite to or null
if the
root node should be used.
public static java.lang.String getFavoriteLabel(Favorite favorite, Program program)
public static java.lang.String getFavoriteLabel(Favorite favorite, Program p, Channel currentChannel)
public void storeData(java.io.ObjectOutputStream out) throws java.io.IOException
out
- The stream to write the data to.
java.io.IOException
- Thrown if something went wrongpublic void updatePluginTree(PluginTreeNode node, java.util.ArrayList<Program> allPrograms, FavoriteNode parentFavorite)
public static int[] getProgramsCount(FavoriteNode node)
node
- use this Node
public void sort(FavoriteNode node, java.util.Comparator<FavoriteNode> comp, java.lang.String title)
node
- The node to sort from.comp
- Comparator for sortingtitle
- Title of confirmation message dialogpublic Favorite[] getFavoritesContainingReceiveTarget(ProgramReceiveTarget target)
target
- The target to check.
public void updatePluginTree(PluginTreeNode topicNode, java.util.ArrayList<Program> allPrograms)
public Favorite[] getFavoritesContainingProgram(Program program)
program
- program to search for
public boolean isInMultipleFavorites(Program program)
public void resetMultiplesCounter()
public void reValidateChannelLimitations()
|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |