|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.ui.components.calendar.ContainerEventProvider
public class ContainerEventProvider
A event provider which uses a Container as a datasource. Container
used as data source.
NOTE: The data source must be sorted by date!
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.vaadin.ui.components.calendar.event.CalendarEventProvider |
|---|
CalendarEventProvider.EventSetChangeEvent, CalendarEventProvider.EventSetChangeListener, CalendarEventProvider.EventSetChangeNotifier |
| Field Summary | |
|---|---|
static java.lang.String |
ALL_DAY_PROPERTY
|
static java.lang.String |
CAPTION_PROPERTY
|
static java.lang.String |
DESCRIPTION_PROPERTY
|
static java.lang.String |
ENDDATE_PROPERTY
|
static java.lang.String |
STARTDATE_PROPERTY
|
static java.lang.String |
STYLENAME_PROPERTY
|
| Fields inherited from interface com.vaadin.ui.components.calendar.CalendarComponentEvents.EventMoveHandler |
|---|
eventMoveMethod |
| Fields inherited from interface com.vaadin.ui.components.calendar.CalendarComponentEvents.EventResizeHandler |
|---|
eventResizeMethod |
| Constructor Summary | |
|---|---|
ContainerEventProvider(Container.Indexed container)
Constructor |
|
| Method Summary | |
|---|---|
void |
addEvent(CalendarEvent event)
Adds an event to the event provider |
void |
addEventChangeListener(CalendarEvent.EventChangeListener listener)
Add a listener to listen for EventChangeEvents. |
void |
addEventSetChangeListener(CalendarEventProvider.EventSetChangeListener listener)
Add a listener for listening to when new events are adding or removed from the event provider. |
void |
containerItemSetChange(Container.ItemSetChangeEvent event)
Lets the listener know a Containers visible (filtered and/or sorted, if applicable) Item set has changed. |
void |
detachContainerDataSource()
If you are reusing the container which previously have been attached to this ContainerEventProvider call this method to remove this event providers container listeners before attaching it to an other ContainerEventProvider |
void |
eventMove(CalendarComponentEvents.MoveEvent event)
This method will be called when event has been moved to a new position. |
void |
eventResize(CalendarComponentEvents.EventResize event)
|
java.lang.Object |
getAllDayProperty()
Get the all day property for the event |
java.lang.Object |
getCaptionProperty()
Get the property which provides the caption of the event |
Container.Indexed |
getContainerDataSource()
Returns the container used as data source |
java.lang.Object |
getDescriptionProperty()
Get the property which provides the description of the event |
java.lang.Object |
getEndDateProperty()
Get the property which provides the ending date and time of the event |
java.util.List<CalendarEvent> |
getEvents(java.util.Date startDate,
java.util.Date endDate)
Gets all available events in the target date range between startDate and endDate. |
java.lang.Object |
getStartDateProperty()
Get the property which provides the starting date and time of the event |
java.lang.Object |
getStyleNameProperty()
Get the property which provides the style name for the event |
void |
removeEvent(CalendarEvent event)
Removes an event from the event provider |
void |
removeEventChangeListener(CalendarEvent.EventChangeListener listener)
Remove a listener from the event provider. |
void |
removeEventSetChangeListener(CalendarEventProvider.EventSetChangeListener listener)
Remove a listener which listens to CalendarEventProvider.EventSetChangeEvent-events |
void |
setAllDayProperty(java.lang.Object allDayProperty)
Set the all day property for the event |
void |
setCaptionProperty(java.lang.Object captionProperty)
Set the property which provides the caption of the event |
void |
setContainerDataSource(Container.Indexed container)
Set the container data source |
void |
setDescriptionProperty(java.lang.Object descriptionProperty)
Set the property which provides the description of the event |
void |
setEndDateProperty(java.lang.Object endDateProperty)
Set the property which provides the ending date and time of the event |
void |
setStartDateProperty(java.lang.Object startDateProperty)
Set the property which provides the starting date and time of the event |
void |
setStyleNameProperty(java.lang.Object styleNameProperty)
Set the property which provides the style name for the event |
void |
valueChange(Property.ValueChangeEvent event)
Notifies this listener that the Property's value has changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CAPTION_PROPERTY
public static final java.lang.String DESCRIPTION_PROPERTY
public static final java.lang.String STARTDATE_PROPERTY
public static final java.lang.String ENDDATE_PROPERTY
public static final java.lang.String STYLENAME_PROPERTY
public static final java.lang.String ALL_DAY_PROPERTY
| Constructor Detail |
|---|
public ContainerEventProvider(Container.Indexed container)
container - Container to use as a data source.| Method Detail |
|---|
public void setContainerDataSource(Container.Indexed container)
container - The container to use as datasourcepublic Container.Indexed getContainerDataSource()
public java.util.List<CalendarEvent> getEvents(java.util.Date startDate,
java.util.Date endDate)
CalendarEventProviderGets all available events in the target date range between startDate and endDate. The Vaadin Calendar queries the events from the range that is shown, which is not guaranteed to be the same as the date range that is set.
For example, if you set the date range to be monday 22.2.2010 - wednesday 24.2.2000, the used Event Provider will be queried for events between monday 22.2.2010 00:00 and sunday 28.2.2010 23:59. Generally you can expect the date range to be expanded to whole days and whole weeks.
getEvents in interface CalendarEventProviderstartDate - Start dateendDate - End date
public void addEventSetChangeListener(CalendarEventProvider.EventSetChangeListener listener)
CalendarEventProvider.EventSetChangeNotifier
addEventSetChangeListener in interface CalendarEventProvider.EventSetChangeNotifierlistener - The listener to addpublic void removeEventSetChangeListener(CalendarEventProvider.EventSetChangeListener listener)
CalendarEventProvider.EventSetChangeNotifierCalendarEventProvider.EventSetChangeEvent-events
removeEventSetChangeListener in interface CalendarEventProvider.EventSetChangeNotifierlistener - The listener to removepublic void addEventChangeListener(CalendarEvent.EventChangeListener listener)
CalendarEvent.EventChangeNotifier
addEventChangeListener in interface CalendarEvent.EventChangeNotifierlistener - The listener to addpublic void removeEventChangeListener(CalendarEvent.EventChangeListener listener)
CalendarEvent.EventChangeNotifier
removeEventChangeListener in interface CalendarEvent.EventChangeNotifierlistener - The listener to removepublic java.lang.Object getCaptionProperty()
public void setCaptionProperty(java.lang.Object captionProperty)
public java.lang.Object getDescriptionProperty()
public void setDescriptionProperty(java.lang.Object descriptionProperty)
public java.lang.Object getStartDateProperty()
public void setStartDateProperty(java.lang.Object startDateProperty)
public java.lang.Object getEndDateProperty()
public void setEndDateProperty(java.lang.Object endDateProperty)
public java.lang.Object getStyleNameProperty()
public void setStyleNameProperty(java.lang.Object styleNameProperty)
public void setAllDayProperty(java.lang.Object allDayProperty)
public java.lang.Object getAllDayProperty()
public void containerItemSetChange(Container.ItemSetChangeEvent event)
Container.ItemSetChangeListener
containerItemSetChange in interface Container.ItemSetChangeListenerevent - change event textpublic void valueChange(Property.ValueChangeEvent event)
Property.ValueChangeListener
valueChange in interface Property.ValueChangeListenerevent - value change event objectpublic void eventMove(CalendarComponentEvents.MoveEvent event)
CalendarComponentEvents.EventMoveHandler
eventMove in interface CalendarComponentEvents.EventMoveHandlerevent - MoveEvent containing specific information of the new
position and target event.public void eventResize(CalendarComponentEvents.EventResize event)
eventResize in interface CalendarComponentEvents.EventResizeHandlerpublic void detachContainerDataSource()
public void addEvent(CalendarEvent event)
CalendarEditableEventProvider
addEvent in interface CalendarEditableEventProviderevent - The event to addpublic void removeEvent(CalendarEvent event)
CalendarEditableEventProvider
removeEvent in interface CalendarEditableEventProviderevent - The event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||