/** {@inheritDoc} */ @Override public void revertChanges() { for (PropertyWidget widget : widgets) { String propertyId = widget.getOptionId().toString(); String previousValue = preferencesManager.getValue(propertyId); if (!widget.getSelectedValue().equals(previousValue)) { widget.selectPropertyValue(previousValue); } } }
/** {@inheritDoc} */ @Override public void storeChanges() { for (PropertyWidget widget : widgets) { String propertyName = widget.getOptionId().toString(); String selectedValue = widget.getSelectedValue(); if (!selectedValue.equals(preferencesManager.getValue(propertyName))) { preferencesManager.setValue(propertyName, selectedValue); } } }
/** {@inheritDoc} */ @Override public boolean isDirty() { for (PropertyWidget widget : widgets) { String propertyName = widget.getOptionId().toString(); String changedValue = widget.getSelectedValue(); if (!changedValue.equals(preferencesManager.getValue(propertyName))) { return true; } } return false; }