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.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 class
WeekGrid.Timebar
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDate(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 cellint[]
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(Date when, Date to, String styleName)
void
setDisabled(boolean disabled)
void
setFirstHour(int firstHour)
void
setHeightPX(int intHeight)
void
setLastHour(int lastHour)
void
setToday(Date todayDate, Date todayTimestamp)
void
setVerticalScrollPosition(int verticalScrollPosition)
void
setWidthPX(int width)
void
updateCellHeights()
void
updateCellWidths()
-
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
-
-
-
-
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()
-
-