当前位置: 首页>>代码示例>>Java>>正文


Java BidiBase.setPara方法代码示例

本文整理汇总了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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:34,代码来源:Bidi.java


注:本文中的sun.text.bidi.BidiBase.setPara方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。