TV-Browser 2.7.5 API

devplugin
Class PluginTreeNode

java.lang.Object
  extended by devplugin.PluginTreeNode

public class PluginTreeNode
extends Object

The PluginTreeNode class represents a single node of the plugin tree view.


Nested Class Summary
static class PluginTreeNode.RemovedProgramsHandler
           
 
Constructor Summary
PluginTreeNode(Marker marker)
          Creates a new root PluginTreeNode On TV listings updates, the PluginTreeListener gets informed.
PluginTreeNode(Marker marker, boolean handleTvDataUpdate)
          Creates a new root PluginTreeNode
PluginTreeNode(ProgramItem item)
          Creates a new Node containing a program item.
PluginTreeNode(String title)
          Creates a new PluginTreeNode object with a specified title
 
Method Summary
 void add(PluginTreeNode node)
           
 void addAction(Action action)
           
 void addActionMenu(ActionMenu menu)
          Adds a an action menu to this node
 PluginTreeNode addNode(String title)
           
 void addNodeListener(PluginTreeListener listener)
           
 PluginTreeNode addProgram(Program program)
          add a single program to this tree node.
 void addPrograms(List<Program> listNew)
           
 PluginTreeNode addProgramWithoutCheck(Program program)
          add a single program node to this tree node.
 void clear()
           
 boolean contains(Program prog)
           
 boolean contains(Program prog, boolean recursive)
           
 ActionMenu[] getActionMenus()
           
 Node getMutableTreeNode()
           
 ProgramItem[] getProgramItems()
           
 Program[] getPrograms()
           
 Object getUserObject()
           
 boolean isEmpty()
           
 boolean isLeaf()
           
 void load(ObjectInputStream in)
           
 void removeAllActions()
           
 void removeAllChildren()
           
 void removeAllNodeListeners()
           
 boolean removeNodeListener(PluginTreeListener listener)
           
 void removeProgram(Program program)
           
 void removeProgram(ProgramItem item)
           
 void setGroupingByDateEnabled(boolean enable)
          Enables/Disables the 'grouping by date'-feature.
 void setGroupingByWeekEnabled(boolean enable)
          Enables/Disables 'grouping by week' for nodes showing programs by date.
 void setNodeFormatter(NodeFormatter formatter)
          Sets the formatter for this node and all of the child nodes.
 int size()
          Get the number of child nodes.
 void store(ObjectOutputStream out)
           
 String toString()
           
 void update()
          Refreshs the tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PluginTreeNode

public PluginTreeNode(String title)
Creates a new PluginTreeNode object with a specified title

Parameters:
title -

PluginTreeNode

public PluginTreeNode(Marker marker)
Creates a new root PluginTreeNode On TV listings updates, the PluginTreeListener gets informed.

Parameters:
marker -

PluginTreeNode

public PluginTreeNode(Marker marker,
                      boolean handleTvDataUpdate)
Creates a new root PluginTreeNode

Parameters:
marker -
handleTvDataUpdate - specifies, if the PluginTreeListener should get called on TV listings updates

PluginTreeNode

public PluginTreeNode(ProgramItem item)
Creates a new Node containing a program item.

Parameters:
item -
Method Detail

addNodeListener

public void addNodeListener(PluginTreeListener listener)

removeNodeListener

public boolean removeNodeListener(PluginTreeListener listener)

removeAllNodeListeners

public void removeAllNodeListeners()

getMutableTreeNode

public Node getMutableTreeNode()

addActionMenu

public void addActionMenu(ActionMenu menu)
Adds a an action menu to this node

Parameters:
menu -

removeAllActions

public void removeAllActions()

addAction

public void addAction(Action action)

getActionMenus

public ActionMenu[] getActionMenus()

setNodeFormatter

public void setNodeFormatter(NodeFormatter formatter)
Sets the formatter for this node and all of the child nodes.

Parameters:
formatter - the formatter

setGroupingByDateEnabled

public void setGroupingByDateEnabled(boolean enable)
Enables/Disables the 'grouping by date'-feature. Default is 'enabled'

Parameters:
enable -

setGroupingByWeekEnabled

public void setGroupingByWeekEnabled(boolean enable)
Enables/Disables 'grouping by week' for nodes showing programs by date. Only evaluated if "grouping by date" is enabled. Default is 'disabled'

Parameters:
enable -
See Also:
setGroupingByDateEnabled(boolean)

getUserObject

public Object getUserObject()

removeAllChildren

public void removeAllChildren()

add

public void add(PluginTreeNode node)

contains

public boolean contains(Program prog,
                        boolean recursive)

contains

public boolean contains(Program prog)

update

public void update()
Refreshs the tree. Call this method after you have added/removed/changed nodes of the (sub-)tree


addPrograms

public void addPrograms(List<Program> listNew)

addProgram

public PluginTreeNode addProgram(Program program)
add a single program to this tree node. If the program is already contained in this sub tree, it is not added again.

Parameters:
program -
Returns:
the tree node containing the program

addProgramWithoutCheck

public PluginTreeNode addProgramWithoutCheck(Program program)
add a single program node to this tree node. It is not checked if the program is already contained in this sub tree, so you may only use this method with newly created tree nodes!

Parameters:
program -
Returns:
the tree node containing the program

removeProgram

public void removeProgram(ProgramItem item)

removeProgram

public void removeProgram(Program program)

addNode

public PluginTreeNode addNode(String title)

getProgramItems

public ProgramItem[] getProgramItems()

getPrograms

public Program[] getPrograms()

store

public void store(ObjectOutputStream out)
           throws IOException
Throws:
IOException

load

public void load(ObjectInputStream in)
          throws IOException,
                 ClassNotFoundException
Throws:
IOException
ClassNotFoundException

size

public int size()
Get the number of child nodes.

Returns:
number of child nodes

clear

public void clear()

isEmpty

public boolean isEmpty()

isLeaf

public boolean isLeaf()

toString

public String toString()
Overrides:
toString in class Object

TV-Browser 2.7.5 API

TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)