BorderedBox.lzx
<library>
<class name="BorderedBox" extends="view" defaultplacement="inner">
<attribute name="borderSize" type="number" value="3
"/>
<attribute name="borderColor" type="color" value="#000000
"/>
<attribute name="inset" type="number" value="3
"/>
<attribute name="innerWidth" type="number" value="${this.border.inner.width}"/>
<attribute name="innerHeight" type="number" value="${this.border.inner.height}"/>
<handler name="oninit">
this.border.setAttribute('bgcolor', this.bgcolor);
this.setAttribute('bgcolor', this.borderColor);
</handler>
<view name="border" x="${classroot.borderSize}" y="${classroot.borderSize}" width="${classroot.width-classroot.borderSize * 2}" height="${classroot.height-classroot.borderSize*2}">
<view name="inner" x="${classroot.inset}" y="${classroot.inset}" width="${parent.width-classroot.inset*2}" height="${parent.height-classroot.inset*2}" clip="true"/>
</view>
</class>
</library>