Package com.vaadin.ui.HasComponents

Examples of com.vaadin.ui.HasComponents.ComponentAttachListener


    public void addWindow_attachEventIsFired() {
        TestUI ui = new TestUI();
        final Window window = new Window();

        final boolean[] eventFired = new boolean[1];
        ui.addComponentAttachListener(new ComponentAttachListener() {

            @Override
            public void componentAttachedToContainer(ComponentAttachEvent event) {
                eventFired[0] = event.getAttachedComponent().equals(window);
            }
View Full Code Here


        content.removeAllComponents();

        final AbsoluteLayout a = new AbsoluteLayout();
        a.setWidth("300px");
        a.setHeight("300px");
        a.addComponentAttachListener(new ComponentAttachListener() {
            @Override
            public void componentAttachedToContainer(ComponentAttachEvent event) {
                AbsoluteLayout layout = (AbsoluteLayout) event.getContainer();
                AbsoluteLayout.ComponentPosition position = layout
                        .getPosition(event.getAttachedComponent());
View Full Code Here

        content.removeAllComponents();

        final VerticalLayout v = new VerticalLayout();
        v.setWidth("300px");
        v.setHeight("300px");
        v.addComponentAttachListener(new ComponentAttachListener() {
            @Override
            public void componentAttachedToContainer(ComponentAttachEvent event) {
                VerticalLayout layout = (VerticalLayout) event.getContainer();
                getMainWindow().showNotification(
                        "Attached to index "
View Full Code Here

        final GridLayout g = new GridLayout(4, 4);
        g.setWidth("300px");
        g.setHeight("300px");
        g.setHideEmptyRowsAndColumns(true);
        g.addComponentAttachListener(new ComponentAttachListener() {
            @Override
            public void componentAttachedToContainer(ComponentAttachEvent event) {
                GridLayout layout = (GridLayout) event.getContainer();
                GridLayout.Area area = layout.getComponentArea(event
                        .getAttachedComponent());
View Full Code Here

TOP

Related Classes of com.vaadin.ui.HasComponents.ComponentAttachListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.