本文整理汇总了Java中sun.text.bidi.BidiBase.setPara方法的典型用法代码示例。如果您正苦于以下问题:Java BidiBase.setPara方法的具体用法?Java BidiBase.setPara怎么用?Java BidiBase.setPara使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.text.bidi.BidiBase
的用法示例。
在下文中一共展示了BidiBase.setPara方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Bidi
import sun.text.bidi.BidiBase; //导入方法依赖的package包/类
/**
* Create Bidi from the given paragraph of text.
* <p>
* The RUN_DIRECTION attribute in the text, if present, determines the base
* direction (left-to-right or right-to-left). If not present, the base
* direction is computes using the Unicode Bidirectional Algorithm, defaulting to left-to-right
* if there are no strong directional characters in the text. This attribute, if
* present, must be applied to all the text in the paragraph.
* <p>
* The BIDI_EMBEDDING attribute in the text, if present, represents embedding level
* information. Negative values from -1 to -62 indicate overrides at the absolute value
* of the level. Positive values from 1 to 62 indicate embeddings. Where values are
* zero or not defined, the base embedding level as determined by the base direction
* is assumed.
* <p>
* The NUMERIC_SHAPING attribute in the text, if present, converts European digits to
* other decimal digits before running the bidi algorithm. This attribute, if present,
* must be applied to all the text in the paragraph.
*
* @param paragraph a paragraph of text with optional character and paragraph attribute information
*
* @see java.awt.font.TextAttribute#BIDI_EMBEDDING
* @see java.awt.font.TextAttribute#NUMERIC_SHAPING
* @see java.awt.font.TextAttribute#RUN_DIRECTION
*/
public Bidi(AttributedCharacterIterator paragraph) {
if (paragraph == null) {
throw new IllegalArgumentException("paragraph is null");
}
bidiBase = new BidiBase(0, 0);
bidiBase.setPara(paragraph);
}