ToolbarWindow
An extended window that allows you to add any components to the window header. Most suitable for adding minimize/maximize buttons.
Ever wanted to place extra buttons in the window header, such as a simple minimize or maximize button? Now you can!
The toolbar area accepts any Vaadin component, so you could even place a Table there, but that's not really what this component was designer for ;)
The demo application contains an example implementation for the maximize and minimize functions, with an additional custom button in the toolbar. The Animator add-on is also used to provide the smooth minimize animation.
DEPENDENCIES -CSSInject 0.11 is required - http://vaadin.com/addon/cssinject
Sample code
final ToolbarWindow w = new ToolbarWindow("Window w/ Tools"); w.center(); w.setWidth("400px"); w.setHeight("300px"); Button b = new Button(null, new Button.ClickListener() { public void buttonClick(ClickEvent event) { w.setHeight("0px"); } }); b.setDescription("Minimize"); b.setIcon(new ClassResource("minimize.png", this)); b.addStyleName(Reindeer.BUTTON_LINK); tools.addComponent(b); b = new Button(null, new Button.ClickListener() { public void buttonClick(ClickEvent event) { if (w.getWidth() != 100) { w.setSizeFull(); } else { w.setWidth("400px"); w.setHeight("300px"); } w.center(); event.getButton().focus(); } }); b.setDescription("Maximize"); b.setIcon(new ClassResource("maximize.png", this)); b.addStyleName(Reindeer.BUTTON_LINK); tools.addComponent(b); w.setToolbar(tools); getMainWindow().addWindow(w);
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
Initial release.
Internet Explorer 6 is not supported, and most likely never will be. The reason is that the CSS used to position the toolbar above the window header doesn't work in IE6.
- Released
- 2011-08-19
- Maturity
- BETA
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 6.3+
- Browser
- Firefox
- Opera
- Safari
- Google Chrome
- Internet Explorer
ToolbarWindow - Vaadin Add-on Directory
An extended window that allows you to add any components to the window header. Most suitable for adding minimize/maximize buttons.Author Homepage
Online Demo
CSSInject add-on
Issue Tracker
ToolbarWindow version 0.1
Initial release.
Internet Explorer 6 is not supported, and most likely never will be. The reason is that the CSS used to position the toolbar above the window header doesn't work in IE6.