Package com.ms.lang Previous
Previous
Contents
Contents
Index
Index
Next
Next

Class SystemX

Methods , Fields

public final class SystemX {
  // Fields
  public static final int LANG_AFRIKAANS                  = 0x0436 ;
  public static final int LANG_ALBANIAN                   = 0x041c ;
  public static final int LANG_BASQUE                     = 0x042d ;
  public static final int LANG_BULGARIAN                  = 0x0402 ;
  public static final int LANG_BYELORUSSIAN               = 0x0423 ;
  public static final int LANG_CATALAN                    = 0x0403 ;
  public static final int LANG_CHINESE                    = 0x0404 ;
  public static final int SUBLANG_CHINESE_TRADITIONAL     = 0x0404 ;
  public static final int SUBLANG_CHINESE_SIMPLIFIED      = 0x0804 ;
  public static final int SUBLANG_CHINESE_HONGKONG        = 0x0C04 ;
  public static final int SUBLANG_CHINESE_SINGAPORE       = 0x1004 ;
  public static final int LANG_CROATIAN                   = 0x041a ;
  public static final int LANG_CZECH                      = 0x0405 ;
  public static final int LANG_DANISH                     = 0x0406 ;
  public static final int LANG_DUTCH                      = 0x0413 ;
  public static final int SUBLANG_DUTCH_BELGIAN           = 0x0813 ;
  public static final int LANG_ENGLISH                    = 0x0409 ;
  public static final int SUBLANG_ENGLISH_US              = 0x0409 ;
  public static final int SUBLANG_ENGLISH_UK              = 0x0809 ;
  public static final int SUBLANG_ENGLISH_AUS             = 0x0c09 ;
  public static final int SUBLANG_ENGLISH_CAN             = 0x1009 ;
  public static final int SUBLANG_ENGLISH_NZ              = 0x1409 ;
  public static final int SUBLANG_ENGLISH_EIRE            = 0x1809 ;
  public static final int LANG_ESTONIAN                   = 0x0425 ;
  public static final int LANG_FINNISH                    = 0x040b ;
  public static final int LANG_FRENCH                     = 0x040c ;
  public static final int SUBLANG_FRENCH                  = 0x040c ;
  public static final int SUBLANG_FRENCH_BELGIAN          = 0x080c ;
  public static final int SUBLANG_FRENCH_CANADIAN         = 0x0c0c ;
  public static final int SUBLANG_FRENCH_SWISS            = 0x100c ;
  public static final int LANG_GERMAN                     = 0x0407 ;
  public static final int SUBLANG_GERMAN                  = 0x0407 ;
  public static final int SUBLANG_GERMAN_SWISS            = 0x0807 ;
  public static final int SUBLANG_GERMAN_AUSTRIAN         = 0x0c07 ;
  public static final int LANG_GREEK                      = 0x0408 ;
  public static final int LANG_HEBREW                     = 0x040D ;
  public static final int LANG_HUNGARIAN                  = 0x040e ;
  public static final int LANG_ICELANDIC                  = 0x040f ;
  public static final int LANG_INDONESIAN                 = 0x0421 ;
  public static final int LANG_ITALIAN                    = 0x0410 ;
  public static final int SUBLANG_ITALIAN                 = 0x0410 ;
  public static final int SUBLANG_ITALIAN_SWISS           = 0x0810 ;
  public static final int LANG_JAPANESE                   = 0x0411 ;
  public static final int LANG_KOREAN                     = 0x0412 ;
  public static final int LANG_LATVIAN                    = 0x0426 ;
  public static final int LANG_LITHUANIAN                 = 0x0427 ;
  public static final int LANG_NORWEGIAN                  = 0x0414 ;
  public static final int SUBLANG_NORWEGIAN_BOKMAL        = 0x0414 ;
  public static final int SUBLANG_NORWEGIAN_NYNORSK       = 0x0814 ;
  public static final int LANG_POLISH                     = 0x0415 ;
  public static final int LANG_PORTUGUESE                 = 0x0416 ;
  public static final int SUBLANG_PORTUGUESE              = 0x0416 ;
  public static final int SUBLANG_PORTUGUESE_BRAZILIAN    = 0x0816 ;
  public static final int LANG_ROMANIAN                   = 0x0418 ;
  public static final int LANG_RUSSIAN                    = 0x0419 ;
  public static final int LANG_SLOVAK                     = 0x041b ;
  public static final int LANG_SLOVENIAN                  = 0x0424 ;
  public static final int LANG_SORBIAN                    = 0x042e ;
  public static final int LANG_SPANISH                    = 0x040a ;
  public static final int SUBLANG_SPANISH                 = 0x040a ;
  public static final int SUBLANG_SPANISH_MEXICAN         = 0x080a ;
  public static final int SUBLANG_SPANISH_MODERN          = 0x0c0a ;
  public static final int LANG_SWEDISH                    = 0x041d ;
  public static final int LANG_THAI                       = 0x041e ;
  public static final int LANG_TURKISH                    = 0x041f ;
  public static final int LANG_UKRAINIAN                  = 0x0422 ;
  public static final int LANG_ARABIC                     = 0x0401 ;
  // Methods
  public static InputManagerListener getInputManager()
  public static void setInputManager(InputManagerListener imm, boolean retainCurrentList)
  public static InputManagerListener getDefaultInputManager()
  public native static boolean isLocalCharDBCSLeadByte(byte local)
  public native static boolean arrayCompare(Object P[], int pStart, Object Q[], int qStart, int count)
  public static String LocalStringToJavaString( String local )
  public static char[] LocalStringToJavaString( byte B[] )
  public static char[] LocalStringToJavaString( char B[] )
  public static char[] LocalStringToJavaString( byte B[], int off, int len )
  public static char[] LocalStringToJavaString( char B[], int off, int len )
  public static char LocalStringToJavaString( byte local )
  public static byte JavaStringToLocalString( char Uni )
  public static byte[] JavaStringToLocalString( char C[] )
  public static byte[] JavaStringToLocalString( char C[], int off, int len )
  public static int getNumKeyboardLanguages()
  public static int getKeyboardLanguages(int array[])
  public static int [] getKeyboardLanguages()
  public static int getKeyboardLanguage()
  public static String getKeyboardLanguageName(int id)
  public static boolean setKeyboardLanguage( Applet App, int idLanguage )
}

