Java Gui Builder |
|
You are here: | Home > Documentation > JGB Elements Documentation > Constraints Element |
Group membership: Layout control
constraints elements describe constraints used when adding components to a container. When constraints elements are encountered, JGB saves the constraints' value ( ref, constant, value, return or gridbag) until such a time it will add a component.
At that time, JGB will get the current constraints and pass the saved object reference to the container's add(Component, Object) method.
The current constraints are cleared whenever the current window ends (when JGB encounters a closing window element), or when the reset attribute contains true.
Name | Type | Required | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
reset | CDATA | No |
Instructs JGB to forget any references to the current constraints so that the next component additions will be done constraints-less. Literal values
|
… <layout class="java.awt.BorderLayout"/> <constraints> <constant name="java.awt.BorderLayout.NORTH"/> </constraints> <!-- Insert a control into the parent container which is laid out using a BorderLayout class. --> <control …/> <!-- Reset the constraints so that there are none anymore --> <constraints reset="true"/> <!-- This control will be added without constraints to the parent container --> <control …/> … <layout/>
Hosted on SourceForge.net |
Valid XHTML 1.0 ! |
Valid CSS ! |
Code Coverage provided by Clover |