In this tutorial, widget means "window gadget."
In EGL Rich UI, a widget is a reusable user interface component such
as a button, a text input field, or a box. The elements in your target
Web page are all widgets in the standard Rich UI palette.
In
EGL,
properties describe the behavior of elements in
a program. A property is a name-value pair; in the code, the properties
are enclosed in braces:
outerBox com.ibm.egl.rui.widgets.Box{ padding=8,
children = [ upperBox, lowerBox ],
columns = 1 };
In this example, padding, children,
and columns are properties.
All widgets
have properties, though the properties that are available depend on
the specific widget. This tutorial uses the following properties that
are associated with a box widget:
- backgroundColor
- Specifies a color to be applied to the background of a box.
- borderColor
- Specifies a color for a decorative border around the box.
- borderStyle
- Specifies the shape of the border.
- borderWidth
- Specifies the width of the decorative border, in pixels.
- children
- Lists all of the elements that appear inside the box. This might
include buttons, text, entry fields, or other boxes.
- class
- References a class in a cascading style sheet (CSS) that determines
the formatting of elements within the box, such as the style of a
font.
- columns
- Specifies the number of columns that divide the box, as an integer.
You use columns to align elements.
- padding
- Specifies a distance, in pixels, between the contents and the
border of a box.
Other properties specify further information
about the box, such as:
- its location
- its ID
- its visibility