uic.output
Interface TranslatorInterface

All Known Implementing Classes:
DummyTranslator, UICTranslator

public interface TranslatorInterface

To enable a translation of a GUI the uic.properites can point to any class that implements this interface to make sure it generates code (Representers actually).


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..
 

Method Detail

setBuilder

public void setBuilder(UICBuilder builder)
To access the class you are suppost to do internatialisation for here is the builder..


i18n

public Representer i18n(Object in)
                 throws IllegalArgumentException

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.

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)
                          throws IllegalArgumentException
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 '&'.

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.

getMnemonic

public Representer getMnemonic(Object in)
                        throws IllegalArgumentException
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.

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.


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