The SystemX class provides system enhancements for extended functionality Currently, the methods in the class are all keyboard/Unicode related. SystemX cannot be instantiated or subclassed because all of the methods and variables are static.


Methods


arrayCompare

public native static boolean arrayCompare(Object P[], int pStart, Object Q[], int qStart, int count)

Compares two arrays.

Return Value:

Returns true if the two arrays are equal. Otherwise, false is returned.

ParameterDescription
P[] The first array to compare.
pStart The start of the first array.
Q[] The second array to compare.
pStart The start of the second array.
count The number of elements to compare.

Exceptions:

nullPointerArray occurs if there are not enough items in the arrays.


getDefaultInputManager

public static InputManagerListener getDefaultInputManager()

Finds the default system input manager.

Return Value:

Returns the default system input manager.


getInputManager

public static InputManagerListener getInputManager()

Retrieves the current input method manager.

Return Value:

Returns null if an input method manager is not running.


getKeyboardLanguage

public static int getKeyboardLanguage()

Retrieves the currently active keyboard language.

Return Value:

Returns the currently active keyboard language.


getKeyboardLanguageName

public static String getKeyboardLanguageName(int id)

Retrieves the keyboard language name.

Return Value:

Returns the name of the language.

ParameterDescription
id Specifies the ID of the keyboard language.


getKeyboardLanguages

public static int getKeyboardLanguages(int array[])

Returns a list of the keyboard languages currently active in the system.

Return Value:

Returns the number of active languages.

ParameterDescription
array[] The list of keyboard language IDs.


getKeyboardLanguages

public static int [] getKeyboardLanguages()

Returns a list of the keyboard languages currently active in the system.

Return Value:

Returns an array containing the active languages.


getNumKeyboardLanguages

public static int getNumKeyboardLanguages()

Finds the number of active keyboard languages in the system.

Return Value:

Returns the number of active keyboard languages in the system.


isLocalCharDBCSLeadByte

public native static boolean isLocalCharDBCSLeadByte(byte local)

Checks if a local code page character is a lead byte for DBCS systems.

