This section describes the attributes that most of the elements have in common.
The backgroundcolor option contains the color that is used as the backgroundcolor of the
element. Currently supported colors are: black, white, green, red, yellow, blue, gray, magenta,
cyan and brown.
The backgroundcolor attribute is set by the setBackground() method of the component.
This attribute indicates whether the font of the element must be bold.
Allowed values are true and false. The font is set by the setFont() method of the component.
This attribute indicates whether the font of the element must be italic.
Allowed values are true and false. The font is set by the setFont() method of the component.
The fontname specifies the name of the font that has to be used for the text in the element.
Due to the differences in fonts on the platforms we only distinct between serif, sansserif
and monospace, which are mapped to Java logical font names Serif, SansSerif and Monospaced.
The font is set by the setFont() method of the component.
The fontsize indicates the size of the font in points that is used for the text of the element.
The font is set by the setFont() method of the component.
The fontunderline indicates whether the text of the element should be underlined. Allowed values are the booleans true and false. This attribute is not supported by Swing.
The foregroundcolor option contains the color that is used as the foregroundcolor of the
element. Currently supported colors are: black, white, green, red, yellow, blue, gray, magenta,
cyan and brown.
The backgroundcolor attribute is set by the setForeground() method of the component.
The id attribute specifies the unique id of the object. The id attribute is required. The value of the id attribute should consist of lowercase characters. The attribute id of the window and application tag is used as class name and should match the file names without the ".xml" extension. For other elements the id attribute is used as the name of the variable which references the component. This private variable is defined in the JFrame subclass (see window), so all event-handling methods are in the scope of all component variables.
If this attribute has the value true then a section for the event code will be created in the codeframework of the window this element is in. The code typed in this section is inserted in the source code file right after the component is created and all attributes are set. Allowed values for this attribute are true and false.
This attribute is not supported in PLUG for Java/Swing.
The popup attribute refers to an existing popup menu that is used as popup menu for the element. The value of this attribute is the value of the id attribute of the popupmenu. A PopupListener object (subclass of MouseListener) is created and registered with the component. If a mouse event occurs which is a popup trigger (i.e. its method isPopupTrigger() returns true), the show() method of the referenced popup menu is invoked.
The position attribute is used to specify the position of the element when the layout style of the parent is the borderlayout. It can have the following values: left, right, top, bottom and center. The default value is center. The position attribute is ignored when the element's parent doesn't have a border layout. For more information on the layout click here.
The state attribute indicates whether the element is enabled or disabled in the gui.
The default value is enabled.
The state is set by the setEnabled() method of the component.