Example usage for com.vaadin.ui CssLayout markAsDirty

List of usage examples for com.vaadin.ui CssLayout markAsDirty

Introduction

In this page you can find the example usage for com.vaadin.ui CssLayout markAsDirty.

Prototype

@Override
    public void markAsDirty() 

Source Link

Usage

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

License:Open Source License

@Override
public void addChildGui(MUIElement child, MElementContainer<MUIElement> element) {
    if (!(child instanceof MTrimElement && (MElementContainer<?>) element instanceof MTrimBar))
        return;/* w  ww .  j a va  2  s.c  om*/

    MTrimBar trimBar = (MTrimBar) (MElementContainer<?>) element;

    final Component childWidget = (Component) child.getWidget();
    childWidget.setVisible(child.isVisible());
    childWidget.setSizeUndefined();
    int orientation = trimBar.getSide().getValue();
    if (orientation == SideValue.TOP_VALUE || orientation == SideValue.BOTTOM_VALUE)
        childWidget.addStyleName("horizontaltrimelement");
    else
        childWidget.addStyleName("verticaltrimelement");

    int index = indexOf(child, element);
    if (element.getWidget() instanceof CssLayout) {
        CssLayout trimWidget = (CssLayout) element.getWidget();
        trimWidget.addComponent(childWidget, index);
        trimWidget.markAsDirty();
    } else if (element.getWidget() instanceof AbstractOrderedLayout) {
        AbstractOrderedLayout trimWidget = (AbstractOrderedLayout) element.getWidget();
        trimWidget.addComponent(childWidget, index);
        trimWidget.markAsDirty();
    }

    refreshVisibility(trimBar);
}