Build 1.0_r1(from source)

java.awt.font
Class NumericShaper

java.lang.Object
  extended by java.awt.font.NumericShaper
All Implemented Interfaces:
Serializable

public final class NumericShaper
extends Object
implements Serializable

The Class NumericShaper provides methods to convert latin character codes to unicode character codes. For tables of the character codes used, see unicode.org.

See Also:
Serialized Form

Field Summary
static int ALL_RANGES
          The Constant ALL_RANGES indicates all ranges.
static int ARABIC
          The Constant ARABIC indicates the ARABIC range and decimal base.
static int BENGALI
          The Constant BENGALI indicates the BENGALI range and decimal base.
static int DEVANAGARI
          The Constant DEVANAGARI indicates the DEVANAGARI range and decimal base.
static int EASTERN_ARABIC
          The Constant EASTERN_ARABIC indicates the ARABIC range and ARABIC_EXTENDED decimal base.
static int ETHIOPIC
          The Constant ETHIOPIC indicates the ETHIOPIC range and decimal base.
static int EUROPEAN
          The Constant EUROPEAN indicates the latin and extended range, and latin decimal base.
static int GUJARATI
          The Constant GUJARATI indicates the GUJARATI range and decimal base.
static int GURMUKHI
          The Constant GURMUKHI indicates the GURMUKHI range and decimal base.
static int KANNADA
          The Constant KANNADA indicates the KANNADA range and decimal base.
static int KHMER
          The Constant KHMER indicates the KHMER range and decimal base.
static int LAO
          The Constant LAO indicates the LAO range and decimal base.
static int MALAYALAM
          The Constant MALAYALAM indicates the MALAYALAM range and decimal base.
static int MONGOLIAN
          The Constant MONGOLIAN indicates the MONGOLIAN range and decimal base.
static int MYANMAR
          The Constant MYANMAR indicates the MYANMAR range and decimal base.
static int ORIYA
          The Constant ORIYA indicates the ORIYA range and decimal base.
static int TAMIL
          The Constant TAMIL indicates the TAMIL range and decimal base.
static int TELUGU
          The Constant TELUGU indicates the TELUGU range and decimal base.
static int THAI
          The Constant THAI indicates the THAI range and decimal base.
static int TIBETAN
          The Constant TIBETAN indicates the TIBETAN range and decimal base.
 
Method Summary
 boolean equals(Object obj)
          Compares this NumericShaper object with the specified Object.
static NumericShaper getContextualShaper(int ranges)
          Gets the NumericShaper for the specified unicode ranges.
static NumericShaper getContextualShaper(int ranges, int defaultContext)
          Gets the NumericShaper for the specified unicode ranges and default unicode range.
 int getRanges()
          Gets the masks for all of the ranges supported by this NumericShaper, packed into an int value using the logical OR logical operation for multiple ranges: NumericShaper.DEVANAGARI | NumericShaper.BENGALI.
static NumericShaper getShaper(int singleRange)
          Gets a NumericShaper for the specified unicode range.
 int hashCode()
          Returns a hash code of this NumericShaper.
 boolean isContextual()
          Checks if this NumericShaper is contextual (supporting multiple script ranges) or not.
 void shape(char[] text, int start, int count)
          Transforms the encoding of the text, starting from the character at index start and transforming count characters.
 void shape(char[] text, int start, int count, int context)
          Transforms the encoding of the text, starting from the character at index start and transforming count characters, using the specified context.
 String toString()
          Returns a string representation of this NumericShaper.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EUROPEAN

public static final int EUROPEAN
The Constant EUROPEAN indicates the latin and extended range, and latin decimal base.

See Also:
Constant Field Values

ARABIC

public static final int ARABIC
The Constant ARABIC indicates the ARABIC range and decimal base.

See Also:
Constant Field Values

EASTERN_ARABIC

public static final int EASTERN_ARABIC
The Constant EASTERN_ARABIC indicates the ARABIC range and ARABIC_EXTENDED decimal base.

See Also:
Constant Field Values

DEVANAGARI

public static final int DEVANAGARI
The Constant DEVANAGARI indicates the DEVANAGARI range and decimal base.

See Also:
Constant Field Values

BENGALI

public static final int BENGALI
The Constant BENGALI indicates the BENGALI range and decimal base.

See Also:
Constant Field Values

GURMUKHI

public static final int GURMUKHI
The Constant GURMUKHI indicates the GURMUKHI range and decimal base.

See Also:
Constant Field Values

GUJARATI

public static final int GUJARATI
The Constant GUJARATI indicates the GUJARATI range and decimal base.

See Also:
Constant Field Values

ORIYA

public static final int ORIYA
The Constant ORIYA indicates the ORIYA range and decimal base.

