Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.bibledesktop.passage
Class PassageTreeNode

    java.lang.Object
      org.crosswire.bibledesktop.passage.PassageTreeNode

All Implemented Interfaces:
  EventListener, TreeNode, PassageListener

    public class PassageTreeNode

extends Object
implements TreeNode, PassageListener

A PassageTreeNode extends TreeNode to Model a Passage.

Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors.

Version:
  $Id: PassageTreeNode.java,v 1.4 2004/09/08 19:57:58 dmsmith Exp $
Author:
  Joe Walker [joe at eireneh dot com]
See Also:
  `Licence`

Field Summary
`protected Passage` | `ref` The Passage to be displayed
`protected JTree` | `tree` The Passage to be displayed

Constructor Summary
`PassageTreeNode(Passage ref, JTree tree)` Simple ctor

Method Summary
`Enumeration` | `children()` Returns the children of the reciever as an Enumeration.
`boolean` | `getAllowsChildren()` Returns true if the receiver allows children.
`TreeNode` | `getChildAt(int index)` Returns the child `TreeNode` at index i
`int` | `getChildCount()` Returns the number of children `TreeNode`s the receiver contains.
`int` | `getIndex(TreeNode node)` Returns the index of `node` in the receivers children.
`TreeNode` | `getParent()` Returns the parent `TreeNode` of the receiver.
`boolean` | `isLeaf()` Returns true if the receiver is a leaf.
`String` | `toString()` Returns the children of the reciever as an Enumeration.
`void` | `versesAdded(PassageEvent ev)` Sent after stuff has been added to the Passage.
`void` | `versesChanged(PassageEvent ev)` Sent after verses have been symultaneously added and removed from the Passage.
`void` | `versesRemoved(PassageEvent ev)` Sent after stuff has been removed from the Passage.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### ref

    protected Passage ref

  The Passage to be displayed

### tree

    protected JTree tree

  The Passage to be displayed

Constructor Detail

### PassageTreeNode

    public PassageTreeNode(Passage ref,
                           JTree tree)

  Simple ctor

Method Detail

### getChildAt

    public TreeNode getChildAt(int index)

  Returns the child `TreeNode` at index i

  Specified by:
    `getChildAt` in interface `TreeNode`

### getChildCount

    public int getChildCount()

  Returns the number of children `TreeNode`s the receiver contains.

  Specified by:
    `getChildCount` in interface `TreeNode`

### getParent

    public TreeNode getParent()

  Returns the parent `TreeNode` of the receiver.

  Specified by:
    `getParent` in interface `TreeNode`

### getIndex

    public int getIndex(TreeNode node)

  Returns the index of `node` in the receivers children. If the receiver does not contain `node`, -1 will be returned.

  Specified by:
    `getIndex` in interface `TreeNode`

### getAllowsChildren

    public boolean getAllowsChildren()

  Returns true if the receiver allows children.

  Specified by:
    `getAllowsChildren` in interface `TreeNode`

### isLeaf

    public boolean isLeaf()

  Returns true if the receiver is a leaf.

  Specified by:
    `isLeaf` in interface `TreeNode`

### versesAdded

    public void versesAdded(PassageEvent ev)

  Sent after stuff has been added to the Passage. More info about what and where can be had from the Event

  Specified by:
    `versesAdded` in interface `PassageListener`
  Parameters:
    `ev` - a PassageEvent encapuslating the event information

### versesRemoved

    public void versesRemoved(PassageEvent ev)

  Sent after stuff has been removed from the Passage. More info about what and where can be had from the Event

  Specified by:
    `versesRemoved` in interface `PassageListener`
  Parameters:
    `ev` - a PassageEvent encapuslating the event information

### versesChanged

    public void versesChanged(PassageEvent ev)

  Sent after verses have been symultaneously added and removed from the Passage. More info about what and where can be had from the Event

  Specified by:
    `versesChanged` in interface `PassageListener`
  Parameters:
    `ev` - a PassageEvent encapuslating the event information

### children

    public Enumeration children()

  Returns the children of the reciever as an Enumeration.

  Specified by:
    `children` in interface `TreeNode`

### toString

    public String toString()

  Returns the children of the reciever as an Enumeration.

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ? 2003-2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD