org.freehep.graphics2d.font
Class Lookup

java.lang.Object
  extended by org.freehep.graphics2d.font.Lookup

public class Lookup
extends java.lang.Object

Lookup class provides conversion between different encodings and character tables using character name, encoding index, and unicode. In order to add new tables original code should be modified.

Version:
$Id: Lookup.java 8584 2006-08-10 23:06:37Z duns $
Author:
Sami Kama

Method Summary
static Lookup getInstance()
           
 int getNumberOfTables()
          Gives the total number of tables included in the file
 CharTable getTable(java.lang.String tableName)
          Gives the requested encoding table Valid table names can be requested with a call to
 java.lang.String[] getTableNames()
          Gives the names of tables that can be used in a string array.
 java.lang.String toName(char uc)
          Converts a unicode character to name.
 java.lang.String toName(java.lang.Character uc)
          Converts a unicode character to name.
 char toUnicode(java.lang.String name)
          Converts a name to unicode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Lookup getInstance()

toUnicode

public char toUnicode(java.lang.String name)
Converts a name to unicode. This method takes name of the character and returns character as a unicode character.

Returns:
requested unicode character.

toName

public java.lang.String toName(char uc)
Converts a unicode character to name.

Returns:
requested character name.

toName

public java.lang.String toName(java.lang.Character uc)
Converts a unicode character to name.

Returns:
requested character name.

getTable

public CharTable getTable(java.lang.String tableName)
Gives the requested encoding table Valid table names can be requested with a call to

Returns:
requested encoding.
See Also:
getTableNames().

getNumberOfTables

public int getNumberOfTables()
Gives the total number of tables included in the file

Returns:
number of tables

getTableNames

public java.lang.String[] getTableNames()
Gives the names of tables that can be used in a string array.

Returns:
An array of String[] containing the table names


Copyright © 2000-2007 FreeHEP. All Rights Reserved.