Package com.ms.lang Previous
Previous
Microsoft Packages
Microsoft Packages
Index
Index
Next
Next

Class SystemX

Fields , Methods

public final class SystemX
{
	//Fields 
	public static final int LANG_AFRIKAANS;
	public static final int LANG_ALBANIAN;
	public static final int LANG_BASQUE;
	public static final int LANG_BULGARIAN;
	public static final int LANG_BYELORUSSIAN;
	public static final int LANG_CATALAN;
	public static final int LANG_CHINESE;
	public static final int SUBLANG_CHINESE_TRADITIONAL;
	public static final int SUBLANG_CHINESE_SIMPLIFIED;
	public static final int SUBLANG_CHINESE_HONGKONG;
	public static final int SUBLANG_CHINESE_SINGAPORE;
	public static final int LANG_CROATIAN; 
	public static final int LANG_CZECH;
	public static final int LANG_DANISH;
	public static final int LANG_DUTCH;
	public static final int SUBLANG_DUTCH_BELGIAN;
	public static final int LANG_ENGLISH;
	public static final int SUBLANG_ENGLISH_US;
	public static final int SUBLANG_ENGLISH_UK;
	public static final int SUBLANG_ENGLISH_AUS;
	public static final int SUBLANG_ENGLISH_CAN;
	public static final int SUBLANG_ENGLISH_NZ;
	public static final int SUBLANG_ENGLISH_EIRE;
	public static final int LANG_ESTONIAN;
	public static final int LANG_FINNISH;
	public static final int LANG_FRENCH;
	public static final int SUBLANG_FRENCH;
	public static final int SUBLANG_FRENCH_BELGIAN;
	public static final int SUBLANG_FRENCH_CANADIAN;
	public static final int SUBLANG_FRENCH_SWISS;
	public static final int LANG_GERMAN;
	public static final int SUBLANG_GERMAN;
	public static final int SUBLANG_GERMAN_SWISS;
	public static final int SUBLANG_GERMAN_AUSTRIAN;
	public static final int LANG_GREEK;
	public static final int LANG_HEBREW;
	public static final int LANG_HUNGARIAN;
	public static final int LANG_ICELANDIC;
	public static final int LANG_INDONESIAN;
	public static final int LANG_ITALIAN;
	public static final int SUBLANG_ITALIAN;
	public static final int SUBLANG_ITALIAN_SWISS;
	public static final int LANG_JAPANESE;
	public static final int LANG_KOREAN;
	public static final int LANG_LATVIAN;
	public static final int LANG_LITHUANIAN;
	public static final int LANG_NORWEGIAN;
	public static final int SUBLANG_NORWEGIAN_BOKMAL;
	public static final int SUBLANG_NORWEGIAN_NYNORSK;
	public static final int LANG_POLISH;
	public static final int LANG_PORTUGUESE;
	public static final int SUBLANG_PORTUGUESE;
	public static final int SUBLANG_PORTUGUESE_BRAZILIAN;
	public static final int LANG_ROMANIAN;
	public static final int LANG_RUSSIAN;
	public static final int LANG_SLOVAK;
	public static final int LANG_SLOVENIAN;
	public static final int LANG_SORBIAN;
	public static final int LANG_SPANISH;
	public static final int SUBLANG_SPANISH;
	public static final int SUBLANG_SPANISH_MEXICAN;
	public static final int SUBLANG_SPANISH_MODERN;
	public static final int LANG_SWEDISH;
	public static final int LANG_THAI;
	public static final int LANG_TURKISH;
	public static final int LANG_UKRAINIAN;
	public static final int LANG_ARABIC;

