Package guk

This package is used to add Unicode handling capabilities to any Java application.

See:
          Description

Class Summary
Editor A simple text editor included here to demonstrate the capabilities of the GUK package.
Editor_AboutBox  
 

Package guk Description

This package is used to add Unicode handling capabilities to any Java application. It has been first designed as part of the Gate2 project and the name GUK stands for "Gate Unicode Kit". By "Unicode handling capabilities" we mean the ability to display Unicode text and the one of taking input in an arbitrary language. All the classes that are useful for the users of the GUK package are in the root package. There is one additional package, guk.im that handles unicode input methods. Some sample code on how to use this package has been included in the Editor class which is an implementation of a simple Unicode enabled text editor.

Using GUK

Installing GUK

If used only for displaying text GUK has no special requirements, however if the use of the provided input methods is desired than GUK has to be installed as an instaled JVM extension (a jar in the <path to jdk>/jre/lib/ext directory.

Displaying text

In the root of the guk package there are some Unicode enabled implementations available for various subclasses of JTextComponent. For the simpler cases such as JLabel or JButton there is usually a new implementation for the respective UI that can be used by simply setting an object of that type as the UI for the component (see JTextComponent.setUI(javax.swing.plaf.TextUI)), while in other cases (e.g. JTextPane) there are more complicated solutions. Please see the documentation for the respective classes for more detailed information.

Handling input

The user (programmer in this case) doesn't need to do anything special to take advantage of the Gate input method which allows Unicode input. All that is needed is proper installation of the package as an "Installed JVM extension". (see installation above). When GUK is properly installed any Java application run in that JVM should have an additional sub-menu in the system menu (the one started by clicking the application's icon, usually in the top left corner of the window) saying "Select Input Method". The functionality of the Gate Input Method is available through that menu. The only useful option that is only available through and API is the choice of displaying or not the virtual keyboard map (see GateIM.setMapVisible(boolean)).

Known bugs and limitations