Keeps the width of two outer sibling views constant, while stretching the innermost one.
stableborderlayout extends
LzLayout, and is therefore responsible for
arranging a set of views. Unlike like most layouts,
stableborderlayout only manipulates the first
three subviews. All of the other subviews are
ignored. stableborderlayout is very similar to
simplelayout in that it arranges views
vertically or horizontally depending on the axis specified. The
difference is that stableborderlayout stretches
the second view so that the total combined width (or height) of these
three subviews matches the width (or height) of their parent.
The following example demonstrates the differences between
simplelayout and
stableborderlayout.
<canvas height="100">
<view bgcolor="yellow" width="200">
<view bgcolor="blue" height="30" width="50"/>
<view bgcolor="red" height="30" width="50"/>
<view bgcolor="blue" height="30" width="50"/>
<simplelayout axis="x" spacing="10"/>
</view>
<view y="40" bgcolor="yellow" width="200">
<view bgcolor="blue" height="30" width="50"/>
<view bgcolor="red" height="30"/>
<view bgcolor="blue" height="30" width="50"/>
<stableborderlayout axis="x"/>
</view>
</canvas>
Note that there is no spacing parameter allowed in
stableborderlayout. Also, notice that each
parent view has a width of 200. In the top view this information is
ignored, which is why yellow can be seen extending past the last
subview. In the bottom view no yellow can be seen because it is
covered up by the blue and red views. Finally, take note that the
second red view has no width assigned to it, because
stableborderlayout controls that value
directly.
| Attributes | |||||
| Name | Usage | Type (Tag) | Type (JS) | Default | Category |
| axis | Tag & JS | string | String | setter | |
|
The axis in which this layout operates. One of 'x' or 'y'. |
|||||
|
|
|||||
defaultplacement, delegates, locked, subviews, updateDelegate, view.layouts
class, classroot, cloneManager, datapath, id, ignoreAttribute, ignoreplacement, immediateparent, initstage, name, nodeLevel, onconstruct, oninit, parent, placement, subnodes
| update() | ||
| stableborderlayout.update(n) | ||
|
This method is usually only called when the size of the parent changes. This means that stableborderlayout is not really designed for use in situations where the size of the views controlled by the layout changes after init time. However, this method may be called directly to force the layout to update. |
||
| Parameters | ||
| Name | Type | Desc |
| n | Number | unknown - check in review |
|
|
||
addSubview, ignore, lock, releaseLayout, removeSubview, reset, setLayoutOrder, swapSubviewOrder, unlock
animate, applyConstraint, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getAttribute, getOption, getUID, init, lookupSourceLocator, searchImmediateSubnodes, searchSubnodes, setAttribute, setDatapath, setID, setName, setOption
| Events |
Copyright © 2002-2005 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.