border - shannah/CodeRAD GitHub Wiki
A Container that uses BorderLayout as its layout manager. An alias for <container layout="new BorderLayout()">
.
<border>
<button layout-constraint="north">North button</button>
<button layout-constraint="south">South button</button>
<button layout-constraint="east">East button</button>
<button layout-constraint="west">West button</button>
<button layout-constraint="center">Center Button</button>
</border>
Note
|
All child components of a <border> tag must include the layout-constraint attribute with a value of north, south, _east, west, or center. If the layout-constraint value is prefixed with java:, then you can also provide a Java expression whose result will be used as the constraint.
|
The following example includes two <border>
tags. One as the root view of the form, and the other embedded inside the center
of the root. The embedded <border>
tag demonstrates the use of the java: prefix for the layout-constraint parameter that will allow you to specify the layout-constraint using a Java expression, rather than a literal.
<?xml version="1.0"?>
<border safeArea="true" xsi:noNamespaceSchemaLocation="BorderLayoutSample.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<title>BorderLayout Sample</title>
<button layout-constraint="north">North button</button>
<button layout-constraint="south">South button</button>
<button layout-constraint="east">East button</button>
<button layout-constraint="west">West button</button>
<border layout-constraint="center">
<button layout-constraint="java:BorderLayout.NORTH">Center < North</button>
<button layout-constraint="java:BorderLayout.SOUTH">Center < South</button>
</border>
</border>
![BorderLayoutSample2](https://github.com/shannah/CodeRAD/wiki/images/BorderLayoutSample2.png)