com.icesoft.pdf.ri.util
Class SearchTextTask

java.lang.Object
  extended bycom.icesoft.pdf.ri.util.SearchTextTask

public class SearchTextTask
extends Object

This class is a utility for searching text in a PDF document. This is only a reference implementation; there is currently no support for regular expression and other advanced search features.

Since:
1.1

Constructor Summary
SearchTextTask(Document document, SearchPanel searchPanel, String pattern, ResourceBundle messageBundle)
          Creates a new instance of the SearchTextTask.
 
Method Summary
 int getCurrent()
          Find out how much has been done.
 String getFinalMessage()
          Gets the message that should be displayed when the task has completed.
 int getLengthOfTask()
          Find out how much work needs to be done.
 String getMessage()
          Returns the most recent dialog message, or null if there is no current dialog message.
 void go()
          Start the task, start searching the document for the pattern.
 boolean isCurrentlySearching()
           
 boolean isDone()
          Find out if the task has completed.
 void stop()
          Stop the task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchTextTask

public SearchTextTask(Document document,
                      SearchPanel searchPanel,
                      String pattern,
                      ResourceBundle messageBundle)
Creates a new instance of the SearchTextTask.

Parameters:
document - document that will be searched
searchPanel - GUI that shows search tools and results
pattern - string to search for in the document
Method Detail

go

public void go()
Start the task, start searching the document for the pattern.


getLengthOfTask

public int getLengthOfTask()
Find out how much work needs to be done.


getCurrent

public int getCurrent()
Find out how much has been done.


stop

public void stop()
Stop the task.


isDone

public boolean isDone()
Find out if the task has completed.


isCurrentlySearching

public boolean isCurrentlySearching()

getMessage

public String getMessage()
Returns the most recent dialog message, or null if there is no current dialog message.


getFinalMessage

public String getFinalMessage()
Gets the message that should be displayed when the task has completed.