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

所有已知实现类:
Book

public interface IBookChapterCursor

章節處理接口

Example:

void loadChapters() {

Book book = getEasyViewer().getBook();

IBookChapterCursor bcOps = book.getBookChapterCursor();

// 獲取章節列表

ArrayList chapterList = bcOps.getChapterList();

// 填充listView

ArrayAdapter adapter = new ArrayAdapter(getContext(),

android.R.layout.simple_list_item_1);

for (Chapter chapter : list) {

adapter.add(chapter.title);

}

mTopicListView.setAdapter(adapter);

}


方法摘要
 boolean chapterIsEmpty()
          章節列表是否為空.
 boolean chapterIsLoad()
          章節是否已經加載.
 int getChapterIndexByTitle(java.lang.String title)
          根据目录标题获取目录的序号.
 java.util.List<ChapterTreeInfo.Chapter> getChapterList()
          獲取章節對象的列表.
 int[] getChapterPageNums()
          获取每个目录标题对应的页码.
 java.lang.String[] getChapterTitles()
          获取目录标题列表.
 int getCurChapterIndex()
          获取当前目录的序号.
 int getMaxChapterNum()
          获取最大的目录序号.
 int getNextChapterIndex(int pageIndex)
          根据页码序号获取后一章节的序号.
 int getPageIndexByChapterIndex(int index)
          獲取對應章節序號的頁碼.
 int getPreviousChapterIndex(int pageIndex)
          根据页码序号获取前一章节的序号.
 boolean hasNextChapter()
          检查是否存在下一章节.
 boolean hasPreviousChapter()
          检查是否存在前一章节.
 

方法详细信息

chapterIsLoad

boolean chapterIsLoad()
章節是否已經加載.

返回:
true, 已加載. false, 未加載.

chapterIsEmpty

boolean chapterIsEmpty()
章節列表是否為空.

返回:
true, 列表為空. false, 列表非空.

getChapterList

java.util.List<ChapterTreeInfo.Chapter> getChapterList()
獲取章節對象的列表.

返回:
章節對象列表

getPageIndexByChapterIndex

int getPageIndexByChapterIndex(int index)
獲取對應章節序號的頁碼.

参数:
index - 章節序號
返回:
頁碼序號

getNextChapterIndex

int getNextChapterIndex(int pageIndex)
根据页码序号获取后一章节的序号.

参数:
pageIndex - 页码序号
返回:
后一章节的序号

getPreviousChapterIndex

int getPreviousChapterIndex(int pageIndex)
根据页码序号获取前一章节的序号.

参数:
pageIndex - 页码序号
返回:
前一章节的序号

hasNextChapter

boolean hasNextChapter()
检查是否存在下一章节.

返回:
true, 存在. false, 不存在

hasPreviousChapter

boolean hasPreviousChapter()
检查是否存在前一章节.

返回:
true, 存在. false, 不存在

getMaxChapterNum

int getMaxChapterNum()
获取最大的目录序号.

返回:
最大的目录序号

getCurChapterIndex

int getCurChapterIndex()
获取当前目录的序号.

返回:
当前目录的序号

getChapterPageNums

int[] getChapterPageNums()
获取每个目录标题对应的页码.

返回:
目录标题对应的页码,为int[]类型.

getChapterIndexByTitle

int getChapterIndexByTitle(java.lang.String title)
根据目录标题获取目录的序号.

参数:
title - 目录标题
返回:
该标题的目录序号

getChapterTitles

java.lang.String[] getChapterTitles()
获取目录标题列表.

返回:
目录标题的列表,为String[]类型