Return Value:

Returns true if the local code page is a DBCS code page. Otherwise, returns false.

ParameterDescription
local The local code page character.


JavaStringToLocalString

public static byte JavaStringToLocalString( char Uni )

Converts a Java character to a character in the local code page.

Return Value:

Returns the local code page string.

ParameterDescription
Uni The Java character.


JavaStringToLocalString

public static byte[] JavaStringToLocalString( char C[] )

Converts a char array to a byte array in the local code page.

Return Value:

Returns char[], the local representation of the array.

ParameterDescription
C[] The Java characters string.


JavaStringToLocalString

public static byte[] JavaStringToLocalString( char C[], int off, int len )

Converts a char array to a byte array in the local code page. See LocalStringToJavaString().

Return Value:

Returns char[], the local representation of the array.

ParameterDescription
C[] The Java characters string.
off The starting point within the array.
len The length of the segment to convert.


LocalStringToJavaString

public static String LocalStringToJavaString( String local )

Converts a string from a local code page to Unicode. Java internally uses the Unicode encoding system. Unfortunately, this means more than just using 16-bits per character in the local code page. For example, character (149) in the Windows code page used in America (code page 1252) is a bullet character. This is not true on the Macintosh nor on many Unix systems. So, if you try to hardcode this value, the bullet does not appear correctly on other platforms.

Return Value:

Returns the Unicode representation of the string.

ParameterDescription
local The local code page string.


LocalStringToJavaString

public static char[] LocalStringToJavaString( byte B[] )

Converts a byte array from a local code page to an Unicode-filled char array. Java internally uses the Unicode encoding system. Unfortunately, this means more than just using 16-bits per character in the local code page. See LocalStringToJavaString().

Return Value:

Returns char[], the Unicode representation of the array.

ParameterDescription
B[] The local code page string.


LocalStringToJavaString

public static char[] LocalStringToJavaString( char B[] )

Converts a char array from a local code page to an Unicode-filled char array. Java internally uses the Unicode encoding system. Unfortunately, this means more than just using 16-bits per character in the local code page. See LocalStringToJavaString().

Return Value:

Returns char[], the Unicode representation of the array.

ParameterDescription
B[] The local code page string.


LocalStringToJavaString

public static char[] LocalStringToJavaString( byte B[], int off, int len )

Converts a part of a byte array from a local code page to a Unicode filled char array. Java internally uses the Unicode encoding system. Unfortunately, this means more than just using 16-bits per character in the local code page. See LocalStringToJavaString().

Return Value:

Returns char[], the Unicode representation of the array.

ParameterDescription
B[] The local code page string.
off The starting point within the array.
len The length of the segment to convert.


LocalStringToJavaString

public static char[] LocalStringToJavaString( char B[], int off, int len )

Converts a part of a char array from a local code page to an Unicode-filled char array. Java internally uses the Unicode encoding system. Unfortunately, this means more than just using 16-bits per character in the local code page. See LocalStringToJavaString().

Return Value:

Returns char[], the Unicode representation of the array.

ParameterDescription
B[] The local code page string.
off The starting point within the array.
len The length of the segment to convert.


LocalStringToJavaString

public static char LocalStringToJavaString( byte local )

Converts a byte from a local code page to a Unicode char. Java internally uses the Unicode encoding system. Unfortunately, this means more than just using 16-bits per character in the local code page. See LocalStringToJavaString().

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
local The local code page string.


setInputManager

public static void setInputManager(InputManagerListener imm, boolean retainCurrentList)

Sets a new input method manager. If the desired action is to stop having one, use null as the interface. If the new manager is to inherit the list of IMEs from the old one, set retainCurrentList to true.

ParameterDescription
imm The new input method manager.
retainCurrentList The parameter returns true if the new input method manager inherits the list of IMEs. Otherwise, false is returned.


setKeyboardLanguage

public static boolean setKeyboardLanguage( Applet App, int idLanguage )

Sets a new active keyboard language.

Return Value:

Returns true if the action was successful. Otherwise, false is returned.

ParameterDescription
App The applet to set the language.
idLanguage The language to activate.


Fields

