Class WeekGrid

  • All Implemented Interfaces:
    com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.AcceptsOneWidget, com.google.gwt.user.client.ui.HasOneWidget, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, Iterable<com.google.gwt.user.client.ui.Widget>

    public class WeekGrid
    extends com.google.gwt.user.client.ui.SimplePanel
    Since:
    7.1
    Author:
    Vaadin Ltd.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  WeekGrid.Timebar  
      • Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

        com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
      • Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets

        com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
    • Field Summary

      • Fields inherited from class com.google.gwt.user.client.ui.UIObject

        DEBUG_ID_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      WeekGrid​(VCalendar parent, boolean format24h)  
    • 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​(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()
      • getPixelLengthFor

        public int getPixelLengthFor​(int startFromMinutes,
                                     int durationInMinutes)
      • getPixelTopFor

        public int getPixelTopFor​(int startFromMinutes)
      • setToday

        public void setToday​(Date todayDate,
                             Date todayTimestamp)
      • getDateCellOfToday

        public DateCell getDateCellOfToday()
      • setDisabled

        public void setDisabled​(boolean disabled)
      • isDisabled

        public boolean isDisabled()
      • setDateColor

        public void setDateColor​(Date when,
                                 Date to,
                                 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()