WeeLayout - Vaadin Add-on Directory
"The little layout that could". Efficient layout with great capabilities, trying to deprecate Vertical and HorizontalLayout.WeeLayout aims to deprecate the core Vertical and HorizontalLayouts. Maybe not completely, but for most cases at least.
The "wee" tries to convey the sense of "the little layout that could", meaning it is quite lightweight but still capable of great feats.
WeeLayout lays out components in two directions, vertical and horizontal.
Normal component alignments are supported (everything from top-left to bottom-right).
It supports component expansion, meaning that relative sized components can occupy the "remaining space" (space left over from static size components) of the layout. This works in a bit different fashion than with the core layouts: there is no expand ratio that you specify, instead the component's relative size is used as the expand ratio. So if you have two 50% sized components in the layout, they will together fill all the remaining space of the layout.
WeeLayout also supports relative sizes inside undefined sized layouts. So you can specify all your components to be 100% wide, and the width of the layout will be determined by the widest component inside the layout. This feature is triggered with a special API, setSmartRelativeSizes(true).
The client-side implementation should be quite more efficient than the core layouts, since all alignment calculations are left for the browser, and are not calculated with JavaScript.
The layout supports CSS margins, borders and paddings. Contained components can also specify margins freely.
Layout click listeners are also supported.
Limited caption support is currently implemented.
DEPENDENCIES:
-CSS Tools 0.2 is required when compiling this add-on - http://vaadin.com/addon/css-tools
Future improvements:
- Full IE6-7 support (not properly tested currently)
- Full captions support: icon, error indicator, description
- Min/max-width/height
Discussion ForumIssue Tracker
Source Code
CSS Tools add-on
Author Homepage
WeeLayout version 0.2.1
-Layout click listener support added.
-Arbitrary CSS margin, border and padding support added.
-Fixed a bug that would cause the contained component sizes not to be updated after a cached update for the layout.
-Compiled with Java 1.5
WeeLayout version 0.2.2
WeeLayoutWidgetset.gwt.xml corrected, now compiles all targets instead only "safari". Otherwise the same release as 0.2.1