~sword-devel/jsword/trunk

« back to all changes in this revision

Viewing changes to jsword/java/map/org/crosswire/jsword/map/view/BookVerseColor.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:
7
7
import org.crosswire.jsword.passage.NoSuchVerseException;
8
8
 
9
9
/**
10
 
* BookVerseColor gives a color to a selected books, leaving the
11
 
* others grey. 
12
 
13
 
* <table border='1' cellPadding='3' cellSpacing='0' width="100%">
14
 
* <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
15
 
* Distribution Licence:<br />
16
 
* Project B is free software; you can redistribute it
17
 
* and/or modify it under the terms of the GNU General Public License,
18
 
* version 2 as published by the Free Software Foundation.<br />
19
 
* This program is distributed in the hope that it will be useful,
20
 
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22
 
* General Public License for more details.<br />
23
 
* The License is available on the internet
24
 
* <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
25
 
* <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
26
 
* MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
27
 
* The copyright to this program is held by it's authors.
28
 
* </font></td></tr></table>
29
 
* @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
30
 
* @see <{docs.Licence}>
31
 
* @author Joe Walker
32
 
* @version D0.I0.T0
 
10
 * BookVerseColor gives a color to a selected books, leaving the
 
11
 * others grey. 
 
12
 * 
 
13
 * <p><table border='1' cellPadding='3' cellSpacing='0'>
 
14
 * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
 
15
 *
 
16
 * Distribution Licence:<br />
 
17
 * JSword is free software; you can redistribute it
 
18
 * and/or modify it under the terms of the GNU General Public License,
 
19
 * version 2 as published by the Free Software Foundation.<br />
 
20
 * This program is distributed in the hope that it will be useful,
 
21
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
22
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
23
 * General Public License for more details.<br />
 
24
 * The License is available on the internet
 
25
 * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, or by writing to:
 
26
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 
27
 * MA 02111-1307, USA<br />
 
28
 * The copyright to this program is held by it's authors.
 
29
 * </font></td></tr></table>
 
30
 * @see docs.Licence
 
31
 * @author Joe Walker [joe at eireneh dot com]
 
32
 * @version $Id$
33
33
*/
34
34
public class BookVerseColor implements VerseColor
35
35
{
36
36
    /**
37
 
    * Basic constructor
38
 
    */
 
37
     * Basic constructor
 
38
     */
39
39
    public BookVerseColor(int book)
40
40
    {
41
41
        this.book = book;
42
42
    }
43
43
 
44
44
    /**
45
 
    * Accessor for the currently highlighted book
46
 
    * @param book The new highlighted book
47
 
    */
 
45
     * Accessor for the currently highlighted book
 
46
     * @param book The new highlighted book
 
47
     */
48
48
    public void setBook(int book)
49
49
    {
50
50
        this.book = book;
51
51
    }
52
52
 
53
53
    /**
54
 
    * Accessor for the currently highlighted book
55
 
    * @return The current highlighted book
56
 
    */
 
54
     * Accessor for the currently highlighted book
 
55
     * @return The current highlighted book
 
56
     */
57
57
    public int getBook()
58
58
    {
59
59
        return book;
60
60
    }
61
61
 
62
62
    /**
63
 
    * What Color should we use to represent this verse
64
 
    * @param book The book number (Gen=1, Rev=66)
65
 
    * @param chapter The chapter number
66
 
    * @param verse The verse number
67
 
    * @return The Color for this verse
68
 
    */
 
63
     * What Color should we use to represent this verse
 
64
     * @param book The book number (Gen=1, Rev=66)
 
65
     * @param chapter The chapter number
 
66
     * @param verse The verse number
 
67
     * @return The Color for this verse
 
68
     */
69
69
    public Color getColor(int book, int chapter, int verse)
70
70
    {
71
71
        if (book != this.book)
79
79
    }
80
80
 
81
81
    /**
82
 
    * What Color would set off the Verses painted on it
83
 
    * @return An appropriate background color
84
 
    */
 
82
     * What Color would set off the Verses painted on it
 
83
     * @return An appropriate background color
 
84
     */
85
85
    public Color getBackground()
86
86
    {
87
87
        return Color.black;
88
88
    }
89
89
 
90
90
    /**
91
 
    * What Color should text be painted in
92
 
    * @return An appropriate font color
93
 
    */
 
91
     * What Color should text be painted in
 
92
     * @return An appropriate font color
 
93
     */
94
94
    public Color getForeground()
95
95
    {
96
96
        return Color.white;
97
97
    }
98
98
 
99
99
    /**
100
 
    * The name for display in a combo box
101
 
    */
 
100
     * The name for display in a combo box
 
101
     */
102
102
    public String toString()
103
103
    {
104
104
        try