devplugin

## Class PluginTreeNode

- java.lang.Object
- - devplugin.PluginTreeNode

- All Implemented Interfaces:
    java.lang.Comparable<PluginTreeNode>

      public class PluginTreeNode
      extends java.lang.Object
      implements java.lang.Comparable<PluginTreeNode>

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

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PluginTreeNode.RemovedProgramsHandler`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PluginTreeNode(boolean handleTvDataUpdate, Plugin plugin)` Creates a new root PluginTreeNode
    `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(Plugin plugin)` creates a plugin root node WITHOUT marker
    `PluginTreeNode(ProgramItem item)` Creates a new Node containing a program item.
    `PluginTreeNode(java.lang.String title)` Creates a new PluginTreeNode object with a specified title

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(PluginTreeNode node)`
    `void` | `addAction(javax.swing.Action action)`
    `void` | `addActionMenu(ActionMenu menu)` Adds a an action menu to this node
    `PluginTreeNode` | `addNode(java.lang.String title)`
    `void` | `addNodeListener(PluginTreeListener listener)`
    `PluginTreeNode` | `addProgram(Program program)` Add a single program as child to this tree node.
    `void` | `addPrograms(java.util.List<Program> listNew)` Add several program as children to this tree node.
    `PluginTreeNode` | `addProgramWithoutCheck(Program program)` Add a single program node as child to this tree node.
    `void` | `clear()`
    `int` | `compareTo(PluginTreeNode other)`
    `boolean` | `contains(Program prog)`
    `boolean` | `contains(Program prog, boolean recursive)`
    `ActionMenu[]` | `getActionMenus()`
    `PluginTreeNode[]` | `getChildren()`
    `Node` | `getMutableTreeNode()`
    `ProgramItem[]` | `getProgramItems()`
    `Program[]` | `getPrograms()`
    `java.lang.Object` | `getUserObject()`
    `boolean` | `isEmpty()`
    `boolean` | `isLeaf()`
    `void` | `load(java.io.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(java.io.ObjectOutputStream out)`
    `java.lang.String` | `toString()`
    `void` | `update()` Refreshes the tree in the user interface.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PluginTreeNode

          public PluginTreeNode(java.lang.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(Plugin plugin)

      creates a plugin root node WITHOUT marker
      Parameters:
        `plugin` -
      Since:
        3.0

    - #### PluginTreeNode

          public PluginTreeNode(boolean handleTvDataUpdate,
                        Plugin plugin)

      Creates a new root PluginTreeNode
      Parameters:
        `plugin` -
        `handleTvDataUpdate` - specifies, if the `PluginTreeListener` should get called on TV listings updates
      Since:
        3.0

    - #### 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(javax.swing.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 java.lang.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()

      Refreshes the tree in the user interface. Call this method after you have added/removed/changed nodes of the tree or its children. Otherwise those changes will not get visible.

    - #### addPrograms

          public void addPrograms(java.util.List<Program> listNew)

      Add several program as children to this tree node. If the programs are already contained in this sub tree, it is not added again.
      After you have finished adding all programs, you need to call `update()` to refresh the UI.
      Parameters:
        `listNew` - list of new programs

    - #### addProgram

          public PluginTreeNode addProgram(Program program)

      Add a single program as child to this tree node. If the program is already contained in this sub tree, it is not added again.
      After you have finished adding all programs, you need to call `update()` to refresh the UI.
      Parameters:
        `program` -
      Returns:
        the tree node containing the program

    - #### addProgramWithoutCheck

          public PluginTreeNode addProgramWithoutCheck(Program program)

      Add a single program node as child 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!
      After you have finished adding all programs, you need to call `update()` to refresh the UI.
      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(java.lang.String title)

    - #### getProgramItems

          public ProgramItem[] getProgramItems()

    - #### getPrograms

          public Program[] getPrograms()

    - #### store

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

      Throws:
        `java.io.IOException`

    - #### load

          public void load(java.io.ObjectInputStream in)
                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### 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 java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getChildren

          public PluginTreeNode[] getChildren()

      Returns:
        copy of child node collection
      Since:
        3.0

    - #### compareTo

          public int compareTo(PluginTreeNode other)

      Specified by:
        `compareTo` in interface `java.lang.Comparable<PluginTreeNode>`

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