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

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

public class WeekGrid
extends SimplePanel

Since:
7.1
Author:
Vaadin Ltd.

Nested Class Summary
static class WeekGrid.Timebar
           
 
Constructor Summary
WeekGrid(VCalendar parent, boolean format24h)
           
 
Method Summary
 void addDate(java.util.Date d)
           
 void addEvent(CalendarEvent e)
           
 void clearDates()
           
 void eventMoved(DateCellDayEvent dayEvent)
           
 VCalendar getCalendar()
           
 int getDateCellCount()
           
 int getDateCellIndex(DateCell dateCell)
           
 DateCell getDateCellOfToday()
           
 int getDateCellWidth()
          Get width of the single date cell
 int[] getDateCellWidths()
           
 int getDateSlotBorder()
           
 int getFirstHour()
           
 int getInternalWidth()
           
 int getLastHour()
           
 VCalendar getParentCalendar()
           
 int getPixelLengthFor(int startFromMinutes, int durationInMinutes)
           
 int getPixelTopFor(int startFromMinutes)
           
 WeekGrid.Timebar getTimeBar()
           
 boolean hasToday()
           
 boolean isDisabled()
           
 void setCalendar(VCalendar calendar)
           
 void setDateColor(java.util.Date when, java.util.Date to, java.lang.String styleName)
           
 void setDisabled(boolean disabled)
           
 void setFirstHour(int firstHour)
           
 void setHeightPX(int intHeight)
           
 void setLastHour(int lastHour)
           
 void setToday(java.util.Date todayDate, java.util.Date todayTimestamp)
           
 void setVerticalScrollPosition(int verticalScrollPosition)
           
 void setWidthPX(int width)
           
 void updateCellHeights()
           
 void updateCellWidths()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeekGrid

public WeekGrid(VCalendar parent,
                boolean format24h)
Method Detail

setVerticalScrollPosition

public void setVerticalScrollPosition(int verticalScrollPosition)

getInternalWidth

public int getInternalWidth()

addDate

public void addDate(java.util.Date d)

getDateCellIndex

public int getDateCellIndex(DateCell dateCell)
Parameters:
dateCell -
Returns:
get the index of the given date cell in this week, starting from 0

getDateSlotBorder

public int getDateSlotBorder()
Returns:
get the slot border in pixels

setWidthPX

public void setWidthPX(int width)

setHeightPX

public void setHeightPX(int intHeight)

clearDates

public void clearDates()

hasToday

public boolean hasToday()
Returns:
true if this weekgrid contains a date that is today

updateCellWidths

public void updateCellWidths()

getDateCellWidths

public int[] getDateCellWidths()
Returns:
an int-array containing the widths of the cells (days)

updateCellHeights

public void updateCellHeights()

addEvent

public void addEvent(CalendarEvent e)

getPixelLengthFor

public int getPixelLengthFor(int startFromMinutes,
                             int durationInMinutes)

getPixelTopFor

public int getPixelTopFor(int startFromMinutes)

eventMoved

public void eventMoved(DateCellDayEvent dayEvent)

setToday

public void setToday(java.util.Date todayDate,
                     java.util.Date todayTimestamp)

getDateCellOfToday

public DateCell getDateCellOfToday()

setDisabled

public void setDisabled(boolean disabled)

isDisabled

public boolean isDisabled()

getTimeBar

public WeekGrid.Timebar getTimeBar()

setDateColor

public void setDateColor(java.util.Date when,
                         java.util.Date to,
                         java.lang.String styleName)

setCalendar

public void setCalendar(VCalendar calendar)
Parameters:
calendar - the calendar to set

getCalendar

public VCalendar getCalendar()
Returns:
the calendar

getDateCellWidth

public int getDateCellWidth()
Get width of the single date cell

Returns:
Date cell width

getDateCellCount

public int getDateCellCount()
Returns:
the number of day cells in this week

setFirstHour

public void setFirstHour(int firstHour)

setLastHour

public void setLastHour(int lastHour)

getFirstHour

public int getFirstHour()

getLastHour

public int getLastHour()

getParentCalendar

public VCalendar getParentCalendar()


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