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, visiblePropertyaddEventHandler, buildEventDispatchChain, fireEvent, getEarliestTimeUsed, getLatestTimeUsed, removeEventHandlerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddEventHandler, getEarliestTimeUsed, getLatestTimeUsed, removeEventHandlerbuildEventDispatchChainpublic 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)
ActivityRepositorylayer - 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.