title: Hide/expand layout in vaadin
body: <p>There's StackExchange button with a dropdown layout on this site on the top-left side. If you click on it, it opens, if you click on somewhere else, it's hidden. 
  Is it possible to create a similar composition in vaadin application given a button and layout?</p>
  
  <p>Two conditions are:</p>
  
  <ol>
  <li><p>Know the state of the layout(hidden or shown) from the code(that's why javascript is not appropriate).</p></li>
  <li><p>Button should expand and hide the layout and the rest area on the click should only hide it(the same as here with the StackExchange button).</p></li>
  </ol>
  
  <p>Does anyone know the solution? Thanks a lot.</p>