MockupContainer
A container implementation with automatically generated data.
MockupContainer is a container that implements Container.Indexed and Container.Hierarchical. The contents of the container are automatically generated.
The container allows some parametrisation for the generation of the content: item count, property count, number of children and the delay can be easily changed on the fly. The delay affects the time it takes to retrieve items, or item related attributes (such as the parent and children of an item). A factory class is provided for easier testing.
The generated contents can also be specified by the user by implementing a data set interface. DefaultDataSet and BaconDataSet are included in the package as example implementations. (You can enable bacon mode in the demo with the "bacon" parameter.)
MockupContainer could be used for example in creating quick UI-mockups, or for testing any component that uses a datasource.
Sample code
MockupContainer container = new MockupContainer(); container.setItemCount(10000); container.setPropertyCount(15); container.setNumberOfChildren(200); container.setItemDelay(50); Tree tree = new Tree(); tree.setContainerDataSource(container); Table table = new Table(); table.setContainerDataSource(container);
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Migrated to Vaadin 7 RC2
- Released
- 2013-02-02
- Maturity
- STABLE
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 7.0+
- Vaadin 6.6+ in 0.7.0
- Vaadin 6.2+ in 0.6.1
- Browser
- Browser Independent
MockupContainer - Vaadin Add-on Directory
A container implementation with automatically generated data.Discussion Forum
Source Code
Author Homepage
Issue Tracker
MockupContainer version 0.5
First release
MockupContainer version 0.5.1
getItem() obeys the general contract for containers
MockupContainer version 0.5.2
updated documentation + code cleanup
MockupContainer version 0.6
added MockupFactory for common use cases
MockupContainer version 0.6.1
Compiled project with java 5
MockupContainer version 0.7.0
- fixed NPE when no listeners were added (thanks A.M.)
- fixed bug with identical property ids. Data sets must be able to provide enough unique id's
- tweaked data set handling
- added bacon data set which uses the bacon ipsum as a data source
MockupContainer version 2.0
Migrated to Vaadin 7 RC2