Packages
 In this topic

*Constructors

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.awt   Previous This
Package
Next

 


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

Constructors

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.

Win32SystemResourceDecoder

public Win32SystemResourceDecoder(String filename)
        throws FileNotFoundException;

Creates a resource decoder object that attaches to the user specified resource handler.

ParameterDescription
filename The resource handler file that the object attaches to and obtains resources from.

Exceptions:

FileNotFoundException if filename is invalid or cannot be found.

Methods

getBytes

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.

ParameterDescription
type The resource type.
srtId The resource identifier.

Exceptions:

ResourceFormattingException if the resource type or identifier are invalid.

getBytes

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.

ParameterDescription
type The resource type.
name The resource name.

Exceptions:

ResourceFormattingException if the resource type or identifier are invalid.

getDialog

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.

ParameterDescription
dlgId The dialog identifier.

getDialog

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.

ParameterDescription
dlgname The dialog name.

getLocale

public int getLocale();

Retrieves the current locale.

Return Value:

Returns the current locale. Currently, this methods returns 0.

See Also: setLocale

getString

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.

ParameterDescription
strId The identifier of the string resource.

populateDialog

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.

ParameterDescription
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.

populateDialog

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.

ParameterDescription
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.

setLocale

public void setLocale(int locale);

Sets the current locale.

Return Value:

No return value.

ParameterDescription
locale The current locale.

Remarks:

Currently, this method is not implemented.

See Also: getLocale

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.