LANG_AFRIKAANS
The Afrikaans language constant.
LANG_ALBANIAN
The Albanian language constant.
LANG_ARABIC
The Arabic language constant.
LANG_BASQUE
The Basque language constant.
LANG_BULGARIAN
The Bulgarian language constant.
LANG_BYELORUSSIAN
The Byelorussian language constant.
LANG_CATALAN
The Catalan language constant.
LANG_CHINESE
The generic Chinese language constant.
LANG_CROATIAN
The Croatian language constant.
LANG_CZECH
The Czech language constant.
LANG_DANISH
The Danish language constant.
LANG_DUTCH
The Dutch language constant.
LANG_ENGLISH
The English language constant.
LANG_ESTONIAN
The Estonian language constant.
LANG_FINNISH
The Finnish language constant.
LANG_FRENCH
The French language constant.
LANG_GERMAN
The German language constant.
LANG_GREEK
The Greek language constant.
LANG_HEBREW
The Hebrew language constant.
LANG_HUNGARIAN
The Hungarian language constant.
LANG_ICELANDIC
The Icelandic language constant.
LANG_INDONESIAN
The Indonesian language constant.
LANG_ITALIAN
The Italian language constant.
LANG_JAPANESE
The Japanese language constant.
LANG_KOREAN
The Korean language constant.
LANG_LATVIAN
The Latvian language constant.
LANG_LITHUANIAN
The Lithuanian language constant.
LANG_NORWEGIAN
The Norwegian language constant.
LANG_POLISH
The Polish language constant.
LANG_PORTUGUESE
The Portuguese language constant.
LANG_ROMANIAN
The Romanian language constant.
LANG_RUSSIAN
The Russian language constant.
LANG_SLOVAK
The Slovakian language constant.
LANG_SLOVENIAN
The Slovenian language constant.
LANG_SORBIAN
The Sorbian language constant.
LANG_SPANISH
The Spanish language constant.
LANG_SWEDISH
The Swedish language constant.
LANG_THAI
The Thai language constant.
LANG_TURKISH
The Turkish language constant.
LANG_UKRAINIAN
The Ukrainian language constant.
SUBLANG_CHINESE_HONGKONG
The Hong Kong Chinese language constant.
SUBLANG_CHINESE_SIMPLIFIED
The Chinese Simplified language constant.
SUBLANG_CHINESE_SINGAPORE
The Singapore Chinese language constant.
SUBLANG_CHINESE_TRADITIONAL
The Traditional Chinese language constant.
SUBLANG_DUTCH_BELGIAN
The Dutch Belgian language constant.
SUBLANG_ENGLISH_AUS
The English Australian language constant.
SUBLANG_ENGLISH_CAN
The English Canadian language constant.
SUBLANG_ENGLISH_EIRE
The English Erie language constant.
SUBLANG_ENGLISH_NZ
The English NZ language constant.
SUBLANG_ENGLISH_UK
The English United Kingdom language constant.
SUBLANG_ENGLISH_US
The US English language constant.
SUBLANG_FRENCH
The French language constant.
SUBLANG_FRENCH_BELGIAN
The French Belgian language constant.
SUBLANG_FRENCH_CANADIAN
The French Canadian language constant.
SUBLANG_FRENCH_SWISS
The French Swiss language constant.
SUBLANG_GERMAN
The German language constant.
SUBLANG_GERMAN_AUSTRIAN
The German Austrian language constant.
SUBLANG_GERMAN_SWISS
The German Swiss language constant.
SUBLANG_ITALIAN
The Italian language constant.
SUBLANG_ITALIAN_SWISS
The Italian Swiss language constant.
SUBLANG_NORWEGIAN_BOKMAL
The Norwegian BOKMAL language constant.
SUBLANG_NORWEGIAN_NYNORSK
The Norwegian NYNORSK language constant.
SUBLANG_PORTUGUESE
The Portuguese language constant.
SUBLANG_PORTUGUESE_BRAZILIAN
The Portuguese Brazilian language constant.
SUBLANG_SPANISH
The Spanish language constant.
SUBLANG_SPANISH_MEXICAN
The Spanish Mexican language constant.
SUBLANG_SPANISH_MODERN
The Spanish Modern language constant.


© 1997 Microsoft Corporation. All rights reserved. Legal Notices.