Directory

← Back

Drawer

An animated component to hide or show information

Author

Rating

Popularity

<100

The Drawer gives you the opportunity to have information (UI widgets) available the visitor, but only show them when the information is needed. Click the header, and the information is smoothly revealed. Click again, and it's rolled back in.

Even though IE6 and IE7 are not explicitly supported, they seem to work somewhat decently with certain components. YMMV.

Sample code

@SuppressWarnings("serial")
public class DrawerTest extends Application {
    @Override
    public void init() {
        final Window mainWindow = new Window("Testproject Application");
        setMainWindow(mainWindow);

        final Layout layout = new VerticalLayout();
        layout.addComponent(new Button("First"));
        layout.addComponent(new Button("Second"));

        final Drawer drawer = new Drawer("Button drawer", layout);
        // Drawer is designed to work best with explicitly defined widths.
        drawer.setWidth("20em");
        mainWindow.addComponent(drawer);
    }
}

Compatibility

(Loading compatibility data...)

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

  • Fixed a bug related to disabling and re-enabling the Drawer.
  • Known issue: Disabling the Drawer while it is doing the close animation will make the drawer to close instantly, but a blank area is re-open-animated.
Released
2011-02-03
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 6.2+
Vaadin 6.3+ in 1.1.8
Browser
Internet Explorer
Firefox
Opera
Safari
Google Chrome

Drawer - Vaadin Add-on Directory

An animated component to hide or show information Drawer - Vaadin Add-on Directory
The Drawer gives you the opportunity to have information (UI widgets) available the visitor, but only show them when the information is needed. Click the header, and the information is smoothly revealed. Click again, and it's rolled back in. Even though IE6 and IE7 are not explicitly supported, they seem to work somewhat decently with certain components. YMMV.
Drawer forum thread
Drawer manual
Live Demo
Video Demo

Drawer version 1.1.5
null

Drawer version 1.1.6
Fixes an animation timing bug with GridLayout.

Drawer version 1.1.7
Refreshing the application doesn't make the Drawer to re-animate the previous animation again.

Drawer version 1.1.8
- This version is tested with 6.3.3, but it will most probably work with 6.2 upwards. - Fixed a bug with pre-opened drawers - Fixed graphical glitch with an animated closing drawer - Fixed a height-related bug with closing a drawer without animation

Drawer version 1.1.9
Fixed a bug with GridLayout

Drawer version 1.1.10
- Fixed a bug related to disabling and re-enabling the Drawer. - Known issue: Disabling the Drawer while it is doing the close animation will make the drawer to close instantly, but a blank area is re-open-animated.

Online