com.borland.primetime.editor
Class SearchOptions

java.lang.Object
  |
  +--com.borland.primetime.editor.SearchOptions

public class SearchOptions
extends java.lang.Object

This object stores search options and is passed to the various SearchManager methods.


Field Summary
 boolean caseSensitive
           
 RegularExpression[] filenameFilters
           
 boolean forwardSearch
           
 boolean fromCursor
           
 boolean globalSearch
           
 boolean promptReplace
           
 boolean recurseDirectories
           
 boolean regExp
           
 java.lang.String replaceText
           
 java.lang.String searchText
           
 
Constructor Summary
SearchOptions()
          Construct a new SearchOptions object with default settings.
SearchOptions(SearchOptions opts)
          Construct a new SearchOptions object using settings from another SearchOptions object.
 
Method Summary
 RegularExpression[] getFilenameFilters()
          Get the RegularExpression array to use to filter filenames during a path search.
 java.lang.String getReplaceText()
          Get the most recent replace text.
 java.lang.String getSearchText()
          Get the most recent search text.
 boolean isCaseSensitive()
          Get the case sensistive setting.
 boolean isForwardSearch()
          Get the forward search setting.
 boolean isFromCursor()
          Get the origin from cursor setting.
 boolean isGlobalSearch()
          Get the global search setting.
 boolean isPromptReplace()
          Get the prompt on replace setting.
 boolean isRecurseDirectories()
          Get the recurse directories setting.
 boolean isRegExp()
          Get the regular expressions setting.
 void setCaseSensitive(boolean b)
          Set the case sensitive setting.
 void setFilenameFilters(RegularExpression[] filters)
          Set the RegularExpression to use to filter filenames during a path search.
 void setForwardSearch(boolean b)
          Set the forward search setting.
 void setFromCursor(boolean b)
          Set the origin from cursor setting.
 void setGlobalSearch(boolean b)
          Set the global search setting.
 void setPromptReplace(boolean b)
          Set the prompt on replace setting.
 void setRecurseDirectories(boolean b)
          Set the recurse directories setting.
 void setRegExp(boolean b)
          Set the regular expressions setting.
 void setReplaceText(java.lang.String text)
          Set the most recent replace text.
 void setSearchText(java.lang.String text)
          Set the most recent search text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

searchText

public java.lang.String searchText

replaceText

public java.lang.String replaceText

caseSensitive

public boolean caseSensitive

regExp

public boolean regExp

forwardSearch

public boolean forwardSearch

globalSearch

public boolean globalSearch

fromCursor

public boolean fromCursor

promptReplace

public boolean promptReplace

recurseDirectories

public boolean recurseDirectories

filenameFilters

public RegularExpression[] filenameFilters
Constructor Detail

SearchOptions

public SearchOptions()
Construct a new SearchOptions object with default settings.

SearchOptions

public SearchOptions(SearchOptions opts)
Construct a new SearchOptions object using settings from another SearchOptions object.
Parameters:
opts - The SearchOptions object to use to initialize this one.
Method Detail

getSearchText

public java.lang.String getSearchText()
Get the most recent search text.
Returns:
The string most recently searched for.

setSearchText

public void setSearchText(java.lang.String text)
Set the most recent search text.
Parameters:
text - The most recent search text.

getReplaceText

public java.lang.String getReplaceText()
Get the most recent replace text.
Returns:
The string most recently used as the replacement string.

setReplaceText

public void setReplaceText(java.lang.String text)
Set the most recent replace text.
Parameters:
text - The most recent text used as a replacement string.

isCaseSensitive

public boolean isCaseSensitive()
Get the case sensistive setting.
Returns:
True if the most recent search was case sensitive.

setCaseSensitive

public void setCaseSensitive(boolean b)
Set the case sensitive setting.
Parameters:
b - The new case sensitive setting.

isRegExp

public boolean isRegExp()
Get the regular expressions setting.
Returns:
True if the most recent search used regular expressions.

setRegExp

public void setRegExp(boolean b)
Set the regular expressions setting.
Parameters:
b - The new regular expressions setting.

isForwardSearch

public boolean isForwardSearch()
Get the forward search setting.
Returns:
True if the most recent search was forward.

setForwardSearch

public void setForwardSearch(boolean b)
Set the forward search setting.
Parameters:
b - The new foward search setting. True to search forward, false to search backwards.

isGlobalSearch

public boolean isGlobalSearch()
Get the global search setting.
Returns:
True if the most recent search was global in scope (vs. only the selected text).

setGlobalSearch

public void setGlobalSearch(boolean b)
Set the global search setting.
Parameters:
b - The new global search setting. True to search all of the text, false to search only the selected text.

isFromCursor

public boolean isFromCursor()
Get the origin from cursor setting.
Returns:
True if the most recent search was from the cursor position (vs. from the start or end of the file).

setFromCursor

public void setFromCursor(boolean b)
Set the origin from cursor setting.
Parameters:
b - The new origin from cursor setting. True to search from the cusor position, false to search from the top (or bottom) of the file.

isPromptReplace

public boolean isPromptReplace()
Get the prompt on replace setting.
Returns:
True if the most recent search was from the cursor position (vs. from the start or end of the file).

setPromptReplace

public void setPromptReplace(boolean b)
Set the prompt on replace setting.
Parameters:
b - The new prompt on replace setting. True to prompt before a replace operation is performed

isRecurseDirectories

public boolean isRecurseDirectories()
Get the recurse directories setting.
Returns:
True if a path search using this set of options should recursively search subdirectories.

setRecurseDirectories

public void setRecurseDirectories(boolean b)
Set the recurse directories setting.
Parameters:
b - True if a path search using this set of options should recursively search subdirectories.

getFilenameFilters

public RegularExpression[] getFilenameFilters()
Get the RegularExpression array to use to filter filenames during a path search.
Returns:
An array of RegularExpression objects used to filter filenames during a path search.

setFilenameFilters

public void setFilenameFilters(RegularExpression[] filters)
Set the RegularExpression to use to filter filenames during a path search.
Parameters:
filter - An array of RegularExpression objects to use to filter filenames during a path search.