	// Methods
	public native static boolean isLocalCharDBCSLeadByte(byte local);
	public static String LocalStringToJavaString( String 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 char LocalStringToJavaString( byte local );
	public static char[] LocalStringToJavaString( byte B[] );
	public static char[] LocalStringToJavaString( byte B[], int off, int len );
	public static char[] LocalStringToJavaString( char B[] );
	public static char[] LocalStringToJavaString( char B[], 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 ) 

This class provides system enhancements for extended functionality. The methods in the class are all keyboard and Unicode related.

This class cannot be instantiated or subclassed; all of the methods and variables are static.


Fields

LANG_AFRIKAANS = 0x0436 ;
Afrikaans language constant.
LANG_ALBANIAN = 0x041c ;
Albanian language constant.
LANG_BASQUE = 0x042d ;
Basque language constant.
LANG_BULGARIAN = 0x0402 ;
Bulgarian language constant.
LANG_BYELORUSSIAN = 0x0423 ;
Byelorussian language constant.
LANG_CATALAN = 0x0403 ;
Catalan language constant.
LANG_CHINESE = 0x0404 ;
Generic Chinese language constant.
SUBLANG_CHINESE_TRADITIONAL = 0x0404 ;
Traditional Chinese (Taiwan) language constant.
SUBLANG_CHINESE_SIMPLIFIED = 0x0804 ;
Chinese (People's Republic China) language constant.
SUBLANG_CHINESE_HONGKONG = 0x0C04 ;
Chinese (Hong Kong) language constant.
SUBLANG_CHINESE_SINGAPORE = 0x1004 ;
Chinese (Singapore) language constant.
LANG_CROATIAN = 0x041a ;
Croatian language constant.
LANG_CZECH = 0x0405 ;
Czech language constant.
LANG_DANISH = 0x0406 ;
Danish language constant.
LANG_DUTCH = 0x0413 ;
Generic Dutch language constant.
SUBLANG_DUTCH_BELGIAN = 0x0813 ;
Dutch (Belgian) language constant.
LANG_ENGLISH = 0x0409 ;
Generic English language constant.
SUBLANG_ENGLISH_US = 0x0409 ;
English (USA) language constant.
SUBLANG_ENGLISH_UK = 0x0809 ;
English (UK) language constant.
SUBLANG_ENGLISH_AUS = 0x0c09 ;
English (Australian) language constant.
SUBLANG_ENGLISH_CAN = 0x1009 ;
English (Canadian) language constant.
SUBLANG_ENGLISH_NZ = 0x1409 ;
English (New Zealand) language constant.
SUBLANG_ENGLISH_EIRE = 0x1809 ;
English (Irish) language constant.
LANG_ESTONIAN = 0x0425 ;
Estonian language constant.
LANG_FINNISH = 0x040b ;
Finnish language constant.
LANG_FRENCH = 0x040c ;
Generic French language constant.
SUBLANG_FRENCH = 0x040c ;
French (France) language constant.
SUBLANG_FRENCH_BELGIAN = 0x080c ;
French (Belgian) language constant.
SUBLANG_FRENCH_CANADIAN = 0x0c0c ;
French (Canadian) language constant.
SUBLANG_FRENCH_SWISS = 0x100c ;
French (Swiss) language constant.
LANG_GERMAN = 0x0407 ;
Generic German language constant.
SUBLANG_GERMAN = 0x0407 ;
German (Germany) language constant.
SUBLANG_GERMAN_SWISS = 0x0807 ;
German (Swiss) language constant.
SUBLANG_GERMAN_AUSTRIAN = 0x0c07 ;
German (Austrian) language constant.
LANG_GREEK = 0x0408 ;
Greek language constant.
LANG_HEBREW = 0x040D ;
Hebrew language constant.
LANG_HUNGARIAN = 0x040e ;
Hungarian language constant.
LANG_ICELANDIC = 0x040f ;
Icelandic language constant.
LANG_INDONESIAN = 0x0421 ;
Indonesian language constant.
LANG_ITALIAN = 0x0410 ;
Generic Italian language constant.
SUBLANG_ITALIAN = 0x0410 ;
Italian (Italy) language constant.
SUBLANG_ITALIAN_SWISS = 0x0810 ;
Italian (Swiss) language constant.
LANG_JAPANESE = 0x0411 ;
Japanese language constant.
LANG_KOREAN = 0x0412 ;
Korean language constant.
LANG_LATVIAN = 0x0426 ;
Latvian language constant.
LANG_LITHUANIAN = 0x0427 ;
Lithuanian language constant.
LANG_NORWEGIAN = 0x0414 ;
Generic Norwegian language constant.
SUBLANG_NORWEGIAN_BOKMAL = 0x0414 ;
Norwegian (Bokmal) language constant.
SUBLANG_NORWEGIAN_NYNORSK = 0x0814 ;
Norwegian (Nynorsk) language constant.
LANG_POLISH = 0x0415 ;
Polish language constant.
LANG_PORTUGUESE = 0x0416 ;
Generic Portuguese language constant.
SUBLANG_PORTUGUESE = 0x0416 ;
Portuguese (Portugal) language constant.
SUBLANG_PORTUGUESE_BRAZILIAN = 0x0816 ;
Portuguese (Brazilian) language constant.
LANG_ROMANIAN = 0x0418 ;
Romanian language constant.
LANG_RUSSIAN = 0x0419 ;
Russian language constant.
LANG_SLOVAK = 0x041b ;
Slovak language constant.
LANG_SLOVENIAN = 0x0424 ;
Slovenian language constant.
LANG_SORBIAN = 0x042e ;
Sorbian language constant.
LANG_SPANISH = 0x040a ;
Generic Spanish language constant.
SUBLANG_SPANISH = 0x040a ;
Spanish (Castilian) language constant.
SUBLANG_SPANISH_MEXICAN = 0x080a ;
Spanish (Mexican) language constant.
SUBLANG_SPANISH_MODERN = 0x0c0a ;
Spanish (Modern) language constant.
LANG_SWEDISH = 0x041d ;
Swedish language constant.
LANG_THAI = 0x041e ;
Thai language constant.
LANG_TURKISH = 0x041f ;
Turkish language constant.
LANG_UKRAINIAN = 0x0422 ;
Ukrainian language constant.
LANG_ARABIC = 0x0401 ;
Arabic language constant.

See also Class SystemX.


Methods


isLocalCharDBCSLeadByte

public native static boolean isLocalCharDBCSLeadByte(byte local);

Checks whether a local-codepage character is a lead byte for DBCS systems. This can only return true if the local codepage is a DBCS codepage.

Return Value:

Returns true or false.

ParameterDescription
local Local codepage character to be checked.


LocalStringToJavaString

String LocalStringToJavaString( String local )

Converts a string from a local codepage to Unicode.

Return Value:

Returns the Unicode representation of the string.

ParameterDescription
local Local codepage string to be converted.

Remarks:

Java internally uses the Unicode encoding system. Unfortunately, this means more than just using 16-bits per character in the local codepage. For example, character (149) in the Microsoft® Windows® codepage used in America (codepage 1252) is a bullet character. This is not true on the Macintosh and many Unix systems. If you try to hard-code this value in Windows, the bullet will not appear correctly on other platforms.


LocalStringToJavaString

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

Converts a byte array from a local codepage to a Unicode-filled character array.

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
B Local codepage string to be converted.


LocalStringToJavaString

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

Converts a character array from a local codepage to a Unicode-filled character array. Java internally uses the Unicode encoding system.

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
B Local codepage string to be converted.


LocalStringToJavaString

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

Converts a segment of a byte array from a local codepage to a Unicode-filled array.

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
B Local codepage string containing the segment to be converted.
off Starting point of the segment to be converted.
len Length of the segment to be converted.


LocalStringToJavaString

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

Converts a segment of a character array from a local codepage to a Unicode-filled character array.

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
B Local codepage string containing the segment to be converted.
off Starting point of the segment to be converted.
len Length of the segment to be converted.


LocalStringToJavaString

public static char LocalStringToJavaString( byte local )

Converts a byte from a local codepage to a Unicode character array.

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
local Local codepage string to be converted.


JavaStringToLocalString

public static byte JavaStringToLocalString( char Uni )

Converts a Java character to a character in the local codepage.

Return Value:

Returns the local codepage character.

ParameterDescription
Uni Java character to be converted.


JavaStringToLocalString

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

Converts a Java character array to a byte array in the local codepage.

Return Value:

Returns the local representation of the array.

ParameterDescription
C Java character string to be converted.


JavaStringToLocalString

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

Converts a Java character array to a byte array in the local codepage.

Return Value:

Returns the local representation of the array.

ParameterDescription
C Java character string to be converted.
off Starting point of the segment to be converted.
len Length of the segment to be converted.


getNumKeyboardLanguages

int getNumKeyboardLanguages() 

Retrieves the number of active keyboard languages in the system.

Return Value:

Returns the number of active keyboard languages.


getKeyboardLanguages

int getKeyboardLanguages(int array[]) 

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

Return Value:

Returns the number of active languages.

ParameterDescription
array Array to receive a list of keyboard language identifiers. Each identifier can be one of the LANG_ and SUBLANG_ field values.


getKeyboardLanguages

public static int [] getKeyboardLanguages()

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

Return Value:

Returns an array containing the active languages.


getKeyboardLanguage

int getKeyboardLanguage() 

Gets the currently active keyboard language.

Return Value:

Returns a value matching one of the LANG_ or SUBLANG_ fields.


getKeyboardLanguageName

public static String getKeyboardLanguageName(int id) 

Retrieves the keyboard language name.

Return Value:

Returns the name of the language.

ParameterDescription
id Identifier of the language.


setKeyboardLanguage

boolean setKeyboardLanguage( Applet App, int idLanguage ) 

Sets a new active keyboard language.

Return Value:

True if the action was successful, false otherwise.

ParameterDescription
App The Applet to set the language for.
idLanguage Identifier of the language to activate. Can be one of the LANG_ and SUBLANG_ field values.



Top© 1997 Microsoft Corporation. All rights reserved. Terms of Use.