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

Class SystemX

Methods , Fields

public final class SystemX
{
	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.


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 The local codepage character.


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 the local codepage string

Remarks:

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 codepage used in America (codepage 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 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 char array.

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
B The local codepage string.


LocalStringToJavaString

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

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

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
B The local codepage string.


LocalStringToJavaString

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

Converts a part of a byte array from a local codepage to a Unicode filled char array.

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
B The local codepage string
off Starting point within the array to convert.
len 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 codepage to a Unicode filled char array.

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
B The local codepage string.
off Starting point within the array to convert.
len Length of the segment to convert.


LocalStringToJavaString

public static char LocalStringToJavaString( byte local )

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

Return Value:

Returns the Unicode representation of the array.

ParameterDescription
local The local codepage string.


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
local The Java character.


JavaStringToLocalString

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

Converts a char array to a byte array in the local codepage.

Return Value:

Returns that character array the local representation of the array.

ParameterDescription
B The Java character string.


JavaStringToLocalString

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

Converts a char array to a byte array in the local codepage.

Return Value:

Returns the local representation of the array.

ParameterDescription
B The Java character string.
off Starting point within the array to convert.
len Length of the segment to convert.


getNumKeyboardLanguages

int getNumKeyboardLanguages() 

Find the number of active keyboard languages in the system.

Return Value:

Returns the number of active keyboard languages.


getKeyboardLanguages

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 array to receives a list of keyboard language identifiers. Each identifier value matches one of the LANG_ and SUBLANG_ field values.


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.


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) 

Gets the keyboard language name.

Return Value:

Returns the name of the language.

ParameterDescription
name The id of the language.


setKeyboardLanguage

boolean setKeyboardLanguage( Applet App, int idLanguage ) 

Set 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 The language to activate. Can be one of values given by the LANG_ and SUBLANG_ fields.


Fields

LANG_AFRIKAANS = 0x0436 ;
The Afrikaans language constant.
LANG_ALBANIAN = 0x041c ;
The Albanian language constant.
LANG_BASQUE = 0x042d ;
The Basque language constant.
LANG_BULGARIAN = 0x0402 ;
The Bulgarian language constant.
LANG_BYELORUSSIAN = 0x0423 ;
The Byelorussian language constant.
LANG_CATALAN = 0x0403 ;
The 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)
SUBLANG_CHINESE_HONGKONG = 0x0C04 ;
Chinese (Hong Kong)
SUBLANG_CHINESE_SINGAPORE = 0x1004 ;
Chinese (Singapore)
LANG_CROATIAN = 0x041a ;
LANG_CZECH = 0x0405 ;
LANG_DANISH = 0x0406 ;
LANG_DUTCH = 0x0413 ;
Generic Dutch language constant.
SUBLANG_DUTCH_BELGIAN = 0x0813 ;
Dutch (Belgian)
LANG_ENGLISH = 0x0409 ;
Generic English language constant.
SUBLANG_ENGLISH_US = 0x0409 ;
English (USA)
SUBLANG_ENGLISH_UK = 0x0809 ;
English (UK)
SUBLANG_ENGLISH_AUS = 0x0c09 ;
English (Australian)
SUBLANG_ENGLISH_CAN = 0x1009 ;
English (Canadian)
SUBLANG_ENGLISH_NZ = 0x1409 ;
English (New Zealand)
SUBLANG_ENGLISH_EIRE = 0x1809 ;
English (Irish)
LANG_ESTONIAN = 0x0425 ;
LANG_FINNISH = 0x040b ;
LANG_FRENCH = 0x040c ;
Generic French language constant.
SUBLANG_FRENCH = 0x040c ;
French
SUBLANG_FRENCH_BELGIAN = 0x080c ;
French (Belgian)
SUBLANG_FRENCH_CANADIAN = 0x0c0c ;
French (Canadian)
SUBLANG_FRENCH_SWISS = 0x100c ;
French (Swiss)
LANG_GERMAN = 0x0407 ;
SUBLANG_GERMAN = 0x0407 ;
German
SUBLANG_GERMAN_SWISS = 0x0807 ;
German (Swiss)
SUBLANG_GERMAN_AUSTRIAN = 0x0c07 ;
German (Austrian)
LANG_GREEK = 0x0408 ;
LANG_HEBREW = 0x040D ;
LANG_HUNGARIAN = 0x040e ;
LANG_ICELANDIC = 0x040f ;
LANG_INDONESIAN = 0x0421 ;
LANG_ITALIAN = 0x0410 ;
Generic Italian language constant.
SUBLANG_ITALIAN = 0x0410 ;
Italian
SUBLANG_ITALIAN_SWISS = 0x0810 ;
Italian (Swiss)
LANG_JAPANESE = 0x0411 ;
LANG_KOREAN = 0x0412 ;
LANG_LATVIAN = 0x0426 ;
LANG_LITHUANIAN = 0x0427 ;
LANG_NORWEGIAN = 0x0414 ;
Generic Norwegian language constant.
SUBLANG_NORWEGIAN_BOKMAL = 0x0414 ;
Norwegian (Bokmal)
SUBLANG_NORWEGIAN_NYNORSK = 0x0814 ;
Norwegian (Nynorsk)
LANG_POLISH = 0x0415 ;
LANG_PORTUGUESE = 0x0416 ;
Generic Portuguese language constant.
SUBLANG_PORTUGUESE = 0x0416 ;
Portuguese
SUBLANG_PORTUGUESE_BRAZILIAN = 0x0816 ;
Portuguese (Brazilian)
LANG_ROMANIAN = 0x0418 ;
LANG_RUSSIAN = 0x0419 ;
LANG_SLOVAK = 0x041b ;
LANG_SLOVENIAN = 0x0424 ;
LANG_SORBIAN = 0x042e ;
LANG_SPANISH = 0x040a ;
Generic Spanish language constant.
SUBLANG_SPANISH = 0x040a ;
Spanish (Castilian)
SUBLANG_SPANISH_MEXICAN = 0x080a ;
Spanish (Mexican)
SUBLANG_SPANISH_MODERN = 0x0c0a ;
Spanish (Modern)
LANG_SWEDISH = 0x041d ;
LANG_THAI = 0x041e ;
LANG_TURKISH = 0x041f ;
LANG_UKRAINIAN = 0x0422 ;
LANG_ARABIC = 0x0401 ;

See also Class SystemX.

Top© 1996 Microsoft Corporation. All rights reserved.