@Override
 public void setCaption(VCaption caption) {
   VCaption oldCaption = getCaption();
   if (oldCaption != null) {
     getLayoutManager().unregisterDependency(layout, oldCaption.getElement());
   }
   super.setCaption(caption);
   if (caption != null) {
     getLayoutManager()
         .registerDependency((ManagedLayout) child.getParent(), caption.getElement());
   }
 }
 @Override
 protected int getCaptionWidth() {
   VCaption caption = getCaption();
   return caption != null ? getLayoutManager().getOuterWidth(caption.getElement()) : 0;
 }