@Override
 public void setVisible(boolean visible) {
   boolean oldValue = isVisible();
   super.setVisible(visible);
   if (oldValue != visible) {
     if (visible) {
       ShowEvent.fire(this, this);
     } else {
       HideEvent.fire(this, this);
     }
   }
 }
 @Override
 public HandlerRegistration addShowHandler(ShowHandler handler) {
   return addHandler(handler, ShowEvent.getType());
 }