org.apache.abdera.i18n.text
Class Bidi

java.lang.Object
  extended by org.apache.abdera.i18n.text.Bidi

public class Bidi
extends Object

Bidi guessing algorithms


Nested Class Summary
static class Bidi.Direction
           
 
Constructor Summary
Bidi()
           
 
Method Summary
static Bidi.Direction guessDirectionFromEncoding(String charset)
          Algorithm that will determine text direction by looking at the character set encoding.
static Bidi.Direction guessDirectionFromJavaBidi(String text)
          Algorithm that defers to the Java Bidi implementation to determine text direction.
static Bidi.Direction guessDirectionFromLanguage(Lang lang)
          Algorithm that will determine text direction by looking at the characteristics of the language tag.
static Bidi.Direction guessDirectionFromTextProperties(String text)
          Algorithm that analyzes properties of the text to determine text direction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bidi

public Bidi()
Method Detail

guessDirectionFromLanguage

public static Bidi.Direction guessDirectionFromLanguage(Lang lang)
Algorithm that will determine text direction by looking at the characteristics of the language tag. If the tag uses a language or script that is known to be RTL, then Direction.RTL will be returned


guessDirectionFromEncoding

public static Bidi.Direction guessDirectionFromEncoding(String charset)
Algorithm that will determine text direction by looking at the character set encoding. If the charset is typically used for RTL languages, Direction.RTL will be returned


guessDirectionFromTextProperties

public static Bidi.Direction guessDirectionFromTextProperties(String text)
Algorithm that analyzes properties of the text to determine text direction. If the majority of characters in the text are RTL characters, then Direction.RTL will be returned.


guessDirectionFromJavaBidi

public static Bidi.Direction guessDirectionFromJavaBidi(String text)
Algorithm that defers to the Java Bidi implementation to determine text direction.



Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.