public class ContainerCalendarEventProvider<E extends Entity> extends java.lang.Object implements CalendarEventProvider, EntityCalendarEventProvider
CalendarEventProvider.EventSetChangeEvent, CalendarEventProvider.EventSetChangeListener
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
allDayProperty |
protected java.lang.String |
captionProperty |
protected com.haulmont.bali.events.Subscription |
collectionChangeListener |
protected CollectionContainer<E> |
container |
protected java.lang.String |
descriptionProperty |
protected java.lang.String |
endDateProperty |
protected com.haulmont.bali.events.EventHub |
events |
protected java.util.List<CalendarEvent> |
itemsCache |
protected com.haulmont.bali.events.Subscription |
propertyChangeListener |
protected java.lang.String |
startDateProperty |
protected java.lang.String |
styleNameProperty |
Constructor and Description |
---|
ContainerCalendarEventProvider(CollectionContainer<E> container) |
Modifier and Type | Method and Description |
---|---|
void |
addEvent(CalendarEvent event)
Adds
CalendarEvent to the event provider list. |
com.haulmont.bali.events.Subscription |
addEventSetChangeListener(java.util.function.Consumer<CalendarEventProvider.EventSetChangeEvent> listener) |
java.lang.String |
getCaptionProperty() |
CollectionContainer<E> |
getContainer() |
java.lang.String |
getDescriptionProperty() |
java.lang.String |
getEndDateProperty() |
java.util.List<CalendarEvent> |
getEvents() |
java.lang.String |
getIsAllDayProperty() |
java.lang.String |
getStartDateProperty() |
java.lang.String |
getStyleNameProperty() |
protected void |
onCollectionChanged(CollectionContainer.CollectionChangeEvent<E> event) |
protected void |
onItemPropertyChanged(InstanceContainer.ItemPropertyChangeEvent<E> event) |
void |
removeAllEvents()
Removes all
CalendarEvent in the event provider list. |
void |
removeEvent(CalendarEvent event)
Removes
CalendarEvent from the event provider list. |
void |
removeEventSetChangeListener(java.util.function.Consumer<CalendarEventProvider.EventSetChangeEvent> listener) |
void |
setAllDayProperty(java.lang.String allDayProperty)
Sets the name of the property that represents whether event is an all-day event.
|
void |
setCaptionProperty(java.lang.String captionProperty)
Sets the name of the property that represents caption of event.
|
void |
setDescriptionProperty(java.lang.String descriptionProperty)
Sets the name of the property that represents description of event.
|
void |
setEndDateProperty(java.lang.String endDateProperty)
Sets the name of the property that represents end date of event.
|
void |
setStartDateProperty(java.lang.String startDateProperty)
Sets the name of the property that represents start date of event.
|
void |
setStyleNameProperty(java.lang.String styleNameProperty)
Sets the name of the property that represents style name of event.
|
void |
unbind() |
protected java.util.List<CalendarEvent> itemsCache
protected CollectionContainer<E extends Entity> container
protected java.lang.String startDateProperty
protected java.lang.String endDateProperty
protected java.lang.String captionProperty
protected java.lang.String descriptionProperty
protected java.lang.String styleNameProperty
protected java.lang.String allDayProperty
protected com.haulmont.bali.events.EventHub events
protected com.haulmont.bali.events.Subscription collectionChangeListener
protected com.haulmont.bali.events.Subscription propertyChangeListener
public ContainerCalendarEventProvider(CollectionContainer<E> container)
protected void onCollectionChanged(CollectionContainer.CollectionChangeEvent<E> event)
protected void onItemPropertyChanged(InstanceContainer.ItemPropertyChangeEvent<E> event)
public CollectionContainer<E> getContainer()
public void addEvent(CalendarEvent event)
CalendarEventProvider
CalendarEvent
to the event provider list.
Not supported by EntityCalendarEventProvider
, use datasource for changing data items.
addEvent
in interface CalendarEventProvider
event
- calendar eventpublic void removeEvent(CalendarEvent event)
CalendarEventProvider
CalendarEvent
from the event provider list.
Not supported by EntityCalendarEventProvider
, use datasource for changing data items.
removeEvent
in interface CalendarEventProvider
event
- calendar eventpublic void removeAllEvents()
CalendarEventProvider
CalendarEvent
in the event provider list.
Not supported by EntityCalendarEventProvider
, use datasource for changing data items.
removeAllEvents
in interface CalendarEventProvider
public com.haulmont.bali.events.Subscription addEventSetChangeListener(java.util.function.Consumer<CalendarEventProvider.EventSetChangeEvent> listener)
addEventSetChangeListener
in interface CalendarEventProvider
public void removeEventSetChangeListener(java.util.function.Consumer<CalendarEventProvider.EventSetChangeEvent> listener)
removeEventSetChangeListener
in interface CalendarEventProvider
listener
- a listener to removepublic java.util.List<CalendarEvent> getEvents()
getEvents
in interface CalendarEventProvider
public void setStartDateProperty(java.lang.String startDateProperty)
EntityCalendarEventProvider
setStartDateProperty
in interface EntityCalendarEventProvider
startDateProperty
- the name of the property that represents start date of eventpublic java.lang.String getStartDateProperty()
getStartDateProperty
in interface EntityCalendarEventProvider
public void setEndDateProperty(java.lang.String endDateProperty)
EntityCalendarEventProvider
setEndDateProperty
in interface EntityCalendarEventProvider
endDateProperty
- the name of the property that represents end date of eventpublic java.lang.String getEndDateProperty()
getEndDateProperty
in interface EntityCalendarEventProvider
public void setCaptionProperty(java.lang.String captionProperty)
EntityCalendarEventProvider
setCaptionProperty
in interface EntityCalendarEventProvider
captionProperty
- the name of the property that represents caption of eventpublic java.lang.String getCaptionProperty()
getCaptionProperty
in interface EntityCalendarEventProvider
public void setDescriptionProperty(java.lang.String descriptionProperty)
EntityCalendarEventProvider
setDescriptionProperty
in interface EntityCalendarEventProvider
descriptionProperty
- the name of the property that represents description of eventpublic java.lang.String getDescriptionProperty()
getDescriptionProperty
in interface EntityCalendarEventProvider
public void setStyleNameProperty(java.lang.String styleNameProperty)
EntityCalendarEventProvider
setStyleNameProperty
in interface EntityCalendarEventProvider
styleNameProperty
- the name of the property that represents style name of eventpublic java.lang.String getStyleNameProperty()
getStyleNameProperty
in interface EntityCalendarEventProvider
public void setAllDayProperty(java.lang.String allDayProperty)
EntityCalendarEventProvider
setAllDayProperty
in interface EntityCalendarEventProvider
allDayProperty
- true
if this event is an all-day event, false
otherwisepublic java.lang.String getIsAllDayProperty()
getIsAllDayProperty
in interface EntityCalendarEventProvider
true
if this event is an all-day event, false
otherwisepublic void unbind()
unbind
in interface EntityCalendarEventProvider