|
|
@@ -95,10 +95,9 @@ public class PanelConnector extends AbstractSingleComponentContainerConnector |
|
|
|
getWidget().bottomDecoration |
|
|
|
.setClassName(VPanel.CLASSNAME + "-deco"); |
|
|
|
getWidget().captionNode.setClassName(VPanel.CLASSNAME + "-caption"); |
|
|
|
boolean hasCaption = false; |
|
|
|
if (getState().caption != null && !getState().caption.isEmpty()) { |
|
|
|
boolean hasCaption = hasCaption(); |
|
|
|
if (hasCaption) { |
|
|
|
getWidget().setCaption(getState().caption); |
|
|
|
hasCaption = true; |
|
|
|
} else { |
|
|
|
getWidget().setCaption(""); |
|
|
|
getWidget().captionNode |
|
|
@@ -174,6 +173,15 @@ public class PanelConnector extends AbstractSingleComponentContainerConnector |
|
|
|
getWidget().contentNode.setTabIndex(getState().tabIndex); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Detects if caption div should be visible. |
|
|
|
* |
|
|
|
* @return {@code true} if caption div should be shown |
|
|
|
*/ |
|
|
|
protected boolean hasCaption() { |
|
|
|
return getState().caption != null && !getState().caption.isEmpty(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void updateCaption(ComponentConnector component) { |
|
|
|
// NOP: layouts caption, errors etc not rendered in Panel |