|
TV-Browser 2.7.5 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.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. |
void |
addFavorite(Favorite fav,
FavoriteNode target)
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 String |
getFavoriteLabel(Favorite favorite,
Program program)
|
static 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(ObjectInputStream in,
int version)
|
boolean |
isContainedByOtherFavorites(Favorite favorite,
Program p)
Check if a program is marked by other Favorites to. |
boolean |
isLeaf(Object nodeObject)
|
void |
reload()
|
void |
reload(FavoriteTree tree,
TreeNode node)
|
void |
reload(TreeNode node)
|
void |
sort(FavoriteNode node,
boolean start,
Comparator<FavoriteNode> comp,
String title)
Sorts the path from the given node to all leafs alphabetically. |
void |
storeData(ObjectOutputStream out)
Saves the data of this tree into the given stream. |
void |
updatePluginTree(PluginTreeNode rootNode)
|
void |
updatePluginTree(PluginTreeNode node,
FavoriteNode parentFavorite)
|
| 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(ObjectInputStream in,
int version)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundExceptionpublic static FavoriteTreeModel getInstance()
public void reload(TreeNode node)
reload in class DefaultTreeModel
public void reload(FavoriteTree tree,
TreeNode node)
public void reload()
reload in class DefaultTreeModelpublic boolean isLeaf(Object nodeObject)
isLeaf in interface TreeModelisLeaf in class DefaultTreeModelpublic 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 void addFavorite(Favorite fav,
FavoriteNode target)
fav - The favorite to add.target - The target node to add the favorite to or
null if the root node should be used.
public static String getFavoriteLabel(Favorite favorite,
Program program)
public static String getFavoriteLabel(Favorite favorite,
Program p,
Channel currentChannel)
public void storeData(ObjectOutputStream out)
throws IOException
out - The stream to write the data to.
IOException - Thrown if something went wrong
public void updatePluginTree(PluginTreeNode node,
FavoriteNode parentFavorite)
public static int[] getProgramsCount(FavoriteNode node)
node - use this Node
public void sort(FavoriteNode node,
boolean start,
Comparator<FavoriteNode> comp,
String title)
node - The node to sort from.start - If this is called with the root sort node.comp - Comparator for sortingtitle - Title of confirmation message dialogpublic Favorite[] getFavoritesContainingReceiveTarget(ProgramReceiveTarget target)
target - The target to check.
public void updatePluginTree(PluginTreeNode rootNode)
public Favorite[] getFavoritesContainingProgram(Program program)
program - program to search for
|
TV-Browser 2.7.5 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||