本文整理了Java中com.koolearn.klibrary.text.view.ZLTextRegion.getSoul()
方法的一些代码示例,展示了ZLTextRegion.getSoul()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZLTextRegion.getSoul()
方法的具体详情如下:
包路径:com.koolearn.klibrary.text.view.ZLTextRegion
类名称:ZLTextRegion
方法名:getSoul
暂无
代码示例来源:origin: Jiangzqts/EpubRead
public boolean accepts(ZLTextRegion region) {
return region.getSoul() instanceof ExtensionRegionSoul;
}
};
代码示例来源:origin: ydcx/KooReader
public boolean accepts(ZLTextRegion region) {
final Soul soul = region.getSoul();
return
soul instanceof ZLTextImageRegionSoul ||
soul instanceof ZLTextHyperlinkRegionSoul;
}
};
代码示例来源:origin: ydcx/KooReader
public boolean accepts(ZLTextRegion region) {
return region.getSoul() instanceof ZLTextVideoRegionSoul;
}
};
代码示例来源:origin: Jiangzqts/EpubRead
public boolean accepts(ZLTextRegion region) {
final Soul soul = region.getSoul();
return
soul instanceof ZLTextImageRegionSoul ||
soul instanceof ZLTextHyperlinkRegionSoul;
}
};
代码示例来源:origin: ydcx/KooReader
public boolean accepts(ZLTextRegion region) {
return region.getSoul() instanceof ZLTextHyperlinkRegionSoul;
}
};
代码示例来源:origin: ydcx/KooReader
public boolean accepts(ZLTextRegion region) {
return region.getSoul() instanceof ExtensionRegionSoul;
}
};
代码示例来源:origin: Jiangzqts/EpubRead
public boolean accepts(ZLTextRegion region) {
return region.getSoul() instanceof ZLTextHyperlinkRegionSoul;
}
};
代码示例来源:origin: Jiangzqts/EpubRead
public boolean accepts(ZLTextRegion region) {
return region.getSoul() instanceof ZLTextVideoRegionSoul;
}
};
代码示例来源:origin: Jiangzqts/EpubRead
ZLTextRegion getRegion(ZLTextRegion.Soul soul) {
if (soul == null) {
return null;
}
synchronized (myAreas) {
for (ZLTextRegion region : myElementRegions) {
if (soul.equals(region.getSoul())) {
return region;
}
}
}
return null;
}
代码示例来源:origin: ydcx/KooReader
ZLTextRegion getRegion(ZLTextRegion.Soul soul) {
if (soul == null) {
return null;
}
synchronized (myAreas) {
for (ZLTextRegion region : myElementRegions) {
if (soul.equals(region.getSoul())) {
return region;
}
}
}
return null;
}
代码示例来源:origin: Jiangzqts/EpubRead
public final void outlineRegion(ZLTextRegion region) {
outlineRegion(region != null ? region.getSoul() : null);
}
代码示例来源:origin: ydcx/KooReader
public final void outlineRegion(ZLTextRegion region) {
outlineRegion(region != null ? region.getSoul() : null);
}
代码示例来源:origin: Jiangzqts/EpubRead
boolean start(int x, int y) {
clear();
final ZLTextRegion region = myView.findRegion(
x, y, myView.maxSelectionDistance(), ZLTextRegion.AnyRegionFilter
);
if (region == null) {
return false;
}
myRightMostRegionSoul = myLeftMostRegionSoul = region.getSoul();
return true;
}
代码示例来源:origin: ydcx/KooReader
boolean start(int x, int y) {
clear();
final ZLTextRegion region = myView.findRegion(
x, y, myView.maxSelectionDistance(), ZLTextRegion.AnyRegionFilter
);
if (region == null) {
return false;
}
myRightMostRegionSoul = myLeftMostRegionSoul = region.getSoul();
return true;
}
代码示例来源:origin: Jiangzqts/EpubRead
boolean intersects(ZLTextRegion region) {
final ZLTextRegion.Soul soul = region.getSoul();
return
!isEmpty() &&
soul.compareTo(getStartPosition()) >= 0 &&
soul.compareTo(getEndPosition()) <= 0;
}
代码示例来源:origin: ydcx/KooReader
boolean intersects(ZLTextRegion region) {
final ZLTextRegion.Soul soul = region.getSoul();
return
!isEmpty() &&
soul.compareTo(getStartPosition()) >= 0 &&
soul.compareTo(getEndPosition()) <= 0;
}
代码示例来源:origin: ydcx/KooReader
@Override
public void onFingerReleaseAfterLongPress(int x, int y) {
final SelectionCursor.Which cursor = getSelectionCursorInMovement();
if (cursor != null) {
releaseSelectionCursor();
return;
}
final ZLTextRegion region = getOutlinedRegion();
if (region != null) {
final ZLTextRegion.Soul soul = region.getSoul();
boolean doRunAction = false;
if (soul instanceof ZLTextWordRegionSoul) {
doRunAction =
myReader.MiscOptions.WordTappingAction.getValue() ==
MiscOptions.WordTappingActionEnum.openDictionary;
}
// else if (soul instanceof ZLTextImageRegionSoul) {
// doRunAction =
// myReader.ImageOptions.TapAction.getValue() ==
// ImageOptions.TapActionEnum.openImageView;
// }
if (doRunAction) {
myReader.runAction(ActionCode.PROCESS_HYPERLINK);
}
}
}
代码示例来源:origin: Jiangzqts/EpubRead
@Override
public void onFingerReleaseAfterLongPress(int x, int y) {
final SelectionCursor.Which cursor = getSelectionCursorInMovement();
if (cursor != null) {
releaseSelectionCursor();
return;
}
final ZLTextRegion region = getOutlinedRegion();
if (region != null) {
final ZLTextRegion.Soul soul = region.getSoul();
boolean doRunAction = false;
if (soul instanceof ZLTextWordRegionSoul) {
doRunAction =
myReader.MiscOptions.WordTappingAction.getValue() ==
MiscOptions.WordTappingActionEnum.openDictionary;
}
// else if (soul instanceof ZLTextImageRegionSoul) {
// doRunAction =
// myReader.ImageOptions.TapAction.getValue() ==
// ImageOptions.TapActionEnum.openImageView;
// }
if (doRunAction) {
myReader.runAction(ActionCode.PROCESS_HYPERLINK);
}
}
}
代码示例来源:origin: Jiangzqts/EpubRead
@Override
protected void run(Object... params) {
final KooView kooView = Reader.getTextView();
ZLTextRegion region = kooView.getOutlinedRegion();
final ZLTextRegion.Filter filter =
(region != null && region.getSoul() instanceof ZLTextWordRegionSoul)
|| Reader.MiscOptions.NavigateAllWords.getValue()
? ZLTextRegion.AnyRegionFilter : ZLTextRegion.ImageOrHyperlinkFilter;
region = kooView.nextRegion(myDirection, filter);
if (region != null) {
kooView.outlineRegion(region);
} else {
switch (myDirection) {
case down:
kooView.turnPage(true, KooView.ScrollingMode.SCROLL_LINES, 1);
break;
case up:
kooView.turnPage(false, KooView.ScrollingMode.SCROLL_LINES, 1);
break;
}
}
Reader.getViewWidget().reset();
Reader.getViewWidget().repaint();
}
}
代码示例来源:origin: ydcx/KooReader
@Override
protected void run(Object... params) {
final KooView kooView = Reader.getTextView();
ZLTextRegion region = kooView.getOutlinedRegion();
final ZLTextRegion.Filter filter =
(region != null && region.getSoul() instanceof ZLTextWordRegionSoul)
|| Reader.MiscOptions.NavigateAllWords.getValue()
? ZLTextRegion.AnyRegionFilter : ZLTextRegion.ImageOrHyperlinkFilter;
region = kooView.nextRegion(myDirection, filter);
if (region != null) {
kooView.outlineRegion(region);
} else {
switch (myDirection) {
case down:
kooView.turnPage(true, KooView.ScrollingMode.SCROLL_LINES, 1);
break;
case up:
kooView.turnPage(false, KooView.ScrollingMode.SCROLL_LINES, 1);
break;
}
}
Reader.getViewWidget().reset();
Reader.getViewWidget().repaint();
}
}
内容来源于网络,如有侵权,请联系作者删除!