FreeHEP API
Version current

org.freehep.graphics2d.font
Class Lookup

java.lang.Object
  extended byorg.freehep.graphics2d.font.Lookup

public class Lookup
extends 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,v 1.1 2005/01/03 21:22:24 duns Exp $
Author:
Sami Kama
Source Code:
Lookup.java

Method Summary
static Lookup getInstance()
           
 int getNumberOfTables()
          Gives the total number of tables included in the file
 CharTable getTable(String tableName)
          Gives the requested encoding table Valid table names can be requested with a call to
 String[] getTableNames()
          Gives the names of tables that can be used in a string array.
 String toName(char uc)
          Converts a unicode character to name.
 String toName(Character uc)
          Converts a unicode character to name.
 char toUnicode(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(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 String toName(char uc)
Converts a unicode character to name.

Returns:
requested character name.

toName

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

Returns:
requested character name.

getTable

public CharTable getTable(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 String[] getTableNames()
Gives the names of tables that can be used in a string array.

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

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.