Images

All references to icons or other graphics within a UIM document are externalized in a manner similar to normal strings. The Image.properties file (you can include one in each component, if you wish) uses the same format as the string properties files to associate image references with image file names. The image files should be stored in the component's Images sub-folder and can be organized into a folder structure below this folder if desired. Most web browsers will support images in the portable network graphics (PNG) format, the graphics interchange format (GIF), and the joint photographic experts group (JPEG) format.

The Image.properties file simply associates a key with a path to the corresponding image file specified relative to the component folder. A sample of this file is shown below. To use these images, the key is used as the value of the IMAGE attribute on the ACTION_CONTROL element in the UIM page.

Figure 1. A Sample Image.properties File
Button.Ok=Images/ok.gif
Button.Cancel=Images/cancel.gif
MyPage.Title.Icon=Images/bluedot.gif

The entries in the Image.properties file in the core component can be overridden individually or in total by creating an Image.properties file in your custom component and overriding the properties as required. You can override the image files themselves by creating files in your custom component with the same names as the files in the core component.

If you need to localize your images for different languages, you can add several Image.properties files using a different locale code as the file name suffix. See Locales for details on locale code suffixes. Each properties file should define the same keys, but the image files can be different for each locale. If only some of the images need to be localized, the common images can be defined in the default Image.properties file (the one without the locale code suffix) and only properties for the localized images in the other properties files.