com.foxconn.ebook.reader.engine.model
接口 IBookSearchCursor

所有已知实现类:
BookSearchInfo

public interface IBookSearchCursor

搜索操作接口.

Example:

IBookSearchCursor bookSearchOps = book.getBookSearchCursor();

// 設置搜索關鍵字

bookSearchOps.setSearchKeyword(keyword);

// 進入搜索模式

mIEREngine.getAction().enterSearchMode();

// 搜索下一個結果

mIEREngine.getAction().searchGoNext();

// 搜索上一個結果

mIEREngine.getAction().searchGoPrevious();


方法摘要
 void addResults(BookSearchInfo.BookSearchResult[] results)
          添加搜索結果.
 BookSearchInfo.BookSearchResult getNextResult()
          獲取下一個搜索結果.
 BookSearchInfo.BookSearchResult getPreResult()
          獲取上一個搜索結果.
 java.util.List<BookSearchInfo.BookSearchResult> getResults()
          獲取搜索結果列表.
 java.util.List<java.lang.String> getSeachHistory()
          獲取搜索歷史列表.
 java.lang.String getSearchKeyword()
          獲取搜索關鍵字.
 boolean hasResults()
          檢查是否有搜索結果.
 void moveCursorToEnd()
          移動當前的搜索結果光標到搜索結果的末尾.
 void resetResults()
          重置搜索結果.
 void setSearchKeyword(java.lang.String key)
          設置搜索關鍵字.
 

方法详细信息

setSearchKeyword

void setSearchKeyword(java.lang.String key)
設置搜索關鍵字.

参数:
key - 搜索關鍵字

getSearchKeyword

java.lang.String getSearchKeyword()
獲取搜索關鍵字.

返回:
搜索關鍵字

addResults

void addResults(BookSearchInfo.BookSearchResult[] results)
添加搜索結果.

参数:
results - 搜索結果列表.

getResults

java.util.List<BookSearchInfo.BookSearchResult> getResults()
獲取搜索結果列表.

返回:
搜索結果列表

getSeachHistory

java.util.List<java.lang.String> getSeachHistory()
獲取搜索歷史列表.

返回:
索歷史列表, List類型

resetResults

void resetResults()
重置搜索結果.


hasResults

boolean hasResults()
檢查是否有搜索結果.

返回:
true, 結果不為空. false, 搜索為空.

getNextResult

BookSearchInfo.BookSearchResult getNextResult()
獲取下一個搜索結果.

返回:
下一個搜索結果

getPreResult

BookSearchInfo.BookSearchResult getPreResult()
獲取上一個搜索結果.

返回:
上一個搜索結果

moveCursorToEnd

void moveCursorToEnd()
移動當前的搜索結果光標到搜索結果的末尾.

由于PDF書的搜索模式不是一次性搜索出所有結果,而是采用分段式,因此調用該方法後,

再調用 IAction.searchGoNext 方法會繼續搜索出更多結果.

其他格式書籍暫時無需考慮該方法.