java.text.Bidi.getLevelAt()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中java.text.Bidi.getLevelAt()方法的一些代码示例,展示了Bidi.getLevelAt()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bidi.getLevelAt()方法的具体详情如下:
包路径:java.text.Bidi
类名称:Bidi
方法名:getLevelAt

Bidi.getLevelAt介绍

[英]Returns the level of a specified character.
[中]

代码示例

代码示例来源:origin: at.bestsolution.eclipse/com.ibm.icu.base

/**
 * Get the level for one character.
 *
 * @param charIndex the index of a character.
 *
 * @return The level for the character at <code>charIndex</code>.
 *
 * @throws IllegalStateException if this call is not preceded by a successful
 *         call to <code>setPara</code> or <code>setLine</code>
 * @throws IllegalArgumentException if charIndex is not in the range
 *         <code>0&lt;=charIndex&lt;getProcessedLength()</code>
 *
 * @see #getProcessedLength
 * @stable ICU 3.8
 */
public byte getLevelAt(int charIndex)
{
  return (byte)bidi.getLevelAt(charIndex);
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.ibm.icu.base

/**
 * Get the level for one character.
 *
 * @param charIndex the index of a character.
 *
 * @return The level for the character at <code>charIndex</code>.
 *
 * @throws IllegalStateException if this call is not preceded by a successful
 *         call to <code>setPara</code> or <code>setLine</code>
 * @throws IllegalArgumentException if charIndex is not in the range
 *         <code>0&lt;=charIndex&lt;getProcessedLength()</code>
 *
 * @see #getProcessedLength
 * @stable ICU 3.8
 */
public byte getLevelAt(int charIndex)
{
  return (byte)bidi.getLevelAt(charIndex);
}

代码示例来源:origin: com.github.librepdf/openpdf

(byte) (runDirection == PdfWriter.RUN_DIRECTION_RTL ? Bidi.DIRECTION_RIGHT_TO_LEFT : Bidi.DIRECTION_LEFT_TO_RIGHT));
for (int k = 0; k < totalTextLength; ++k) {
  orderLevels[k] = (byte) bidi.getLevelAt(k);
  indexChars[k] = k;

相关文章