public class WeekendCalendar extends CalendarBase<WeekendCalendarActivity>
setWeekendDays(DayOfWeek...)
.name, visible
Constructor and Description |
---|
WeekendCalendar()
Constructs a new weekend calendar.
|
Modifier and Type | Method and Description |
---|---|
Iterator<WeekendCalendarActivity> |
getActivities(Layer layer,
Instant startTime,
Instant endTime,
TemporalUnit temporalUnit,
ZoneId zoneId)
Returns an iterator for iterating over all activities found for the given
layer and time interval.
|
DayOfWeek[] |
getWeekendDays()
Returns the days of the week that are to be considered weekend days.
|
protected boolean |
isSupportedUnit(TemporalUnit unit)
Determines if weekends will be shown for the given temporal unit.
|
void |
setWeekendDays(DayOfWeek... days)
Sets the days of the week that are considered to be a weekend day.
|
getName, isVisible, nameProperty, setName, setVisible, visibleProperty
addEventHandler, buildEventDispatchChain, fireEvent, getEarliestTimeUsed, getLatestTimeUsed, removeEventHandler
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addEventHandler, getEarliestTimeUsed, getLatestTimeUsed, removeEventHandler
buildEventDispatchChain
public WeekendCalendar()
public void setWeekendDays(DayOfWeek... days)
DayOfWeek.SATURDAY
and DayOfWeek.SUNDAY
are
considered weekend days.days
- the days of the week that are to be considered weekend dayspublic DayOfWeek[] getWeekendDays()
DayOfWeek.SATURDAY
and DayOfWeek.SUNDAY
are
considered weekend days.public Iterator<WeekendCalendarActivity> getActivities(Layer layer, Instant startTime, Instant endTime, TemporalUnit temporalUnit, ZoneId zoneId)
ActivityRepository
layer
- the layer for which to return the activitiesstartTime
- the start time of the time interval for which to return the
activitiesendTime
- the end time of the time interval for which to return the
activitiestemporalUnit
- the temporal unit currently displayed in the datelinezoneId
- the timezone currently displayed in the datelineprotected boolean isSupportedUnit(TemporalUnit unit)
ChronoUnit.DAYS
and
ChronoUnit.WEEKS
. To support more units simply override this
method in a subclass.unit
- the unit to checkCopyright © 2014 Dirk Lemmermann Software & Consulting. All rights reserved.