/** * Shows or hides the title bar for the panel. * * <p>The title bar appears at the top of the panel. * * <p>The default value is <code>false:</code> the title bar is not shown unless a title is set or * the panel is made collapsible. * * <p> * * @see WPanel#setTitle(CharSequence title) * @see WPanel#setCollapsible(boolean on) */ public void setTitleBar(boolean enable) { if (enable && !(this.getTitleBarWidget() != null)) { WContainerWidget titleBar = new WContainerWidget(); this.impl_.bindWidget("titlebar", titleBar); titleBar.setStyleClass("titlebar"); WBreak br; titleBar.addWidget(br = new WBreak()); br.setClearSides(Side.Horizontals); } else { if (!enable && this.isTitleBar()) { this.impl_.bindWidget("titlebar", (WWidget) null); this.title_ = null; this.collapseIcon_ = null; } } }