@Override
    public void reactToChanges(ObservationEvent ev) {
        Class evClass = ev.getClass();
        int value = this.value;
        if (evClass == CustomSliderEvent.class) {
            
            CustomSliderEvent event = (CustomSliderEvent) ev;
            value = event.getValue();

        } else if (evClass == CustomTextFieldEvent.class) {
            
            CustomTextFieldEvent event = (CustomTextFieldEvent) ev;
            try {
                value = Integer.valueOf(event.getValue());
            } catch (RuntimeException e) {}
        }
        this.setValue(value);
        this.notifyObserver();
    }