Android
java.awt.font
public final class

java.awt.font.NumericShaper

java.lang.Object
java.awt.font.NumericShaper 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.

Summary

Constants

      Value  
int  ALL_RANGES  The Constant ALL_RANGES indicates all ranges.  524287  0x0007ffff 
int  ARABIC  The Constant ARABIC indicates the ARABIC range and decimal base.  0x00000002 
int  BENGALI  The Constant BENGALI indicates the BENGALI range and decimal base.  16  0x00000010 
int  DEVANAGARI  The Constant DEVANAGARI indicates the DEVANAGARI range and decimal base.  0x00000008 
int  EASTERN_ARABIC  The Constant EASTERN_ARABIC indicates the ARABIC range and ARABIC_EXTENDED decimal base.  0x00000004 
int  ETHIOPIC  The Constant ETHIOPIC indicates the ETHIOPIC range and decimal base.  65536  0x00010000 
int  EUROPEAN  The Constant EUROPEAN indicates the latin and extended range, and latin decimal base.  0x00000001 
int  GUJARATI  The Constant GUJARATI indicates the GUJARATI range and decimal base.  64  0x00000040 
int  GURMUKHI  The Constant GURMUKHI indicates the GURMUKHI range and decimal base.  32  0x00000020 
int  KANNADA  The Constant KANNADA indicates the KANNADA range and decimal base.  1024  0x00000400 
int  KHMER  The Constant KHMER indicates the KHMER range and decimal base.  131072  0x00020000 
int  LAO  The Constant LAO indicates the LAO range and decimal base.  8192  0x00002000 
int  MALAYALAM  The Constant MALAYALAM indicates the MALAYALAM range and decimal base.  2048  0x00000800 
int  MONGOLIAN  The Constant MONGOLIAN indicates the MONGOLIAN range and decimal base.  262144  0x00040000 
int  MYANMAR  The Constant MYANMAR indicates the MYANMAR range and decimal base.  32768  0x00008000 
int  ORIYA  The Constant ORIYA indicates the ORIYA range and decimal base.  128  0x00000080 
int  TAMIL  The Constant TAMIL indicates the TAMIL range and decimal base.  256  0x00000100 
int  TELUGU  The Constant TELUGU indicates the TELUGU range and decimal base.  512  0x00000200 
int  THAI  The Constant THAI indicates the THAI range and decimal base.  4096  0x00001000 
int  TIBETAN  The Constant TIBETAN indicates the TIBETAN range and decimal base.  16384  0x00004000 

Public Methods

          boolean  equals(Object obj)
Compares this NumericShaper object with the specified Object.
      static    NumericShaper  getContextualShaper(int ranges, int defaultContext)
Gets the NumericShaper for the specified unicode ranges and default unicode range.
      static    NumericShaper  getContextualShaper(int ranges)
Gets the NumericShaper for the specified unicode ranges.
          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

Details

Constants

public static final int ALL_RANGES

The Constant ALL_RANGES indicates all ranges.
Constant Value: 524287 (0x0007ffff)

public static final int ARABIC

The Constant ARABIC indicates the ARABIC range and decimal base.
Constant Value: 2 (0x00000002)

public static final int BENGALI

The Constant BENGALI indicates the BENGALI range and decimal base.
Constant Value: 16 (0x00000010)

public static final int DEVANAGARI

The Constant DEVANAGARI indicates the DEVANAGARI range and decimal base.
Constant Value: 8 (0x00000008)

public static final int EASTERN_ARABIC

The Constant EASTERN_ARABIC indicates the ARABIC range and ARABIC_EXTENDED decimal base.
Constant Value: 4 (0x00000004)

public static final int ETHIOPIC

The Constant ETHIOPIC indicates the ETHIOPIC range and decimal base.
Constant Value: 65536 (0x00010000)

public static final int EUROPEAN

The Constant EUROPEAN indicates the latin and extended range, and latin decimal base.
Constant Value: 1 (0x00000001)

public static final int GUJARATI

The Constant GUJARATI indicates the GUJARATI range and decimal base.
Constant Value: 64 (0x00000040)

public static final int GURMUKHI

The Constant GURMUKHI indicates the GURMUKHI range and decimal base.
Constant Value: 32 (0x00000020)

public static final int KANNADA

The Constant KANNADA indicates the KANNADA range and decimal base.
Constant Value: 1024 (0x00000400)

public static final int KHMER

The Constant KHMER indicates the KHMER range and decimal base.
Constant Value: 131072 (0x00020000)

public static final int LAO

The Constant LAO indicates the LAO range and decimal base.
Constant Value: 8192 (0x00002000)

public static final int MALAYALAM

The Constant MALAYALAM indicates the MALAYALAM range and decimal base.
Constant Value: 2048 (0x00000800)

public static final int MONGOLIAN

The Constant MONGOLIAN indicates the MONGOLIAN range and decimal base.
Constant Value: 262144 (0x00040000)

public static final int MYANMAR

The Constant MYANMAR indicates the MYANMAR range and decimal base.
Constant Value: 32768 (0x00008000)

public static final int ORIYA

The Constant ORIYA indicates the ORIYA range and decimal base.
Constant Value: 128 (0x00000080)

public static final int TAMIL

The Constant TAMIL indicates the TAMIL range and decimal base.
Constant Value: 256 (0x00000100)

public static final int TELUGU

The Constant TELUGU indicates the TELUGU range and decimal base.
Constant Value: 512 (0x00000200)

public static final int THAI

The Constant THAI indicates the THAI range and decimal base.
Constant Value: 4096 (0x00001000)

public static final int TIBETAN

The Constant TIBETAN indicates the TIBETAN range and decimal base.
Constant Value: 16384 (0x00004000)

Public Methods

public boolean equals(Object obj)

Compares this NumericShaper object with the specified Object.

Parameters

obj the Object to be compared.

Returns

  • true, if this NumericShaper object is equal to the specified Object, false otherwise.

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.

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.

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.

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.

public int hashCode()

Returns a hash code of this NumericShaper.

Returns

  • a hash code of this NumericShaper.

public boolean isContextual()

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

Returns

  • true, if this NumericShaper is contextual, false otherwise.

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.

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.

public String toString()

Returns a string representation of this NumericShaper.

Returns

  • the string representation of this NumericShaper.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48