Package com.vaadin.data.Property

Examples of com.vaadin.data.Property.ValueChangeNotifier


    private void addValueChangeListener(Item item, Object propertyId) {
        Property<?> property = item.getItemProperty(propertyId);
        if (property instanceof ValueChangeNotifier) {
            // avoid multiple notifications for the same property if
            // multiple filters are in use
            ValueChangeNotifier notifier = (ValueChangeNotifier) property;
            notifier.removeListener(this);
            notifier.addListener(this);
        }
    }
View Full Code Here


    private void addValueChangeListener(Item item, Object propertyId) {
        Property property = item.getItemProperty(propertyId);
        if (property instanceof ValueChangeNotifier) {
            // avoid multiple notifications for the same property if
            // multiple filters are in use
            ValueChangeNotifier notifier = (ValueChangeNotifier) property;
            notifier.removeListener(this);
            notifier.addListener(this);
        }
    }
View Full Code Here

    private void addValueChangeListener(BeanItem<BT> beanItem, Object propertyId) {
        Property property = beanItem.getItemProperty(propertyId);
        if (property instanceof ValueChangeNotifier) {
            // avoid multiple notifications for the same property if
            // multiple filters are in use
            ValueChangeNotifier notifier = (ValueChangeNotifier) property;
            notifier.removeListener(this);
            notifier.addListener(this);
        }
    }
View Full Code Here

    private void addValueChangeListener(Item item, Object propertyId) {
        Property property = item.getItemProperty(propertyId);
        if (property instanceof ValueChangeNotifier) {
            // avoid multiple notifications for the same property if
            // multiple filters are in use
            ValueChangeNotifier notifier = (ValueChangeNotifier) property;
            notifier.removeListener(this);
            notifier.addListener(this);
        }
    }
View Full Code Here

    private void addValueChangeListener(BeanItem beanItem, Object propertyId) {
        Property property = beanItem.getItemProperty(propertyId);
        if (property instanceof ValueChangeNotifier) {
            // avoid multiple notifications for the same property if
            // multiple filters are in use
            ValueChangeNotifier notifier = (ValueChangeNotifier) property;
            notifier.removeListener(this);
            notifier.addListener(this);
        }
    }
View Full Code Here

    private void addValueChangeListener(BeanItem<BT> beanItem, Object propertyId) {
        Property property = beanItem.getItemProperty(propertyId);
        if (property instanceof ValueChangeNotifier) {
            // avoid multiple notifications for the same property if
            // multiple filters are in use
            ValueChangeNotifier notifier = (ValueChangeNotifier) property;
            notifier.removeListener(this);
            notifier.addListener(this);
        }
    }
View Full Code Here

    private void addValueChangeListener(Item item, Object propertyId) {
        Property property = item.getItemProperty(propertyId);
        if (property instanceof ValueChangeNotifier) {
            // avoid multiple notifications for the same property if
            // multiple filters are in use
            ValueChangeNotifier notifier = (ValueChangeNotifier) property;
            notifier.removeListener(this);
            notifier.addListener(this);
        }
    }
View Full Code Here

    @Override
    public void refresh() {

        for (final Property property : propertyItemMapCache.keySet()) {
            if (property instanceof ValueChangeNotifier) {
                final ValueChangeNotifier notifier = (ValueChangeNotifier) property;
                notifier.removeValueChangeListener(this);
            }
        }

        query = null;
        batchCount = 0;
View Full Code Here

            }

            for (final Object propertyId : item.getItemPropertyIds()) {
                final Property property = item.getItemProperty(propertyId);
                if (property instanceof ValueChangeNotifier) {
                    final ValueChangeNotifier notifier = (ValueChangeNotifier) property;
                    notifier.addValueChangeListener(this);
                    propertyItemMapCache.put(property, item);
                }
            }

        }

        // Increase batch count.
        batchCount++;

        // Evict items from cache if cache size exceeds max cache size
        int counter = 0;
        while (itemCache.size() > maxCacheSize) {
            final int firstIndex = itemCacheAccessLog.getFirst();
            final Item firstItem = itemCache.get(firstIndex);

            // Remove oldest item in cache access log if it is not modified or
            // removed.
            if (!modifiedItems.contains(firstItem) && !removedItems.contains(firstItem)) {
                itemCacheAccessLog.removeFirst();
                itemCache.remove(firstIndex);

                for (final Object propertyId : firstItem.getItemPropertyIds()) {
                    final Property property = firstItem.getItemProperty(propertyId);
                    if (property instanceof ValueChangeNotifier) {
                        final ValueChangeNotifier notifier = (ValueChangeNotifier) property;
                        notifier.removeValueChangeListener(this);
                        propertyItemMapCache.remove(property);
                    }
                }

            } else {
View Full Code Here

        statusIcon = new Image(null, noneIconResource);
        statusIcon.setHeight("16px");

        if (statusProperty instanceof ValueChangeNotifier) {
            ValueChangeNotifier notifier = (ValueChangeNotifier) statusProperty;
            notifier.addValueChangeListener(this);
        }

        refreshImage(statusProperty);

        return statusIcon;
View Full Code Here

TOP

Related Classes of com.vaadin.data.Property.ValueChangeNotifier

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.