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)
CalendarEventProviderCalendarEvent to the event provider list.
Not supported by EntityCalendarEventProvider, use datasource for changing data items.
addEvent in interface CalendarEventProviderevent - calendar eventpublic void removeEvent(CalendarEvent event)
CalendarEventProviderCalendarEvent from the event provider list.
Not supported by EntityCalendarEventProvider, use datasource for changing data items.
removeEvent in interface CalendarEventProviderevent - calendar eventpublic void removeAllEvents()
CalendarEventProviderCalendarEvent in the event provider list.
Not supported by EntityCalendarEventProvider, use datasource for changing data items.
removeAllEvents in interface CalendarEventProviderpublic com.haulmont.bali.events.Subscription addEventSetChangeListener(java.util.function.Consumer<CalendarEventProvider.EventSetChangeEvent> listener)
addEventSetChangeListener in interface CalendarEventProviderpublic void removeEventSetChangeListener(java.util.function.Consumer<CalendarEventProvider.EventSetChangeEvent> listener)
removeEventSetChangeListener in interface CalendarEventProviderlistener - a listener to removepublic java.util.List<CalendarEvent> getEvents()
getEvents in interface CalendarEventProviderpublic void setStartDateProperty(java.lang.String startDateProperty)
EntityCalendarEventProvidersetStartDateProperty in interface EntityCalendarEventProviderstartDateProperty - the name of the property that represents start date of eventpublic java.lang.String getStartDateProperty()
getStartDateProperty in interface EntityCalendarEventProviderpublic void setEndDateProperty(java.lang.String endDateProperty)
EntityCalendarEventProvidersetEndDateProperty in interface EntityCalendarEventProviderendDateProperty - the name of the property that represents end date of eventpublic java.lang.String getEndDateProperty()
getEndDateProperty in interface EntityCalendarEventProviderpublic void setCaptionProperty(java.lang.String captionProperty)
EntityCalendarEventProvidersetCaptionProperty in interface EntityCalendarEventProvidercaptionProperty - the name of the property that represents caption of eventpublic java.lang.String getCaptionProperty()
getCaptionProperty in interface EntityCalendarEventProviderpublic void setDescriptionProperty(java.lang.String descriptionProperty)
EntityCalendarEventProvidersetDescriptionProperty in interface EntityCalendarEventProviderdescriptionProperty - the name of the property that represents description of eventpublic java.lang.String getDescriptionProperty()
getDescriptionProperty in interface EntityCalendarEventProviderpublic void setStyleNameProperty(java.lang.String styleNameProperty)
EntityCalendarEventProvidersetStyleNameProperty in interface EntityCalendarEventProviderstyleNameProperty - the name of the property that represents style name of eventpublic java.lang.String getStyleNameProperty()
getStyleNameProperty in interface EntityCalendarEventProviderpublic void setAllDayProperty(java.lang.String allDayProperty)
EntityCalendarEventProvidersetAllDayProperty in interface EntityCalendarEventProviderallDayProperty - true if this event is an all-day event, false otherwisepublic java.lang.String getIsAllDayProperty()
getIsAllDayProperty in interface EntityCalendarEventProvidertrue if this event is an all-day event, false otherwisepublic void unbind()
unbind in interface EntityCalendarEventProvider