Class DateRangeEditModel
- java.lang.Object
-
- de.xima.fc.gui.bean.statistics.model.DateRangeEditModel
-
public class DateRangeEditModel extends Object
Model for date range editing.
-
-
Constructor Summary
Constructors Constructor Description DateRangeEditModel(ETimeScale scale, DateRange dateRange, LocalDateTime min, LocalDateTime max, ZoneId timeZoneId, Consumer<DateRange> changeConsumer)Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Date>getDateRangeAsList()DategetDay()DategetEnd()DategetMaxDate()intgetMaxYear()DategetMinDate()DategetMinDateMonth()intgetMinYear()ETimeScalegetTimeScale()intgetYear()List<Integer>getYears()voidonAcceptChanges()Action handler for 'accept' action, notifies the registered consumer about the changed date rangevoidsetDateRangeAsList(List<Date> dates)voidsetDay(Date day)voidsetEnd(Date end)voidsetYear(int year)
-
-
-
Constructor Detail
-
DateRangeEditModel
public DateRangeEditModel(ETimeScale scale, DateRange dateRange, LocalDateTime min, LocalDateTime max, ZoneId timeZoneId, Consumer<DateRange> changeConsumer)
Create a new instance.- Parameters:
scale- the related time scaledateRange- the initial date rangemin- the minimum date that can be setmax- the maximum date that can be settimeZoneId- the ID of the timezone to be used for date conversionchangeConsumer- a consumer that has to be notified about changed date values
-
-
Method Detail
-
getDateRangeAsList
public List<Date> getDateRangeAsList()
- Returns:
- the current date range as a list of dates
-
setDateRangeAsList
public void setDateRangeAsList(List<Date> dates)
- Parameters:
dates- the date range to be set as a list of dates
-
onAcceptChanges
public void onAcceptChanges()
Action handler for 'accept' action, notifies the registered consumer about the changed date range
-
getTimeScale
public ETimeScale getTimeScale()
-
getMinDate
public Date getMinDate()
-
getMaxDate
public Date getMaxDate()
-
getMinDateMonth
public Date getMinDateMonth()
-
getMinYear
public int getMinYear()
-
getMaxYear
public int getMaxYear()
-
getDay
public Date getDay()
-
setDay
public void setDay(Date day)
-
getEnd
public Date getEnd()
-
setEnd
public void setEnd(Date end)
-
getYear
public int getYear()
-
setYear
public void setYear(int year)
-
-