Top Fields Constructors Methods
org.apache.pdfbox.debugger.ui.textsearcher

pack-priv Class SearchEngine

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, javax.swing.text.BadLocationException, .Document, .Highlighter, .JTextComponent, org.apache.commons.logging.Log, .LogFactory

Author
Khyrul Bashar A class that search a word in the JTextComponent and if find highlights them.

Field Summary

Modifier and TypeField and Description
private final Document
private final Highlighter
private static final Log
private final Highlighter.HighlightPainter

Constructor Summary

AccessConstructor and Description
pack-priv
SearchEngine(JTextComponent
JTextComponent that is to be searched.
textComponent
,
Highlighter.HighlightPainter
Highlighter.HighlightPainter instance to paint the highlights.
painter
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public List<Highlighter.Highlight>

Returns:

ArrayList.
search
(String
String. Search word.
searchKey
,
boolean
boolean. If search is case sensitive.
isCaseSensitive
)

Search the word.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

documentback to summary
private final Document document
highlighterback to summary
private final Highlighter highlighter
LOGback to summary
private static final Log LOG
painterback to summary
private final Highlighter.HighlightPainter painter

Constructor Detail

SearchEngineback to summary
pack-priv SearchEngine(JTextComponent textComponent, Highlighter.HighlightPainter painter)

Constructor.

Parameters
textComponent:JTextComponent

JTextComponent that is to be searched.

painter:Highlighter.HighlightPainter

Highlighter.HighlightPainter instance to paint the highlights.

Method Detail

searchback to summary
public List<Highlighter.Highlight> search(String searchKey, boolean isCaseSensitive)

Search the word.

Parameters
searchKey:String

String. Search word.

isCaseSensitive:boolean

boolean. If search is case sensitive.

Returns:List<Highlighter.Highlight>

ArrayList.