~sword-devel/jsword/trunk

« back to all changes in this revision

Viewing changes to jsword/java/jsword/org/crosswire/jsword/control/search/BlurCommandWord.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:
5
5
import org.crosswire.jsword.passage.PassageUtil;
6
6
 
7
7
/**
8
 
* Alter the Passage by calling blur with a
9
 
* number grabbed from the next word in the search string.
10
 
*
11
 
* <table border='1' cellPadding='3' cellSpacing='0' width="100%">
12
 
* <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
13
 
* Distribution Licence:<br />
14
 
* Project B is free software; you can redistribute it
15
 
* and/or modify it under the terms of the GNU General Public License,
16
 
* version 2 as published by the Free Software Foundation.<br />
17
 
* This program is distributed in the hope that it will be useful,
18
 
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
 
* General Public License for more details.<br />
21
 
* The License is available on the internet
22
 
* <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
23
 
* <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
24
 
* MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
25
 
* The copyright to this program is held by it's authors.
26
 
* </font></td></tr></table>
27
 
* @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
28
 
* @see <{docs.Licence}>
29
 
* @author Joe Walker
30
 
*/
 
8
 * Alter the Passage by calling blur with a
 
9
 * number grabbed from the next word in the search string.
 
10
 * 
 
11
 * <p><table border='1' cellPadding='3' cellSpacing='0'>
 
12
 * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
 
13
 *
 
14
 * Distribution Licence:<br />
 
15
 * JSword is free software; you can redistribute it
 
16
 * and/or modify it under the terms of the GNU General Public License,
 
17
 * version 2 as published by the Free Software Foundation.<br />
 
18
 * This program is distributed in the hope that it will be useful,
 
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
21
 * General Public License for more details.<br />
 
22
 * The License is available on the internet
 
23
 * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, or by writing to:
 
24
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 
25
 * MA 02111-1307, USA<br />
 
26
 * The copyright to this program is held by it's authors.
 
27
 * </font></td></tr></table>
 
28
 * @see docs.Licence
 
29
 * @author Joe Walker [joe at eireneh dot com]
 
30
 * @version $Id$
 
31
 */
31
32
public class BlurCommandWord implements CommandWord
32
33
{
33
34
    /**
34
 
    * Alter the Passage by calling blur with a
35
 
    * number grabbed from the next word in the search string
36
 
    * @param engine The controller that can provide access to the search
37
 
    *               string or a default Bible.
38
 
    * @param ref The Passage to alter (if necessary)
39
 
    */
 
35
     * Alter the Passage by calling blur with a
 
36
     * number grabbed from the next word in the search string
 
37
     * @param engine The controller that can provide access to the search string or a default Bible.
 
38
     * @param ref The Passage to alter (if necessary)
 
39
     */
40
40
    public void updatePassage(Engine engine, Passage ref) throws SearchException
41
41
    {
42
 
        if (!engine.elements().hasMoreElements())
 
42
        if (!engine.iterator().hasNext())
43
43
            throw new SearchException("search_blur_blank");
44
44
 
45
 
        ParamWord param = (ParamWord) engine.elements().nextElement();
 
45
        ParamWord param = (ParamWord) engine.iterator().next();
46
46
        String word = param.getWord(engine);
47
47
 
48
48
        try