Example usage for com.vaadin.ui ComponentContainer removeComponent

List of usage examples for com.vaadin.ui ComponentContainer removeComponent

Introduction

In this page you can find the example usage for com.vaadin.ui ComponentContainer removeComponent.

Prototype

public void removeComponent(Component c);

Source Link

Document

Removes the component from this container.

Usage

From source file:com.mycollab.module.project.view.ticket.DefaultTicketGroupComponent.java

License:Open Source License

@Override
public void refresh() {
    if (wrapBody.getComponentCount() > 0) {
        updateTitle();//from  www.j  a v a2 s.  c om
    } else {
        ComponentContainer parent = (ComponentContainer) getParent();
        if (parent != null) {
            parent.removeComponent(this);
        }
    }
}

From source file:com.nfl.dm.clubsites.cms.articles.subapp.articleeditor.tagging.components.TagField.java

License:Open Source License

public TagField(Tag value, Button.ClickListener closeHandler) {
    this(value);/*from w ww  .ja va2  s .  c  o m*/
    closeButton.addClickListener(closeHandler);
    closeButton.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(Button.ClickEvent event) {
            ComponentContainer cc = (ComponentContainer) getParent();
            if (cc != null) {
                cc.removeComponent(TagField.this);
            }
        }
    });
}

From source file:org.lunifera.mobile.vaadin.ecview.presentation.internal.MobileTabSheetPresentation.java

License:Open Source License

@Override
public void doUnrender() {
    if (tabSheet != null) {

        // unbind all active bindings
        unbind();//  w w  w  . j  a  va2 s. c  om

        ComponentContainer parent = ((ComponentContainer) tabSheet.getParent());
        if (parent != null) {
            parent.removeComponent(tabSheet);
        }

        // remove assocations
        unassociateWidget(tabSheet);

        tabSheet = null;

        // unrender the tabs
        for (IMobileTabEditpart tab : getTabs()) {
            tab.unrender();
        }
    }
}

From source file:org.lunifera.mobile.vaadin.ecview.presentation.internal.NavigationBarButtonPresentation.java

License:Open Source License

/**
 * {@inheritDoc}//from  w w  w . ja  v  a2s  . co  m
 */
@Override
public void doUnrender() {
    if (button != null) {

        // unbind all active bindings
        unbind();

        ComponentContainer parent = ((ComponentContainer) button.getParent());
        if (parent != null) {
            parent.removeComponent(button);
        }

        // remove assocations
        unassociateWidget(button);

        button = null;
    }
}

From source file:org.lunifera.mobile.vaadin.ecview.presentation.internal.NavigationButtonPresentation.java

License:Open Source License

/**
 * {@inheritDoc}// w  ww  .j  a  v  a2s  .co m
 */
@Override
public void doUnrender() {
    if (button != null) {

        // unbind all active bindings
        unbind();
        clickObservable.dispose();
        clickObservable = null;

        ComponentContainer parent = ((ComponentContainer) button.getParent());
        if (parent != null) {
            parent.removeComponent(button);
        }

        // remove assocations
        unassociateWidget(button);

        button = null;
    }
}

From source file:org.lunifera.mobile.vaadin.ecview.presentation.internal.SwitchPresentation.java

License:Open Source License

/**
 * {@inheritDoc}/*from   w w w .  java 2s. c  o  m*/
 */
@Override
public void doUnrender() {
    if (xswitch != null) {

        // unbind all active bindings
        unbind();

        ComponentContainer parent = ((ComponentContainer) xswitch.getParent());
        if (parent != null) {
            parent.removeComponent(xswitch);
        }

        // remove assocations
        unassociateWidget(xswitch);

        xswitch = null;
    }
}

From source file:org.lunifera.runtime.web.ecview.presentation.vaadin.internal.BeanReferenceFieldPresentation.java

License:Open Source License

/**
 * {@inheritDoc}//from  w w w .  ja  va2 s . co m
 */
@Override
public void doUnrender() {
    if (field != null) {

        // unbind all active bindings
        unbind();

        ComponentContainer parent = ((ComponentContainer) field.getParent());
        if (parent != null) {
            parent.removeComponent(field);
        }

        // remove assocations
        unassociateWidget(field);

        field = null;
    }
}

From source file:org.lunifera.runtime.web.ecview.presentation.vaadin.internal.BrowserPresentation.java

License:Open Source License

/**
 * {@inheritDoc}//from w  w  w .j a  va2  s . c  om
 */
@Override
public void doUnrender() {
    if (componentBase != null) {

        // unbind all active bindings
        unbind();

        // remove assocations
        unassociateWidget(componentBase);
        unassociateWidget(browser);

        ComponentContainer parent = ((ComponentContainer) componentBase.getParent());
        if (parent != null) {
            parent.removeComponent(componentBase);
        }
        componentBase = null;
        browser = null;
    }
}

From source file:org.lunifera.runtime.web.ecview.presentation.vaadin.internal.ButtonPresentation.java

License:Open Source License

/**
 * {@inheritDoc}//w  ww .  j ava2  s .c  o  m
 */
@Override
public void doUnrender() {
    if (componentBase != null) {

        // unbind all active bindings
        unbind();

        ComponentContainer parent = ((ComponentContainer) componentBase.getParent());
        if (parent != null) {
            parent.removeComponent(componentBase);
        }

        // remove assocations
        unassociateWidget(componentBase);
        unassociateWidget(button);

        componentBase = null;
        button = null;
    }
}

From source file:org.lunifera.runtime.web.ecview.presentation.vaadin.internal.CheckBoxPresentation.java

License:Open Source License

/**
 * {@inheritDoc}//  ww w  .j  ava 2 s . c om
 */
@Override
public void doUnrender() {
    if (componentBase != null) {

        // unbind all active bindings
        unbind();

        ComponentContainer parent = ((ComponentContainer) componentBase.getParent());
        if (parent != null) {
            parent.removeComponent(componentBase);
        }

        // remove assocations
        unassociateWidget(componentBase);
        unassociateWidget(checkBox);

        componentBase = null;
        checkBox = null;
    }
}