## Developing New Components

Components are defined within component libraries. The UI Designer supports two types of component libraries:

- Eclipse plugins
- Custom component projects

The components shipped with the UI Designer are in an Eclipse plugin project. The designer uses the extension point com.nokia.sdt.component.symbian.componentLibrary to locate plugins containing Symbian components. The com.nokia.sdt.series60.componentlibrary plugin implements this extension point. New plugins can be created in the same manner to expose new components.

Another approach is to use a custom component project. This is an Eclipse project containing one or more components. A key advantage to this approach is that components can easily be developed within your current workspace. Note that custom component projects are not Carbide.c++ projects. They are either simple Eclipse projects or Java projects. These projects do not use the Carbide.c++ build system.

The files pertaining to components are:

- The .component file, for example mylabel.component. These are XML files following the schema defined for components.
- Zero or more .properties files containing user interface strings that should be localized for different languages. These files are named after the component and follow the pattern used for Java localization. If the component file is mylabel.component, then mylabel.properties is the default localization file. The .properties files may be created or omitted as desired, with strings defined where appropriate. For example, a country-specific file could define just a few strings, leaving most to be defined in the language-specific file.
  Strings that correspond to display text in the component file can be localized by prefacing the string with a % character. For example, friendlyName="%friendlyName" would have a corresponding entry in the .properties file, such as friendlyName=My Label.
- Zero or more image files, referenced from the .component file. These may be in PNG, JPEG, GIF, or BMP format.
- Zero or more JavaScript files, referenced from the .component file. They may have any name with a .js extension.