Package com.ms.ui.resource |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public abstract class ResourceDecoder { // Constructors public ResourceDecoder(String filename); public ResourceDecoder(URL url, String filename); public ResourceDecoder(URL url); // Methods public abstract Dialog getDialog(int dlgId); public abstract Dialog getDialog(String dlgname); public int getLocale(); public abstract void setLocale(int locale); public abstract String getString(int strId) throws ResourceFormattingException; public abstract byte[] getBytes(int type, int strId) throws ResourceFormattingException; public abstract byte[] getBytes(int type, String name) throws ResourceFormattingException; public abstract void populateDialog(Dialog dlg, int dlgId, int language); public abstract void populateDialog(Dialog dlg, String dlgname, int language); }
This is an abstract class that reads resources out of a resource file. The format of the file is unspecified and is left to the classes deriving from this class.
public ResourceDecoder(String filename);Creates a new resource decoder based on the file specified.
Parameter Description url The URL base for the resource file. filename The filename base for the resource file.
public ResourceDecoder(URL url, String filename);Creates a new resource decoder based on the URL or file specified.
Parameter Description url The URL base for the resource file. filename The file name base for the resource file.
public ResourceDecoder(URL url);Creates a new resource decoder based on the URL specified.
Parameter Description url The URL base for the resource file.
public abstract byte[] getBytes(int type, int strId) throws ResourceFormattingException;Retrieves a byte block, of the resource type specified, with the given string identifier.
Parameter Description type The resource type of the byte block. strId The string identifier of the byte block.
public abstract byte[] getBytes(int type, String name) throws ResourceFormattingException;Retrieves a byte block, of the resource type specified, with the given name.
Return Value:
Returns the byte array.
Parameter Description type The resource type of the byte block. name The resource name of the byte block.
public abstract Dialog getDialog(int dlgId);Retrieves a dialog box, in the current locale, with the specified dialog identifier.
Parameter Description dlgId The identifier of the dialog resource.
public abstract Dialog getDialog(String dlgname);Retrieves a dialog box, in the current locale, with the specified name.
Parameter Description dlgname The name of the dialog resource.
public int getLocale();Retrieves the current locale.
public abstract String getString(int strId) throws ResourceFormattingException;Retrieves a string resource, with the specified identifier, in the current locale.
Parameter Description strID The identifier of the string resource.
public abstract void populateDialog(Dialog dlg, int dlgId, int language);Fills an existing dialog box with components from a dialog resource using the dialog resource identifier.
Parameter Description dlg The dialog object to populate. dlgid The identifier of the dialog resource containing the components. language The language of the resources to use.
public abstract void populateDialog(Dialog dlg, String dlgname, int language);Fills an existing dialog box with components such as from a dialog resource using the dialog resource name.
Parameter Description dlg The dialog object to populate. dlgname The name of the dialog resource containing the components. language The language to use.
public abstract void setLocale(int locale);Sets the current locale.
Parameter Description locale The locale to be set.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.