@@ -69,7 +69,8 @@ public ApplayoutDemoView() {
6969 app .setMenuItems (createMenuItems ());
7070
7171 app .setToolbarIconButtons (miSettings );
72- this .add (app , container );
72+ app .add (container );
73+ this .add (app );
7374
7475 settings .setSwipeOpen (true );
7576 settings .setMenuVisible (true );
@@ -85,7 +86,8 @@ private void applySettings() {
8586 app .setSwipeOpen (settings .isSwipeOpen ());
8687 app .setFixed (settings .isFixed ());
8788 app .setReveals (settings .isReveals ());
88-
89+ app .setDrawerPersistent (settings .isDrawerPersistent ());
90+
8991 if (settings .isCompact ()) {
9092 app .addClassName ("compact" );
9193 } else {
@@ -104,7 +106,8 @@ private void openSettings() {
104106 Checkbox cbFixed = new Checkbox ("Fixed" );
105107 Checkbox cbReveals = new Checkbox ("Reveals" );
106108 Checkbox cbCompact = new Checkbox ("Compact" );
107-
109+ Checkbox cbPersistent = new Checkbox ("Drawer Persistent" );
110+
108111 cbMenuVisible .getElement ().setAttribute ("title" , "Toggle visibility of the hamburguer icon." );
109112 cbSwipeOpen
110113 .getElement ()
@@ -121,17 +124,21 @@ private void openSettings() {
121124 cbCompact
122125 .getElement ()
123126 .setAttribute ("title" , "When enabled, the height of the header is set to 32px." );
127+ cbPersistent
128+ .getElement ()
129+ .setAttribute ("title" , "When enabled, the drawer will be opened in a non-modal way" );
124130
125131 Binder <DemoSettings > binder = new Binder <>();
126132 binder .forField (cbMenuVisible ).bind (DemoSettings ::isMenuVisible , DemoSettings ::setMenuVisible );
127133 binder .forField (cbSwipeOpen ).bind (DemoSettings ::isSwipeOpen , DemoSettings ::setSwipeOpen );
128134 binder .forField (cbFixed ).bind (DemoSettings ::isFixed , DemoSettings ::setFixed );
129135 binder .forField (cbReveals ).bind (DemoSettings ::isReveals , DemoSettings ::setReveals );
130136 binder .forField (cbCompact ).bind (DemoSettings ::isCompact , DemoSettings ::setCompact );
137+ binder .forField (cbPersistent ).bind (DemoSettings ::isDrawerPersistent , DemoSettings ::setDrawerPersistent );
131138 binder .setBean (this .settings );
132139
133140 VerticalLayout content =
134- new VerticalLayout (cbMenuVisible , cbSwipeOpen , cbFixed , cbReveals , cbCompact );
141+ new VerticalLayout (cbMenuVisible , cbSwipeOpen , cbFixed , cbReveals , cbCompact , cbPersistent );
135142 content .setSpacing (false );
136143
137144 HorizontalLayout buttons = new HorizontalLayout ();
0 commit comments