com.vaadin.client.ui.calendar.schedule
Class CalendarEvent

java.lang.Object
  extended by com.vaadin.client.ui.calendar.schedule.CalendarEvent

public class CalendarEvent
extends java.lang.Object

A client side implementation of a calendar event

Since:
7.1
Author:
Vaadin Ltd.

Constructor Summary
CalendarEvent()
           
 
Method Summary
 java.lang.String getCaption()
          Get the caption of the event.
 java.lang.String getDescription()
          Get the description of the event.
 java.util.Date getEnd()
           
 java.util.Date getEndTime()
          Get the end time of the event
 int getIndex()
          Get the (server side) index of the event
 long getRangeInMilliseconds()
          Get the amount of milliseconds between the start and end of the event
 long getRangeInMinutes()
          Get the amount of minutes between the start and end of the event
 long getRangeInMinutesForDay(java.util.Date targetDay)
          Get the amount of minutes for the event on a specific day.
 int getSlotIndex()
          Get the index of the slot where the event in rendered
 java.util.Date getStart()
           
 java.util.Date getStartTime()
          Returns the start time of the event
 java.lang.String getStyleName()
           
 java.lang.String getTimeAsText()
          Get the time as a formatted string
 boolean isAllDay()
          Is the event an all day event.
 boolean isTimeOnDifferentDays()
          Does the event span several days
 void setAllDay(boolean allDay)
          Is the event an all day event.
 void setCaption(java.lang.String caption)
          Set the caption of the event.
 void setDescription(java.lang.String description)
          Set the description of the event.
 void setEnd(java.util.Date end)
           
 void setEndTime(java.util.Date endTime)
          Set the end time of the event
 void setFormat24h(boolean format24h)
          Does the event use the 24h time format
 void setIndex(int index)
          Set the (server side) index of the event
 void setSlotIndex(int index)
          Set the index of the slot where the event in rendered
 void setStart(java.util.Date start)
           
 void setStartTime(java.util.Date startTime)
          Set the start time of the event
 void setStyleName(java.lang.String style)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalendarEvent

public CalendarEvent()
Method Detail

getStyleName

public java.lang.String getStyleName()
See Also:
com.vaadin.addon.calendar.event.CalendarEvent#getStyleName()

getStart

public java.util.Date getStart()
See Also:
com.vaadin.addon.calendar.event.CalendarEvent#getStart()

setStyleName

public void setStyleName(java.lang.String style)
Parameters:
style -
See Also:
com.vaadin.addon.calendar.event.CalendarEvent#getStyleName()

setStart

public void setStart(java.util.Date start)
Parameters:
start -
See Also:
com.vaadin.addon.calendar.event.CalendarEvent#getStart()

getEnd

public java.util.Date getEnd()
Returns:
See Also:
com.vaadin.addon.calendar.event.CalendarEvent#getEnd()

setEnd

public void setEnd(java.util.Date end)
Parameters:
end -
See Also:
com.vaadin.addon.calendar.event.CalendarEvent#getEnd()

getStartTime

public java.util.Date getStartTime()
Returns the start time of the event

Returns:
Time embedded in the Date object

setStartTime

public void setStartTime(java.util.Date startTime)
Set the start time of the event

Parameters:
startTime - The time of the event. Use the time fields in the Date object

getEndTime

public java.util.Date getEndTime()
Get the end time of the event

Returns:
Time embedded in the Date object

setEndTime

public void setEndTime(java.util.Date endTime)
Set the end time of the event

Parameters:
endTime - Time embedded in the Date object

getIndex

public int getIndex()
Get the (server side) index of the event

Returns:

getSlotIndex

public int getSlotIndex()
Get the index of the slot where the event in rendered

Returns:

setSlotIndex

public void setSlotIndex(int index)
Set the index of the slot where the event in rendered

Parameters:
index - The index of the slot

setIndex

public void setIndex(int index)
Set the (server side) index of the event

Parameters:
index - The index

getCaption

public java.lang.String getCaption()
Get the caption of the event. The caption is the text displayed in the calendar on the event.

Returns:

setCaption

public void setCaption(java.lang.String caption)
Set the caption of the event. The caption is the text displayed in the calendar on the event.

Parameters:
caption - The visible caption of the event

getDescription

public java.lang.String getDescription()
Get the description of the event. The description is the text displayed when hoovering over the event with the mouse

Returns:

setDescription

public void setDescription(java.lang.String description)
Set the description of the event. The description is the text displayed when hoovering over the event with the mouse

Parameters:
description -

setFormat24h

public void setFormat24h(boolean format24h)
Does the event use the 24h time format

Parameters:
format24h - True if it uses the 24h format, false if it uses the 12h time format

setAllDay

public void setAllDay(boolean allDay)
Is the event an all day event.

Parameters:
allDay - True if the event should be rendered all day

isAllDay

public boolean isAllDay()
Is the event an all day event.

Returns:

getTimeAsText

public java.lang.String getTimeAsText()
Get the time as a formatted string

Returns:

getRangeInMilliseconds

public long getRangeInMilliseconds()
Get the amount of milliseconds between the start and end of the event

Returns:

getRangeInMinutes

public long getRangeInMinutes()
Get the amount of minutes between the start and end of the event

Returns:

getRangeInMinutesForDay

public long getRangeInMinutesForDay(java.util.Date targetDay)
Get the amount of minutes for the event on a specific day. This is useful if the event spans several days.

Parameters:
targetDay - The date to check
Returns:

isTimeOnDifferentDays

public boolean isTimeOnDifferentDays()
Does the event span several days

Returns:


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.