PortalLayout
Display your components in a web-portal style!
PortalLayout is yet another implementation of Vaadin layout. Shortly speaking, all the components you add there are wrapped in the portlets with some fancy functionality built-in (e.g drag and drop and collapsing).
What is offered:
- No need to settle up DnD functionality.
- Communication between portals:
- Make whatever complex UI, bundle its parts with portals.
- Add portlets.
- Drag portlets from one portal to the other easily!
- If needed, make one of your portals not communicative with others - it will neither accept portlets from outer space, nor let its contents go.
- Dragging by the portlet headers.
- Customizable positioner highlights the target drop area.
- Various properties of the portlets (can be set from the server side):
- Close ability.
- Collapse ability.
- Collapse state.
- Lock state (make it not draggable if needed).
- Caption.
- Supports both fixed and relative heights. Here relative height in percents stands for the percent of free space the portlet will consume.
- Supports spacing and margins.
- The width of the portlets is always 100%.
- Customize portlet headers, positioners and controls styles.
- Action buttons in the headers.
- Listeners for the collapse and close events.
- Full caption support.
- Animations for collapse and close events.
- Vaadin components in the headers.
- Custom styles for the portlets.
The project is still in the phase of the development. I would highly appreciate all the bug reports, suggestions, ideas and user experience.
Sample code
final Panel panel = new Panel(); panel.setSizeFull(); panel.getContent().setWidth("100%"); for (int i = 0; i < 5; ++i) { final PortalLayout portal = new PortalLayout(); TextArea tx = new TextArea(); tx.setSizeFull(); portal.addComponent(tx); tx.setCaption("Text Area"); } layout.addComponent(panel);
videoPortal.addComponent(pl); videoPortal.setComponentCaption(pl, "Joy Division - Disorder"); videoPortal.addAction(pl, new ToolbarAction(new ThemeResource("stop.png")) { @Override public void execute(final Context context) { pl.stop(); } });
Links
- Source Code (1.3.1)
- Online Demo
- Author Homepage
- Discussion Forum
- Issue Tracker
- Demo sources
- Source Code (2.0.alpha1)
- gwt-dnd
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
- Debugging, refactoring and reliability improvements. Now works with IE (even with IE6 though header CSS might need tinkering).
- Now PortalLayout works fine with the GridLayout (thnx Stéphane Nicoll for pointing out the issue).
- Size calculations significantly reduced and should be more safe now.
which includes:
- Ability to set portlet captions through standard Component's setCaption() method.
- Icons in the headers, error indicators.
- Optional animations for the following events: Attach, Collapse/Expand and Close. The speed of those is also easily customizable.
- Listeners for the collapse and close events.
- API CHANGE (!) for the actions - pretty minor ones though. The context is now passed in the action execution method (thnx Sami for an advice).
- Some style changes and improvements - mostly related to the new construction of the headers, but also toggling the button style for expand/collapse.
- Most missing functionality covered (e.g. replaceComponent()).
- Released
- 2011-09-08
- Maturity
- BETA
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 6.5+
- Vaadin 6.0+ in 0.1.0
- Vaadin 7.0 in 2.0.beta1
- Vaadin 6.7 in 2.0.beta1
- Vaadin 7.0+ in 2.0.alpha1
- Browser
- Internet Explorer
- Internet Explorer
- Internet Explorer
- Firefox
- Opera
- Safari
- Google Chrome
- Internet Explorer
Vaadin Add-on Directory
Find open-source widgets, add-ons, themes, and integrations for your Vaadin application.
The channel for finding, promoting, and distributing Vaadin add-ons.