title: GWT set the visibility of Widget using CSS visibility property
body: <p>I have a GWT <code>Button</code> which contains the <code>setVisible</code> function.  The <code>setVisible</code> causes the button, or any widget, to disappear by setting its style to <code>display: none</code> via a "hidden" class included in the default styles.</p>
  
  <pre><code>myButton.setVisible(false); //Just sets style="display: none"
  </code></pre>
  
  <p>I need a clean method that would instead set <code>visibility: hidden</code>.  This is easily accomplished by setting the style attribute.</p>
  
  <pre><code>myButton.getElement().setAttribute("style", "visibility: "+((isVisible) ? "visible" : "hidden");
  </code></pre>
  
  <p>The problem with doing it this way is that it overrides the current style (not set by the class of course).  Does anybody know of a better way to do this?</p>