Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.flagstone.transform.util
Class FSCharacterTable

    java.lang.Object
      com.flagstone.transform.util.FSCharacterTable

    public class FSCharacterTable

extends java.lang.Object

The FSCharacterTable class provides predefined arrays of characters that can be used with the FSTextConstructor's willDisplay() method to predefine the characters that will be displayed using a given font. Character sets are simply list of characters to use. The names used to identify collections of characters use official character set names, such as iso_8859_1. However they do NOT indicate how the characters are encoded as such (all strings are encoded using UTF-8) they are simply a way of naming a group of characters in a recognized (and standard) way. Other sets that use characters appropriate for a specific country and language also use ISO designations for a specific locale such as en_US or pt_BR.

Field Summary
`static int` | `euro` Code identifying a set containing the single character for the euro currency symbol.
`static int` | `iso_646` Code identifying formal the characters defined in ISO 646.
`static int` | `iso_8859_1` Code identifying formal the characters defined in ISO-8859-1.

Constructor Summary
`FSCharacterTable()`

Method Summary
`static char[]` | `characterSet(int code)` Return a predefined set of characters.
`static char[]` | `characterSetForLocale(java.util.Locale locale)` Return a character set for a given country and language.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### euro

    public static final int euro

  Code identifying a set containing the single character for the euro currency symbol. It is included as a separate set as manly formal coded character sets do not include it. A separate set makes it easier to match different sets of characters together. The (Unicode) character code for this symbol is 0x20AC so it will typically be the last character set passed to the FSTextConstructor's willDisplay() method.

  See Also:
    Constant Field Values

### iso_646

    public static final int iso_646

  Code identifying formal the characters defined in ISO 646. Alias: ASCII

  See Also:
    Constant Field Values

### iso_8859_1

    public static final int iso_8859_1

  Code identifying formal the characters defined in ISO-8859-1. Alias: Latin-1

  See Also:
    Constant Field Values

Constructor Detail

### FSCharacterTable

    public FSCharacterTable()

Method Detail

### characterSet

    public static final char[] characterSet(int code)

  Return a predefined set of characters. An integer code is used to select the set to avoid possible formatting issues with names of character sets specified as strings.

  Parameters:
    `code` - a predefine constant identifying the character set to return.
  Returns:
    an char[] contains all the characters for a given character set. If an unknown code is used then an empty array will be returned.

### characterSetForLocale

    public static final char[] characterSetForLocale(java.util.Locale locale)

  Return a character set for a given country and language. This method is used to generate smaller character sets which will also reduce the size of the font definitions.

  Parameters:
    `locale` - a Locale identifying the country and optional language used to select a character set.
  Returns:
    an array containing all the characters suitable for display using the specified country and language.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD