Component design
The main motif behind designing the SMAF UI components was to create low-level, highly re-purposable building blocks that can be structured to achieve higher level, more complex UI components or functionality. As you will see some of the higher level SMAF components even build on the lower level ones such as box, textblock or composer.
Available components
Here are the UI components available in SMAF by default.
| Component | Description | Package | Full Class Name |
|---|---|---|---|
| asset | Loads image and swf assets. | load | com.samplemath.load.Asset |
| box | Rectangle shape. | shape | com.samplemath.shape.Box |
| button | Skinable button. | input | com.samplemath.input.Button |
| composer | Contains all other UI components. | composition | com.samplemath.composition.Composer |
| dropdown | Dropdown selector. | input | com.samplemath.input.DropDown |
| inputfield | Text input field. | input | com.samplemath.input.InputField |
| listbox | List box selector. | input | com.samplemath.input.ListBox |
| textblock | Component for rendering text. | text | com.samplemath.text.TextBlock |
| toggle | Skinable checkbox. | input | com.samplemath.input.Toggle |
| videobox | Component for rendering video. | video | com.samplemath.video.VideoBox |
Extending components
The framework offers the ability to extend any existing component as well as to create new ones. If these additional components are properly implemented with SMAF they can then be used via SMXML.
To create a custom component for SMAF start with extending the AComposable abstract class. You will also want to register your component class with ComponentReference.
There are no comments on this page. [Add comment]