uic.output
Class UICTranslator

java.lang.Object
  extended byuic.output.UICTranslator
All Implemented Interfaces:
TranslatorInterface

public class UICTranslator
extends Object
implements TranslatorInterface

This translator enabled the generated classes to use the uic.Translate class for translations.

See Also:
Translate

Constructor Summary
UICTranslator()
           
 
Method Summary
 Representer getButtonText(Object in)
          In modern GUIs the '&' in front of a character represents a mnemonic; but should not be visible on buttons; this method returns the string sans the '&'.
 Representer getMnemonic(Object in)
          In modern GUIs the '&' in front of a character represents a mnemonic; but should not be visible on buttons; this method returns the first character that follows the first '& char.
 Representer i18n(Object in)
          The usage of this method (in implementing classes) would be to translate text from the user-interface input file to the output.
 void setBuilder(UICBuilder builder)
          To access the class you are suppost to do internatialisation for here is the builder..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UICTranslator

public UICTranslator()
Method Detail

setBuilder

public void setBuilder(UICBuilder builder)
Description copied from interface: TranslatorInterface
To access the class you are suppost to do internatialisation for here is the builder..

Specified by:
setBuilder in interface TranslatorInterface

i18n

public Representer i18n(Object in)
                 throws IllegalArgumentException
Description copied from interface: TranslatorInterface

The usage of this method (in implementing classes) would be to translate text from the user-interface input file to the output. A simple example is that the implementation of this method will translate 'back' to 'terug' since my dictionairy says that that is the translation for my locale.

Most i18n implementions do the translation of strings at runtime.

Specified by:
i18n in interface TranslatorInterface
Throws:
IllegalArgumentException - this method only takes strings; but since this method will most certainly be used in combination with Hashtable we allow Object to shorten the code.

getButtonText

public Representer getButtonText(Object in)
Description copied from interface: TranslatorInterface
In modern GUIs the '&' in front of a character represents a mnemonic; but should not be visible on buttons; this method returns the string sans the '&'.

Specified by:
getButtonText in interface TranslatorInterface

getMnemonic

public Representer getMnemonic(Object in)
Description copied from interface: TranslatorInterface
In modern GUIs the '&' in front of a character represents a mnemonic; but should not be visible on buttons; this method returns the first character that follows the first '& char.

Specified by:
getMnemonic in interface TranslatorInterface


Copyright © 2002,2003 Thomas Zander Available under the Free Apache licence