本文整理汇总了Java中com.ibm.icu.text.ArabicShaping类的典型用法代码示例。如果您正苦于以下问题:Java ArabicShaping类的具体用法?Java ArabicShaping怎么用?Java ArabicShaping使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ArabicShaping类属于com.ibm.icu.text包,在下文中一共展示了ArabicShaping类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: bidiReorder
import com.ibm.icu.text.ArabicShaping; //导入依赖的package包/类
@SuppressWarnings("unused")
public static String bidiReorder(IBFFontRenderer font, String text)
{
if (betterFontsEnabled && font.getStringRenderer() != null)
{
return text;
}
try
{
Bidi bidi = new Bidi((new ArabicShaping(8)).shape(text), 127);
bidi.setReorderingMode(0);
return bidi.writeReordered(2);
} catch (ArabicShapingException var3)
{
return text;
}
}
开发者ID:cubex2,项目名称:BetterFonts,代码行数:19,代码来源:FontRendererCallback.java
示例2: bidiReorder
import com.ibm.icu.text.ArabicShaping; //导入依赖的package包/类
/**
* Apply Unicode Bidirectional Algorithm to string and return a new possibly reordered string for visual rendering.
*/
private String bidiReorder(String p_147647_1_)
{
try
{
Bidi bidi = new Bidi((new ArabicShaping(8)).shape(p_147647_1_), 127);
bidi.setReorderingMode(0);
return bidi.writeReordered(2);
}
catch (ArabicShapingException var3)
{
return p_147647_1_;
}
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:17,代码来源:FontRenderer.java
示例3: bidiReorder
import com.ibm.icu.text.ArabicShaping; //导入依赖的package包/类
/**
* Apply Unicode Bidirectional Algorithm to string and return a new possibly reordered string for visual rendering.
*/
private String bidiReorder(String p_147647_1_)
{
try
{
Bidi var3 = new Bidi((new ArabicShaping(8)).shape(p_147647_1_), 127);
var3.setReorderingMode(0);
return var3.writeReordered(2);
}
catch (ArabicShapingException var31)
{
return p_147647_1_;
}
}
开发者ID:SkidJava,项目名称:BaseClient,代码行数:17,代码来源:FontRenderer.java
示例4: bidiReorder
import com.ibm.icu.text.ArabicShaping; //导入依赖的package包/类
/**
* Apply Unicode Bidirectional Algorithm to string and return a new possibly reordered string for visual rendering.
*/
private String bidiReorder(String text)
{
try
{
Bidi bidi = new Bidi((new ArabicShaping(8)).shape(text), 127);
bidi.setReorderingMode(0);
return bidi.writeReordered(2);
}
catch (ArabicShapingException var3)
{
return text;
}
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:17,代码来源:FontRenderer.java
示例5: bidiReorder
import com.ibm.icu.text.ArabicShaping; //导入依赖的package包/类
protected String bidiReorder(String p_147647_1_)
{
try
{
Bidi bidi = new Bidi((new ArabicShaping(8)).shape(p_147647_1_), 127);
bidi.setReorderingMode(0);
return bidi.writeReordered(2);
}
catch (ArabicShapingException arabicshapingexception)
{
return p_147647_1_;
}
}
开发者ID:4Space,项目名称:4Space-5,代码行数:14,代码来源:GuiCelestialSelection.java
示例6: func_147647_b
import com.ibm.icu.text.ArabicShaping; //导入依赖的package包/类
private String func_147647_b(String p_147647_1_)
{
try
{
Bidi var3 = new Bidi((new ArabicShaping(8)).shape(p_147647_1_), 127);
var3.setReorderingMode(0);
return var3.writeReordered(2);
}
catch (ArabicShapingException var31)
{
return p_147647_1_;
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:14,代码来源:FontRenderer.java
示例7: bidiReorder
import com.ibm.icu.text.ArabicShaping; //导入依赖的package包/类
private String bidiReorder(String p_147647_1_)
{
try
{
Bidi bidi = new Bidi((new ArabicShaping(8)).shape(p_147647_1_), 127);
bidi.setReorderingMode(0);
return bidi.writeReordered(2);
}
catch (ArabicShapingException arabicshapingexception)
{
return p_147647_1_;
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:14,代码来源:FontRenderer.java
示例8: initShapingSchemes
import com.ibm.icu.text.ArabicShaping; //导入依赖的package包/类
/**
* Populates Bidi shaping schemes list
*/
private void initShapingSchemes( )
{
shapingSchemes = new ArrayList<BidiScheme>( );
shapingSchemes.add( new BidiScheme( ".{3}S.", ".{3}NN", //$NON-NLS-1$ //$NON-NLS-2$
ArabicShaping.LETTERS_UNSHAPE | ArabicShaping.DIGITS_AN2EN ) );
shapingSchemes.add( new BidiScheme( ".{3}S.", ".{3}NH", //$NON-NLS-1$ //$NON-NLS-2$
ArabicShaping.LETTERS_UNSHAPE | ArabicShaping.DIGITS_EN2AN ) );
shapingSchemes.add( new BidiScheme( ".{3}S.", ".L.NC", //$NON-NLS-1$ //$NON-NLS-2$
ArabicShaping.LETTERS_UNSHAPE
| ArabicShaping.DIGITS_EN2AN_INIT_LR ) );
shapingSchemes.add( new BidiScheme( ".{3}S.", ".R.NC", //$NON-NLS-1$ //$NON-NLS-2$
ArabicShaping.LETTERS_UNSHAPE
| ArabicShaping.DIGITS_EN2AN_INIT_AL ) );
shapingSchemes.add( new BidiScheme( ".{3}N.", ".{3}SN", //$NON-NLS-1$ //$NON-NLS-2$
ArabicShaping.LETTERS_SHAPE | ArabicShaping.DIGITS_AN2EN ) );
shapingSchemes.add( new BidiScheme( ".{3}N.", ".{3}SH", //$NON-NLS-1$ //$NON-NLS-2$
ArabicShaping.LETTERS_SHAPE | ArabicShaping.DIGITS_EN2AN ) );
shapingSchemes.add( new BidiScheme( ".{3}N.", ".L.SC", //$NON-NLS-1$ //$NON-NLS-2$
ArabicShaping.LETTERS_SHAPE
| ArabicShaping.DIGITS_EN2AN_INIT_LR ) );
shapingSchemes.add( new BidiScheme( ".{3}N.", ".R.SC", //$NON-NLS-1$ //$NON-NLS-2$
ArabicShaping.LETTERS_SHAPE
| ArabicShaping.DIGITS_EN2AN_INIT_AL ) );
}
开发者ID:eclipse,项目名称:birt,代码行数:36,代码来源:BidiEngine.java
示例9: shape
import com.ibm.icu.text.ArabicShaping; //导入依赖的package包/类
/**
* Performs Arabic numeric and literal shaping
*
* @param str
* source String to shape
* @param options
* Shape options
* @return shaped String
*/
private String shape( String str, int options )
{
ArabicShaping shaper = new ArabicShaping( options
| ArabicShaping.TEXT_DIRECTION_VISUAL_LTR );
try
{
return shaper.shape( str );
}
catch ( ArabicShapingException e )
{
e.printStackTrace( );
return str;
}
}
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:BidiEngine.java
示例10: transform
import com.ibm.icu.text.ArabicShaping; //导入依赖的package包/类
public void transform( ITextContent textContent )
{
String transformType = textContent.getComputedStyle( )
.getTextTransform( );
if ( transformType.equalsIgnoreCase( "uppercase" ) ) //$NON-NLS-1$
{
textContent.setText( textContent.getText( ).toUpperCase( ) );
}
else if ( transformType.equalsIgnoreCase( "lowercase" ) ) //$NON-NLS-1$
{
textContent.setText( textContent.getText( ).toLowerCase( ) );
}
else if ( transformType.equalsIgnoreCase( "capitalize" ) ) //$NON-NLS-1$
{
textContent.setText( capitalize( textContent.getText( ) ) );
}
ArabicShaping shaping = new ArabicShaping(ArabicShaping.LETTERS_SHAPE);
try
{
String shapingText = shaping.shape( textContent.getText( ));
textContent.setText(shapingText);
}
catch ( ArabicShapingException e )
{
logger.log( Level.WARNING, e.getMessage( ), e );
}
}
开发者ID:eclipse,项目名称:birt,代码行数:29,代码来源:TextAreaLayout.java
注:本文中的com.ibm.icu.text.ArabicShaping类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论