本文整理了Java中java.text.Bidi.getRunLevel()
方法的一些代码示例,展示了Bidi.getRunLevel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bidi.getRunLevel()
方法的具体详情如下:
包路径:java.text.Bidi
类名称:Bidi
方法名:getRunLevel
[英]Returns the level of the specified run.
[中]返回指定运行的级别。
代码示例来源:origin: apache/pdfbox
levels[i] = (byte)bidi.getRunLevel(i);
runs[i] = i;
代码示例来源:origin: geotools/geotools
for (int i = 0; i < bidi.getRunCount(); i++) {
String s1 = label.substring(bidi.getRunStart(i), bidi.getRunLimit(i));
if (bidi.getRunLevel(i) % 2 == 0) {
s1 = new StringBuffer(s1).reverse().toString();
代码示例来源:origin: at.bestsolution.eclipse/com.ibm.icu.base
/**
* Return the level of the nth logical run in this line.
*
* @param run the index of the run, between 0 and <code>countRuns()-1</code>
*
* @return the level of the run
*
* @throws IllegalStateException if this call is not preceded by a successful
* call to <code>setPara</code> or <code>setLine</code>
* @throws IllegalArgumentException if <code>run</code> is not in
* the range <code>0<=run<countRuns()</code>
* @stable ICU 3.8
*/
public int getRunLevel(int run)
{
return bidi.getRunLevel(run);
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.ibm.icu.base
/**
* Return the level of the nth logical run in this line.
*
* @param run the index of the run, between 0 and <code>countRuns()-1</code>
*
* @return the level of the run
*
* @throws IllegalStateException if this call is not preceded by a successful
* call to <code>setPara</code> or <code>setLine</code>
* @throws IllegalArgumentException if <code>run</code> is not in
* the range <code>0<=run<countRuns()</code>
* @stable ICU 3.8
*/
public int getRunLevel(int run)
{
return bidi.getRunLevel(run);
}
代码示例来源:origin: stackoverflow.com
String paragraph = "hey what's up ضعيف";
int NO_FLAG = 0;
Bidi bidi = new Bidi(paragraph, NO_FLAG);
int runCount = bidi.getRunCount();
for (int i = 0; i < runCount; i++) {
String ltrtl = bidi.getRunLevel(i) % 2 == 0 ? "ltr" : "rtl";
String subString = paragraph.substring(bidi.getRunStart(i), bidi.getRunLimit(i));
Log.d(">>bidi:" + i, subString+" is "+ltrtl);
}
代码示例来源:origin: stackoverflow.com
int level = bidi.getRunLevel(i);
int limit = bidi.getRunLimit(i);
String run = input.substring(start, limit);
代码示例来源:origin: org.apache.pdfbox/pdfbox
levels[i] = (byte)bidi.getRunLevel(i);
runs[i] = i;
代码示例来源:origin: com.github.lafa.pdfbox/pdfbox
levels[i] = (byte)bidi.getRunLevel(i);
runs[i] = i;
代码示例来源:origin: org.geotools/gt-render
for (int i=0; i<bidi.getRunCount(); i++) {
String s1 = label.substring(bidi.getRunStart(i), bidi.getRunLimit(i));
if (bidi.getRunLevel(i)%2==0) {
s1 = new StringBuffer(s1).reverse().toString();
代码示例来源:origin: plutext/docx4j-ImportXHTML
if (isEven(bidi.getRunLevel(i) )) {
ltr += (end-start);
} else {
代码示例来源:origin: google/sagetv
for (int i = 0; i < runCounts; i++)
levelInfo[i] = (byte)booty.getRunLevel(i);
textObjs[i] = inText.substring(booty.getRunStart(i), booty.getRunLimit(i));
textObjs[i] = (levelInfo[i] % 2) == booty.getBaseLevel() ? textObjs[i].toString() :
代码示例来源:origin: plutext/docx4j-ImportXHTML
!isEven(bidi.getRunLevel(i) )); // even means left to right
内容来源于网络,如有侵权,请联系作者删除!