/** * Creates the FilterViewModel with JavaFX properties for the passed ExerciseFilter object. * * @param exerciseFilter filter to be edited */ public FilterViewModel(final ExerciseFilter exerciseFilter) { dateStart = new SimpleObjectProperty<>(exerciseFilter.getDateStart()); dateEnd = new SimpleObjectProperty<>(exerciseFilter.getDateEnd()); sportType = new SimpleObjectProperty<>(exerciseFilter.getSportType()); sportSubtype = new SimpleObjectProperty<>(exerciseFilter.getSportSubType()); intensity = new SimpleObjectProperty<>(new IntensityItem(exerciseFilter.getIntensity())); equipment = new SimpleObjectProperty<>(exerciseFilter.getEquipment()); commentSubString = new SimpleStringProperty( StringUtils.getTextOrEmptyString(exerciseFilter.getCommentSubString())); regularExpressionMode = new SimpleBooleanProperty(exerciseFilter.isRegularExpressionMode()); }