super.construct( view , args );
this.resetDelegate = new LzDelegate( this , "reset");
this.heldSubs = new Object;
if ( args[ 'releaseview' ] != null ){
this.heldSubs[ view[args.releaseview].getUID() ] = false;
}
if ( args[ 'release' ] != null ){
this.heldSubs[ args.release.getUID() ] = false;
}
this.axis = a;
this.sizeAxis = a == "x" ? "width" : "height"
this.updateDelegate.register( this.immediateparent , "on" + this.sizeAxis);
//right now if a held subview is resized, the layout will
//not do the right thing automatically
//should register a delegate
this.heldSubs[ subview.getUID() ] = true;
this.reset();
this.heldSubs[ subview.getUID() ] = false;
this.reset();
A layout with fixed and stretchable views.
resizelayout extends <layout>, and therefore is responsible
for arranging a set of views. Like simplelayout, resizelayout positions a set of views vertically or horizontally
depending on the axis specified. The difference is that resizelayout can also stretch views.
]]>
This example is similar to the one used in <stableborderlayout>, and is in
fact visually equivalent. This is because <stableborderlayout> is a special case
of resizelayout that is optimized for the common occurrence of having two fixed views with one stretchable view between them.
Unlike <stableborderlayout>, resizelayout works
with any number of views. All the views that are controlled by a resizelayout are assumed to be fixed size until defined differently.
A view is defined as stretchable using the attribute options="releasetolayout". These views will stretch to fill in the space that is not
taken by the fixed views. The resizelayout uses the width (or height) of its view to determine the total amount of space to fill, and
then those subviews are placed and stretched to fill that space. If there is more than one subview that is stretchable, then the available space is split
evenly between those subviews.
Then next example demonstrates what happens when two views are stretchable. The difference between the top and bottom views is only the spacing attribute.
]]>