cafe.gui
Class Language

java.lang.Object
  extended by cafe.gui.Language

public class Language
extends java.lang.Object

This class contains strings for UI for a given language.

Version:
0.2
Author:
Markus Penttila

Constructor Summary
Language(java.util.Hashtable<java.lang.String,java.lang.String> uiStringTable, javax.swing.ImageIcon picture)
          Constructs a new language from given parameters.
 
Method Summary
 javax.swing.ImageIcon getLangPicture()
          Returns the icon for the language.
 java.lang.String getText(java.lang.String id)
          Returns the string matching the id.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Language

public Language(java.util.Hashtable<java.lang.String,java.lang.String> uiStringTable,
                javax.swing.ImageIcon picture)
Constructs a new language from given parameters.

Parameters:
uiStringTable - contains two tables of strings idlist Table containing the id strings for the language. textlist Table containing the strings shown in the GUI, in the same order as in idlist.
picture - Icon for the picture, to be shown in language button.
Method Detail

getText

public java.lang.String getText(java.lang.String id)
Returns the string matching the id.

Parameters:
id - The string id to be searched from the hashtable.
Returns:
The string matching the id. Returns "String with id id not found" if no matching string is found.
Throws:
java.lang.NullPointerException - if the id is null.

getLangPicture

public javax.swing.ImageIcon getLangPicture()
Returns the icon for the language.

Returns:
The icon for this language.