Class DateRangeEditModel


  • public class DateRangeEditModel
    extends Object
    Model for date range editing.
    • 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 scale
        dateRange - the initial date range
        min - the minimum date that can be set
        max - the maximum date that can be set
        timeZoneId - the ID of the timezone to be used for date conversion
        changeConsumer - 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
      • 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)