ItemLayout is used for representing items from data container in layouts.
ItemLayout offers a way to generate components from data container. Generated components will be displayed in custom layouts such as Grid, Vertical or horizontal.
To achieve that three custom components are available :
ItemGrid - use a gwt Grid to display items - column number can be specify
ItemHorizontal - use a gwt HorizonalPanel to display items - use a custom scroll bar - scroll interval can be specify - first index to display can be specify
ItemVertical (same as Horizontal but on vertical way) - use a gwt VerticalPanel to display items - use a custom scroll bar - scroll interval can be specify - first index to display can be specify
Each component handles single or multi-select items, to do so you just need to add an ItemClickHandler.
Next development :
- Customize scroll buttons for ItemHorizontal and ItemVertical
The original idea came from ItemGrid Addon available on vaadin directory but we need horizontal and vertical layout with custom scrollbar.
To avoid generated items each time container items/properties change, the method canBeGenerated has been added, which should return true if current item has to be re-generated.