Class Win32SystemResourceDecoder
public class Win32SystemResourceDecoder extends Win32ResourceDecoder
{
// Constructors
public Win32SystemResourceDecoder() throws FileNotFoundException;
public Win32SystemResourceDecoder(String filename)
throws FileNotFoundException;
// Methods
public byte[] getBytes(int type, int strId)
throws ResourceFormattingException;
public byte[] getBytes(int type, String name)
throws ResourceFormattingException;
public UIDialog getDialog(int dlgId);
public UIDialog getDialog(String dlgname);
public int getLocale();
public String getString(int strId);
public void populateDialog(UIDialog dlg, int dlgId, int language);
public void populateDialog(UIDialog dlg, String dlgname,
int language);
public void setLocale(int locale);
}
This class is used to utilize Win32 system resource (.res) files.
Win32ResourceDecoder
|
+--Win32SystemResourceDecoder
public Win32SystemResourceDecoder() throws FileNotFoundException;
Creates a resource decoder object that attaches to the Microsoft VM for Java resource handler (vmhelper.dll). This is the resource handler the object obtains resources from.
Exceptions:
FileNotFoundException
if vmhelper.dll cannot be found.
public Win32SystemResourceDecoder(String filename)
throws FileNotFoundException;
Creates a resource decoder object that attaches to the user specified resource handler.
Parameter | Description |
filename
| The resource handler file that the object attaches to and obtains resources from.
|
Exceptions:
FileNotFoundException
if filename is invalid or cannot be found.
public byte[] getBytes(int type, int strId)
throws ResourceFormattingException;
Retrieve a byte block of the specified resource type, with the given identifier.
Return Value:
Returns a bytes block that contains the resource type.
Parameter | Description |
type
| The resource type.
|
srtId
| The resource identifier.
|
Exceptions:
ResourceFormattingException
if the resource type or identifier are invalid.
public byte[] getBytes(int type, String name)
throws ResourceFormattingException;
Retrieve a byte block of the specified resource type, with the given name.
Return Value:
Returns a bytes block that contains the resource type.
Parameter | Description |
type
| The resource type.
|
name
| The resource name.
|
Exceptions:
ResourceFormattingException
if the resource type or identifier are invalid.
public UIDialog getDialog(int dlgId);
Retrieves a UIDialog object with the specified dialog identifier from native resources.
Return Value:
Returns a UIDialog object, or null if one could not be created.
Parameter | Description |
dlgId
| The dialog identifier.
|
public UIDialog getDialog(String dlgname);
Retrieves a UIDialog object with the specified name from native resources.
Return Value:
Returns a UIDialog object, or null if one could not be created.
Parameter | Description |
dlgname
| The dialog name.
|
public int getLocale();
Retrieves the current locale.
Return Value:
Returns the current locale. Currently, this methods returns 0.
See Also: setLocale
public String getString(int strId);
Retrieves a string resource with the specified string identifier.
Return Value:
Returns the requested string resource, or null if one could not be created.
Parameter | Description |
strId
| The identifier of the string resource.
|
public void populateDialog(UIDialog dlg, int dlgId, int language);
Fills an existing dialog box, in the current locale with the specified identifier, with the data and/or controls as specified in the resource. This is useful for classes that are derived from UIDialog.
Return Value:
No return value.
Parameter | Description |
dlg
| The dialog object to populate.
|
dlgId
| The identifier of the dialog resource containing the components.
|
language
| The language of the resources.
|
Remarks:
Currently, this method is not implemented.
public void populateDialog(UIDialog dlg, String dlgname, int language);
Fills an existing dialog box, in the current locale with the specified name, with the data and/or controls as specified in the resource. This is useful for classes which are derived from UIDialog.
Return Value:
No return value.
Parameter | Description |
dlg
| The dialog object to populate.
|
dlgname
| The name of the dialog resource containing the components.
|
language
| The language of the resources.
|
Remarks:
Currently, this method is not implemented.
public void setLocale(int locale);
Sets the current locale.
Return Value:
No return value.
Parameter | Description |
locale
| The current locale.
|
Remarks:
Currently, this method is not implemented.
See Also: getLocale