~sword-devel/jsword/trunk

« back to all changes in this revision

Viewing changes to jsword/java/jsword/org/crosswire/jsword/view/swing/passage/BookTreeNode.java

  • Committer: joe
  • Date: 2002-10-08 21:36:18 UTC
  • Revision ID: svn-v4:a88caf3b-7e0a-0410-8d0d-cecb45342206:trunk:80
big config and comment update

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
import org.crosswire.common.util.LogicError;
13
13
 
14
14
/**
15
 
* PassageTableModel.
16
 
*
17
 
* <table border='1' cellPadding='3' cellSpacing='0' width="100%">
18
 
* <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
19
 
* Distribution Licence:<br />
20
 
* Project B is free software; you can redistribute it
21
 
* and/or modify it under the terms of the GNU General Public License,
22
 
* version 2 as published by the Free Software Foundation.<br />
23
 
* This program is distributed in the hope that it will be useful,
24
 
* but WITHOUT ANY WARRANTY; without even the implied warranty of
25
 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26
 
* General Public License for more details.<br />
27
 
* The License is available on the internet
28
 
* <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
29
 
* <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
30
 
* MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
31
 
* The copyright to this program is held by it's authors.
32
 
* </font></td></tr></table>
33
 
* @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
34
 
* @see <{docs.Licence}>
35
 
* @author Joe Walker
36
 
*/
 
15
 * PassageTableModel.
 
16
 * 
 
17
 * <p><table border='1' cellPadding='3' cellSpacing='0'>
 
18
 * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
 
19
 *
 
20
 * Distribution Licence:<br />
 
21
 * JSword is free software; you can redistribute it
 
22
 * and/or modify it under the terms of the GNU General Public License,
 
23
 * version 2 as published by the Free Software Foundation.<br />
 
24
 * This program is distributed in the hope that it will be useful,
 
25
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
26
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
27
 * General Public License for more details.<br />
 
28
 * The License is available on the internet
 
29
 * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, or by writing to:
 
30
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 
31
 * MA 02111-1307, USA<br />
 
32
 * The copyright to this program is held by it's authors.
 
33
 * </font></td></tr></table>
 
34
 * @see docs.Licence
 
35
 * @author Joe Walker [joe at eireneh dot com]
 
36
 * @version $Id$
 
37
 */
37
38
public class BookTreeNode extends BibleTreeNode
38
39
{
39
40
    /**
40
 
    * This constructor is for when we are really a BookTreeNode
41
 
    */
 
41
     * This constructor is for when we are really a BookTreeNode
 
42
     */
42
43
    protected BookTreeNode(TreeNode parent, int book) throws NoSuchVerseException
43
44
    {
44
45
        this.parent = parent;
48
49
    }
49
50
 
50
51
    /**
51
 
    * This constructor is for when we are really a BookTreeNode
52
 
    */
 
52
     * This constructor is for when we are really a BookTreeNode
 
53
     */
53
54
    public void setPassage(Passage ref, boolean filter)
54
55
    {
55
56
        this.ref = ref;
87
88
    }
88
89
 
89
90
    /**
90
 
    * Returns the child <code>TreeNode</code> at index i
91
 
    */
 
91
     * Returns the child <code>TreeNode</code> at index i
 
92
     */
92
93
    public TreeNode getChildAt(int i)
93
94
    {
94
95
        try
108
109
    }
109
110
 
110
111
    /**
111
 
    * Returns the parent <code>TreeNode</code> of the receiver.
112
 
    */
 
112
     * Returns the parent <code>TreeNode</code> of the receiver.
 
113
     */
113
114
    public TreeNode getParent()
114
115
    {
115
116
        return parent;
116
117
    }
117
118
 
118
119
    /**
119
 
    * Returns the index of <code>node</code> in the receivers children.
120
 
    * If the receiver does not contain <code>node</code>, -1 will be
121
 
    * returned.
122
 
    */
 
120
     * Returns the index of <code>node</code> in the receivers children.
 
121
     * If the receiver does not contain <code>node</code>, -1 will be
 
122
     * returned.
 
123
     */
123
124
    public int getIndex(TreeNode node)
124
125
    {
125
126
        if (!(node instanceof ChapterTreeNode))
130
131
    }
131
132
 
132
133
    /**
133
 
    * How we appear in the Tree
134
 
    */
 
134
     * How we appear in the Tree
 
135
     */
135
136
    public String toString()
136
137
    {
137
138
        try
151
152
    }
152
153
 
153
154
    /**
154
 
    * The current book number (Genesis=1)
155
 
    */
 
155
     * The current book number (Genesis=1)
 
156
     */
156
157
    public int getBook()
157
158
    {
158
159
        return book;