@SuppressWarnings("unchecked")
    @Override
    public void activateAutoRefresh() {

        final ChangeListener<Object> changeListener = new ChangeListener<Object>() {

            /**
             * Called when the value is updated.
             *
             * @param value the observable value
             * @param oldValue the old value
             * @param newValue the new value
             */
            @Override
            public void changed(final ObservableValue<? extends Object> value, final Object oldValue, final Object newValue) {
                if (ObjectUtility.notEquals(oldValue, newValue)) {
                    LOGGER.trace(value.toString() + " has changed");
                    hasChanged(true);
                }
            }
        };

        // Iterate over each field that is a JavaFX Property
        for (final Field field : this.getClass().getDeclaredFields()) {
            if (Property.class.isAssignableFrom(field.getDeclaringClass())) {

                try {
                    ((Property<Object>) field.get(this)).addListener(changeListener);
                } catch (IllegalArgumentException | IllegalAccessException e) {
                    LOGGER.error("Cannot access to property " + field.getName() + " of class " + this.getClass(), e);
                }
            }
        }

    }
@ SuppressWarnings ( "unchecked" ) @ Override public void activateAutoRefresh ( ) { final ChangeListener < Object > changeListener = new ChangeListener < Object > ( ) { @ Override public void changed ( final ObservableValue < ? extends Object > value , final Object oldValue , final Object newValue ) { if ( ObjectUtility . notEquals ( oldValue , newValue ) ) { LOGGER . trace ( value . toString ( ) + " has changed" ) ; hasChanged ( true ) ; } } } ; for ( final Field field : this . getClass ( ) . getDeclaredFields ( ) ) { if ( Property . class . isAssignableFrom ( field . getDeclaringClass ( ) ) ) { try { ( ( Property < Object > ) field . get ( this ) ) . addListener ( changeListener ) ; } catch ( IllegalArgumentException | IllegalAccessException e ) { LOGGER . error ( "Cannot access to property " + field . getName ( ) + " of class " + this . getClass ( ) , e ) ; } } } }
{@inheritDoc}