Class WeekGrid
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.SimplePanel
-
- com.vaadin.v7.client.ui.calendar.schedule.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 classWeekGrid.Timebar
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDate(Date d)voidaddEvent(CalendarEvent e)voidclearDates()voideventMoved(DateCellDayEvent dayEvent)VCalendargetCalendar()intgetDateCellCount()intgetDateCellIndex(DateCell dateCell)DateCellgetDateCellOfToday()intgetDateCellWidth()Get width of the single date cell.int[]getDateCellWidths()intgetDateSlotBorder()intgetFirstHour()intgetInternalWidth()intgetLastHour()VCalendargetParentCalendar()intgetPixelLengthFor(int startFromMinutes, int durationInMinutes)intgetPixelTopFor(int startFromMinutes)WeekGrid.TimebargetTimeBar()booleanhasToday()booleanisDisabled()voidsetCalendar(VCalendar calendar)voidsetDateColor(Date when, Date to, String styleName)voidsetDisabled(boolean disabled)voidsetFirstHour(int firstHour)voidsetHeightPX(int intHeight)voidsetLastHour(int lastHour)voidsetToday(Date todayDate, Date todayTimestamp)voidsetVerticalScrollPosition(int verticalScrollPosition)voidsetWidthPX(int width)voidupdateCellHeights()voidupdateCellWidths()-
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
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()
-
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)
-
getDateCellOfToday
public DateCell getDateCellOfToday()
-
setDisabled
public void setDisabled(boolean disabled)
-
isDisabled
public boolean isDisabled()
-
getTimeBar
public WeekGrid.Timebar getTimeBar()
-
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()
-
-