Example usage for com.vaadin.ui AbstractLayout setVisible

List of usage examples for com.vaadin.ui AbstractLayout setVisible

Introduction

In this page you can find the example usage for com.vaadin.ui AbstractLayout setVisible.

Prototype

@Override
    public void setVisible(boolean visible) 

Source Link

Usage

From source file:org.semanticsoft.vaaclipse.presentation.renderers.TrimBarRenderer.java

License:Open Source License

private void refreshVisibility(MTrimBar trimBar) {

    AbstractLayout trimBarWidget = (AbstractLayout) trimBar.getWidget();
    int orientation = trimBar.getSide().getValue();

    trimBarWidget.setVisible(trimBarWidget.getComponentCount() != 0);

    if (orientation == SideValue.TOP_VALUE) {
        MWindow window = modelService.getTopLevelWindowFor(trimBar);
        TrimmedWindowContent windowContent = (TrimmedWindowContent) ((Panel) window.getWidget()).getContent();

        Component topbar = windowContent.getTopbar();
        if (topbar != null)
            topbar.setVisible(trimBarWidget.getComponentCount() != 0);
    }/* w w  w  . ja  v a2s . co m*/
}