See Also:
Constant Field Values

TAMIL

public static final int TAMIL
The Constant TAMIL indicates the TAMIL range and decimal base.

See Also:
Constant Field Values

TELUGU

public static final int TELUGU
The Constant TELUGU indicates the TELUGU range and decimal base.

See Also:
Constant Field Values

KANNADA

public static final int KANNADA
The Constant KANNADA indicates the KANNADA range and decimal base.

See Also:
Constant Field Values

MALAYALAM

public static final int MALAYALAM
The Constant MALAYALAM indicates the MALAYALAM range and decimal base.

See Also:
Constant Field Values

THAI

public static final int THAI
The Constant THAI indicates the THAI range and decimal base.

See Also:
Constant Field Values

LAO

public static final int LAO
The Constant LAO indicates the LAO range and decimal base.

See Also:
Constant Field Values

TIBETAN

public static final int TIBETAN
The Constant TIBETAN indicates the TIBETAN range and decimal base.

See Also:
Constant Field Values

MYANMAR

public static final int MYANMAR
The Constant MYANMAR indicates the MYANMAR range and decimal base.

See Also:
Constant Field Values

ETHIOPIC

public static final int ETHIOPIC
The Constant ETHIOPIC indicates the ETHIOPIC range and decimal base.

See Also:
Constant Field Values

KHMER

public static final int KHMER
The Constant KHMER indicates the KHMER range and decimal base.

See Also:
Constant Field Values

MONGOLIAN

public static final int MONGOLIAN
The Constant MONGOLIAN indicates the MONGOLIAN range and decimal base.

See Also:
Constant Field Values

ALL_RANGES

public static final int ALL_RANGES
The Constant ALL_RANGES indicates all ranges.

See Also:
Constant Field Values
Method Detail

hashCode

public int hashCode()
Returns a hash code of this NumericShaper.

Overrides:
hashCode in class Object
Returns:
a hash code of this NumericShaper.
See Also:
Object.equals(java.lang.Object)

equals

public boolean equals(Object obj)
Compares this NumericShaper object with the specified Object.

Overrides:
equals in class Object
Parameters:
obj - the Object to be compared.
Returns:
true, if this NumericShaper object is equal to the specified Object, false otherwise.
See Also:
Object.hashCode()

toString

public String toString()
Returns a string representation of this NumericShaper.

Overrides:
toString in class Object
Returns:
the string representation of this NumericShaper.

getContextualShaper

public static NumericShaper getContextualShaper(int ranges,
                                                int defaultContext)
Gets the NumericShaper for the specified unicode ranges and default unicode range. The defaultContext parameter is used as the starting context (which indicates the language/script being used). The OR logical operation should be used for multiple ranges: NumericShaper.DEVANAGARI | NumericShaper.BENGALI. The NumericShaper returned by this method is contextual in that it supports multiple character ranges, depending on the context.

Parameters:
ranges - the unicode ranges.
defaultContext - the default, starting context.
Returns:
the NumericShaper for the specified ranges.

getContextualShaper

public static NumericShaper getContextualShaper(int ranges)
Gets the NumericShaper for the specified unicode ranges. The OR logical operation should be used for multiple ranges: NumericShaper.DEVANAGARI | NumericShaper.BENGALI. The NumericShaper returned by this method is contextual in that it supports multiple character ranges, depending on the context.

Parameters:
ranges - the unicode ranges.
Returns:
the NumericShaper for the specified ranges.

getRanges

public int getRanges()
Gets the masks for all of the ranges supported by this NumericShaper, packed into an int value using the logical OR logical operation for multiple ranges: NumericShaper.DEVANAGARI | NumericShaper.BENGALI.

Returns:
all ranges of this NumericShaper.

getShaper

public static NumericShaper getShaper(int singleRange)
Gets a NumericShaper for the specified unicode range. The NumericShaper supports only a single range and hence is not contextual.

Parameters:
singleRange - the specified unicode single range.
Returns:
the NumericShaper for the specified unicode range.

isContextual

public boolean isContextual()
Checks if this NumericShaper is contextual (supporting multiple script ranges) or not.

Returns:
true, if this NumericShaper is contextual, false otherwise.

shape

public void shape(char[] text,
                  int start,
                  int count,
                  int context)
Transforms the encoding of the text, starting from the character at index start and transforming count characters, using the specified context.

Parameters:
text - the text to be shaped.
start - the start offset of the text.
count - the number of characters to be shaped.
context - the context to be used for shaping.

shape

public void shape(char[] text,
                  int start,
                  int count)
Transforms the encoding of the text, starting from the character at index start and transforming count characters.

Parameters:
text - the text to be shaped.
start - the start offset of the text.
count - the number of characters to be shaped.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature