站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

FinderFactory.NextWordFwdFinder (Editor Library) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.lib/1 1.14.0 3

org.netbeans.editor
Class FinderFactory.NextWordFwdFinder

java.lang.Object
  extended by org.netbeans.editor.FinderFactory.AbstractFinder
      extended by org.netbeans.editor.FinderFactory.GenericFwdFinder
          extended by org.netbeans.editor.FinderFactory.NextWordFwdFinder
All Implemented Interfaces:
Finder
Enclosing class:
FinderFactory

public static class FinderFactory.NextWordFwdFinder
extends FinderFactory.GenericFwdFinder

Next word forward finder


Field Summary
 
Fields inherited from class org.netbeans.editor.FinderFactory.AbstractFinder
found
 
Constructor Summary
FinderFactory.NextWordFwdFinder(BaseDocument doc, boolean stopOnEOL, boolean stopOnWhitespace)
           
 
Method Summary
 void reset()
          Reset the finder
protected  int scan(char ch, boolean lastChar)
          This function decides if it found a desired string or not.
 
Methods inherited from class org.netbeans.editor.FinderFactory.GenericFwdFinder
find
 
Methods inherited from class org.netbeans.editor.FinderFactory.AbstractFinder
isFound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FinderFactory.NextWordFwdFinder

public FinderFactory.NextWordFwdFinder(BaseDocument doc,
                                       boolean stopOnEOL,
                                       boolean stopOnWhitespace)
Method Detail

reset

public void reset()
Description copied from class: FinderFactory.AbstractFinder
Reset the finder

Specified by:
reset in interface Finder
Overrides:
reset in class FinderFactory.AbstractFinder

scan

protected int scan(char ch,
                   boolean lastChar)
Description copied from class: FinderFactory.GenericFwdFinder
This function decides if it found a desired string or not. The function receives currently searched character and flag if it's the last one that is searched or not.

Specified by:
scan in class FinderFactory.GenericFwdFinder
Returns:
if the function decides that it found a desired string it sets found = true and returns how many characters back the searched string begins in forward direction (0 stands for current character). For example if the function looks for word 'yes' and it gets 's' as parameter it sets found = true and returns -2. If the string is not yet found it returns how many characters it should go in forward direction (in this case it would usually be 1). The next searched character will be that one requested.

org.netbeans.modules.editor.lib/1 1.14.0 3

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.