本文整理了Java中com.koolearn.klibrary.text.view.ZLTextWord.<init>()
方法的一些代码示例,展示了ZLTextWord.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZLTextWord.<init>()
方法的具体详情如下:
包路径:com.koolearn.klibrary.text.view.ZLTextWord
类名称:ZLTextWord
方法名:<init>
暂无
代码示例来源:origin: ydcx/KooReader
private final void addWord(char[] data, int offset, int len, int paragraphOffset, ZLTextHyperlink hyperlink) {
ZLTextWord word = new ZLTextWord(data, offset, len, paragraphOffset);
for (int i = myFirstMark; i < myLastMark; ++i) {
final ZLTextMark mark = (ZLTextMark)myMarks.get(i);
if ((mark.Offset < paragraphOffset + len) && (mark.Offset + mark.Length > paragraphOffset)) {
word.addMark(mark.Offset - paragraphOffset, mark.Length);
}
}
if (hyperlink != null) {
hyperlink.addElementIndex(myElements.size());
}
myElements.add(word);
}
}
代码示例来源:origin: Jiangzqts/EpubRead
private final void addWord(char[] data, int offset, int len, int paragraphOffset, ZLTextHyperlink hyperlink) {
ZLTextWord word = new ZLTextWord(data, offset, len, paragraphOffset);
for (int i = myFirstMark; i < myLastMark; ++i) {
final ZLTextMark mark = myMarks.get(i);
if ((mark.Offset < paragraphOffset + len) && (mark.Offset + mark.Length > paragraphOffset)) {
word.addMark(mark.Offset - paragraphOffset, mark.Length);
}
}
if (hyperlink != null) {
hyperlink.addElementIndex(myElements.size());
}
myElements.add(word);
}
}
代码示例来源:origin: Jiangzqts/EpubRead
void fill() {
ZLTextParagraph paragraph = Model.getParagraph(Index);
switch (paragraph.getKind()) {
case ZLTextParagraph.Kind.TEXT_PARAGRAPH:
new Processor(paragraph, CursorManager.ExtensionManager, new LineBreaker(Model.getLanguage()), Model.getMarks(), Index, myElements).fill();
break;
case ZLTextParagraph.Kind.EMPTY_LINE_PARAGRAPH:
myElements.add(new ZLTextWord(SPACE_ARRAY, 0, 1, 0));
break;
case ZLTextParagraph.Kind.ENCRYPTED_SECTION_PARAGRAPH:
{
final ZLTextStyleEntry entry = new ZLTextOtherStyleEntry();
entry.setFontModifier(ZLTextStyleEntry.FontModifier.FONT_MODIFIER_BOLD, true);
myElements.add(new ZLTextStyleElement(entry));
myElements.add(new ZLTextWord(ZLResource.resource("drm").getResource("encryptedSection").getValue(), 0));
break;
}
default:
break;
}
}
代码示例来源:origin: ydcx/KooReader
void fill() {
ZLTextParagraph paragraph = Model.getParagraph(Index);
switch (paragraph.getKind()) {
case ZLTextParagraph.Kind.TEXT_PARAGRAPH:
new Processor(paragraph, CursorManager.ExtensionManager, new LineBreaker(Model.getLanguage()), Model.getMarks(), Index, myElements).fill();
break;
case ZLTextParagraph.Kind.EMPTY_LINE_PARAGRAPH:
myElements.add(new ZLTextWord(SPACE_ARRAY, 0, 1, 0));
break;
case ZLTextParagraph.Kind.ENCRYPTED_SECTION_PARAGRAPH:
{
final ZLTextStyleEntry entry = new ZLTextOtherStyleEntry();
entry.setFontModifier(ZLTextStyleEntry.FontModifier.FONT_MODIFIER_BOLD, true);
myElements.add(new ZLTextStyleElement(entry));
myElements.add(new ZLTextWord(ZLResource.resource("drm").getResource("encryptedSection").getValue(), 0));
break;
}
default:
break;
}
}
内容来源于网络,如有侵权,请联系作者删除!