Package com.vaadin.data.util

Examples of com.vaadin.data.util.ContainerHierarchicalWrapper


        // FIXME: This disables partial updates until TreeTable is fixed so it
        // does not change component hierarchy during paint
        containerSupportsPartialUpdates = (newDataSource instanceof ItemSetChangeNotifier) && false;

        if (newDataSource != null && !(newDataSource instanceof Hierarchical)) {
            newDataSource = new ContainerHierarchicalWrapper(newDataSource);
        }

        if (newDataSource != null && !(newDataSource instanceof Ordered)) {
            newDataSource = new HierarchicalContainerOrderedWrapper(
                    (Hierarchical) newDataSource);
View Full Code Here


    }

    private Container createContainer(int items,
            Map<String, Integer> hasChildren) {
        ContainerHierarchicalWrapper container;

        container = new ContainerHierarchicalWrapper(testBeanContainer);
        populate(container, items, hasChildren);
        return container;
    }
View Full Code Here

            private Action[] actions = new Action[] { new Action("Remove") };

            @Override
            public void handleAction(Action action, Object sender, Object target) {
                ContainerHierarchicalWrapper containerDataSource = (ContainerHierarchicalWrapper) tree1
                        .getContainerDataSource();
                containerDataSource.removeItemRecursively(target);
            }

            @Override
            public Action[] getActions(Object target, Object sender) {
                return actions;
View Full Code Here

    @Override
    public void setContainerDataSource(Container newDataSource) {
        cStrategy = null;
        if (!(newDataSource instanceof Hierarchical)) {
            newDataSource = new ContainerHierarchicalWrapper(newDataSource);
        }

        if (!(newDataSource instanceof Ordered)) {
            newDataSource = new HierarchicalContainerOrderedWrapper(
                    (Hierarchical) newDataSource);
View Full Code Here

    @Override
    public void setContainerDataSource(Container newDataSource) {
        if (newDataSource == null) {
            // Note: using wrapped IndexedContainer to match constructor (super
            // creates an IndexedContainer, which is then wrapped).
            newDataSource = new ContainerHierarchicalWrapper(
                    new IndexedContainer());
        }

        // Assure that the data source is ordered by making unordered
        // containers ordered by wrapping them
        if (Container.Hierarchical.class.isAssignableFrom(newDataSource
                .getClass())) {
            super.setContainerDataSource(newDataSource);
        } else {
            super.setContainerDataSource(new ContainerHierarchicalWrapper(
                    newDataSource));
        }
    }
View Full Code Here

    @Override
    public void setContainerDataSource(Container newDataSource) {
        if (newDataSource == null) {
            // Note: using wrapped IndexedContainer to match constructor (super
            // creates an IndexedContainer, which is then wrapped).
            newDataSource = new ContainerHierarchicalWrapper(
                    new IndexedContainer());
        }

        // Assure that the data source is ordered by making unordered
        // containers ordered by wrapping them
        if (Container.Hierarchical.class.isAssignableFrom(newDataSource
                .getClass())) {
            super.setContainerDataSource(newDataSource);
        } else {
            super.setContainerDataSource(new ContainerHierarchicalWrapper(
                    newDataSource));
        }
    }
View Full Code Here

        // containers ordered by wrapping them
        if (Container.Hierarchical.class.isAssignableFrom(newDataSource
                .getClass())) {
            super.setContainerDataSource(newDataSource);
        } else {
            super.setContainerDataSource(new ContainerHierarchicalWrapper(
                    newDataSource));
        }

        /*
         * Ensure previous expanded items are cleaned up if they don't exist in
View Full Code Here

    @Override
    public void setContainerDataSource(Container newDataSource) {
        if (newDataSource == null) {
            // Note: using wrapped IndexedContainer to match constructor (super
            // creates an IndexedContainer, which is then wrapped).
            newDataSource = new ContainerHierarchicalWrapper(
                    new IndexedContainer());
        }

        // Assure that the data source is ordered by making unordered
        // containers ordered by wrapping them
        if (Container.Hierarchical.class.isAssignableFrom(newDataSource
                .getClass())) {
            super.setContainerDataSource(newDataSource);
        } else {
            super.setContainerDataSource(new ContainerHierarchicalWrapper(
                    newDataSource));
        }
    }
View Full Code Here

        cStrategy = null;

        containerSupportsPartialUpdates = (newDataSource instanceof ItemSetChangeNotifier);

        if (!(newDataSource instanceof Hierarchical)) {
            newDataSource = new ContainerHierarchicalWrapper(newDataSource);
        }

        if (!(newDataSource instanceof Ordered)) {
            newDataSource = new HierarchicalContainerOrderedWrapper(
                    (Hierarchical) newDataSource);
View Full Code Here

    @Override
    public void setContainerDataSource(Container newDataSource) {
        if (newDataSource == null) {
            // Note: using wrapped IndexedContainer to match constructor (super
            // creates an IndexedContainer, which is then wrapped).
            newDataSource = new ContainerHierarchicalWrapper(
                    new IndexedContainer());
        }

        // Assure that the data source is ordered by making unordered
        // containers ordered by wrapping them
        if (Container.Hierarchical.class.isAssignableFrom(newDataSource
                .getClass())) {
            super.setContainerDataSource(newDataSource);
        } else {
            super.setContainerDataSource(new ContainerHierarchicalWrapper(
                    newDataSource));
        }
    }
View Full Code Here

TOP

Related Classes of com.vaadin.data.util.ContainerHierarchicalWrapper

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.