本文整理汇总了Java中com.ibm.icu.text.ArabicShapingException类的典型用法代码示例。如果您正苦于以下问题:Java ArabicShapingException类的具体用法?Java ArabicShapingException怎么用?Java ArabicShapingException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ArabicShapingException类属于com.ibm.icu.text包,在下文中一共展示了ArabicShapingException类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: bidiReorder
import com.ibm.icu.text.ArabicShapingException; //导入依赖的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;
}
}
示例2: bidiReorder
import com.ibm.icu.text.ArabicShapingException; //导入依赖的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_;
}
}
示例3: bidiReorder
import com.ibm.icu.text.ArabicShapingException; //导入依赖的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_;
}
}
示例4: bidiReorder
import com.ibm.icu.text.ArabicShapingException; //导入依赖的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;
}
}
示例5: bidiReorder
import com.ibm.icu.text.ArabicShapingException; //导入依赖的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_;
}
}
示例6: func_147647_b
import com.ibm.icu.text.ArabicShapingException; //导入依赖的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_;
}
}
示例7: bidiReorder
import com.ibm.icu.text.ArabicShapingException; //导入依赖的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_;
}
}
示例8: shape
import com.ibm.icu.text.ArabicShapingException; //导入依赖的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;
}
}
示例9: transform
import com.ibm.icu.text.ArabicShapingException; //导入依赖的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 );
}
}