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

ExtSyntaxSupport.BracketFinder (Editor Library) - NetBeans API Javadoc (Current Development Version)

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

org.netbeans.editor.ext
Class ExtSyntaxSupport.BracketFinder

java.lang.Object
  extended by org.netbeans.editor.FinderFactory.AbstractFinder
      extended by org.netbeans.editor.FinderFactory.GenericFinder
          extended by org.netbeans.editor.ext.ExtSyntaxSupport.BracketFinder
All Implemented Interfaces:
Finder
Enclosing class:
ExtSyntaxSupport

public class ExtSyntaxSupport.BracketFinder
extends FinderFactory.GenericFinder

Finder for the matching bracket. It gets the original bracket char and searches for the appropriate matching bracket character.


Field Summary
protected  char bracketChar
          Original bracket char
protected  char matchChar
          Matching bracket char
protected  int moveCount
          Will it be a forward finder +1 or backward finder -1 or 0 when the given character is not bracket character.
 
Fields inherited from class org.netbeans.editor.FinderFactory.GenericFinder
forward
 
Fields inherited from class org.netbeans.editor.FinderFactory.AbstractFinder
found
 
Constructor Summary
ExtSyntaxSupport.BracketFinder(char bracketChar)
           
 
Method Summary
protected  int scan(char ch, boolean lastChar)
          The method that gets the actual character and whether that character is the last in the search.
protected  boolean updateStatus()
          Check whether the bracketChar really contains the bracket character.
 
Methods inherited from class org.netbeans.editor.FinderFactory.GenericFinder
find, isForward
 
Methods inherited from class org.netbeans.editor.FinderFactory.AbstractFinder
isFound, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bracketChar

protected char bracketChar
Original bracket char


matchChar

protected char matchChar
Matching bracket char


moveCount

protected int moveCount
Will it be a forward finder +1 or backward finder -1 or 0 when the given character is not bracket character.

Constructor Detail

ExtSyntaxSupport.BracketFinder

public ExtSyntaxSupport.BracketFinder(char bracketChar)
Parameters:
bracketChar - bracket char
Method Detail

updateStatus

protected boolean updateStatus()
Check whether the bracketChar really contains the bracket character. If so assign the matchChar and moveCount variables.


scan

protected int scan(char ch,
                   boolean lastChar)
Description copied from class: FinderFactory.GenericFinder
The method that gets the actual character and whether that character is the last in the search. It can generally set the found flag to true to signal the successive search or it can return positive number to go forward or negative number to go back.

Specified by:
scan in class FinderFactory.GenericFinder

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.