|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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.HTMLTable
com.google.gwt.user.client.ui.Grid
org.gwtwidgets.client.temp.TGrid
org.gwtwidgets.client.ui.cal.CalendarPanel
public class CalendarPanel
A simple plain calendar panel without controls.
Styles, one or more may apply to a given cell:
In addition, any calendar cell that has events will also include the class names attached to thise events. For example, the following adds an event to the calendar and adds the class name "holiday" to the event.
CalendarPanel panel = new CalendarPanel();
CalendarEvent evtObj = panel.addEvent(evtDate, false);
evtObj.setStyleClass("holiday");
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.HTMLTable |
|---|
com.google.gwt.user.client.ui.HTMLTable.CellFormatter, com.google.gwt.user.client.ui.HTMLTable.ColumnFormatter, com.google.gwt.user.client.ui.HTMLTable.RowFormatter |
| Field Summary | |
|---|---|
int |
OFFSET_FRIDAY
|
int |
OFFSET_MONDAY
|
int |
OFFSET_SATURDAY
|
int |
OFFSET_SUNDAY
|
int |
OFFSET_THURSDAY
|
int |
OFFSET_TUESDAY
|
int |
OFFSET_WEDNESDAY
|
| Fields inherited from class com.google.gwt.user.client.ui.Grid |
|---|
numColumns, numRows |
| Constructor Summary | |
|---|---|
CalendarPanel()
Create a new CalendarPanel for the current date. |
|
CalendarPanel(java.util.Date date)
Create a CalendarPanel for the specified Date. |
|
CalendarPanel(int month,
int year)
Create a CalendarPanel for the specified month/year. |
|
CalendarPanel(int month,
int year,
CalendarFactory factory)
Create a CalendarPanel for the specified month/year, using the specified CalendarFactory. |
|
| Method Summary | |
|---|---|
void |
addCalendarListener(CalendarListener listener)
Add listener for calendar events. |
CalendarEvent |
addEvent(java.util.Date date,
boolean timeSignificant)
Add a new event to the calendar and returns an event object. |
CalendarEvent |
addEvent(java.util.Date start,
java.util.Date end,
boolean timeSignificant)
Add a new event to the calendar that spans multiple days, and returns an event object. |
void |
addNextMonthActivator(com.google.gwt.user.client.ui.SourcesClickEvents source)
Adds appropriate event handling for a next month button/link. |
void |
addNextYearActivator(com.google.gwt.user.client.ui.SourcesClickEvents source)
Adds appropriate event handling for a next year button/link. |
void |
addPrevMonthActivator(com.google.gwt.user.client.ui.SourcesClickEvents source)
Adds appropriate event handling for a previous month button/link. |
void |
addPrevYearActivator(com.google.gwt.user.client.ui.SourcesClickEvents source)
Adds appropriate event handling for a previous year button/link. |
int |
getCurrentMonth()
Get the current month number 0-11. |
java.lang.String |
getCurrentMonthName()
Get the name of the current month. |
java.lang.String |
getCurrentYear()
Get the current year. |
java.util.List |
getEvents()
|
int |
getFirstDayOffset()
Get the number of days that the calendar columns have been shifted. |
protected void |
onAttach()
|
void |
redraw()
Redraws the calendar. |
void |
removeCalendarListener(CalendarListener listener)
Remove a listener for calendar events. |
void |
removeEvent(CalendarEvent event)
Removes an event from the calendar. |
void |
setCalendarMonth(java.util.Date date)
Change the calendar to a specific date |
void |
setCalendarMonth(int month,
int year)
Change the calendar to a specific month and year |
void |
setFirstDayOffset(int firstDayOffset)
Set the number of columns to shift calendar days. |
void |
setMonthNames(java.lang.String[] inMonthNames)
Set the month names to be used. |
void |
setWeekDayNames(java.lang.String[] inWeekDayNames)
Set the weekday names to be used. |
| Methods inherited from class org.gwtwidgets.client.temp.TGrid |
|---|
clearCell |
| Methods inherited from class com.google.gwt.user.client.ui.Grid |
|---|
createCell, getCellCount, getColumnCount, getRowCount, prepareCell, prepareColumn, prepareRow, resize, resizeColumns, resizeRows |
| Methods inherited from class com.google.gwt.user.client.ui.HTMLTable |
|---|
addTableListener, checkCellBounds, checkRowBounds, clear, getBodyElement, getCellFormatter, getCellPadding, getCellSpacing, getColumnFormatter, getDOMCellCount, getDOMCellCount, getDOMRowCount, getDOMRowCount, getEventTargetCell, getHTML, getRowFormatter, getText, getWidget, insertCell, insertCells, insertRow, internalClearCell, isCellPresent, iterator, onBrowserEvent, remove, removeCell, removeRow, removeTableListener, setBorderWidth, setCellFormatter, setCellPadding, setCellSpacing, setColumnFormatter, setHTML, setRowFormatter, setText, setWidget |
| Methods inherited from class com.google.gwt.user.client.ui.Panel |
|---|
add, adopt, adopt, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
getParent, isAttached, onDetach, removeFromParent, setElement |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final int OFFSET_SUNDAY
public final int OFFSET_MONDAY
public final int OFFSET_TUESDAY
public final int OFFSET_WEDNESDAY
public final int OFFSET_THURSDAY
public final int OFFSET_FRIDAY
public final int OFFSET_SATURDAY
| Constructor Detail |
|---|
public CalendarPanel()
public CalendarPanel(java.util.Date date)
public CalendarPanel(int month,
int year)
month - 0 - 11year - 4 digit year (e.g. 2008)
public CalendarPanel(int month,
int year,
CalendarFactory factory)
month - 0 - 11year - 4 digit year (e.g. 2008)| Method Detail |
|---|
public void setCalendarMonth(int month,
int year)
month - 0 - 11year - 4 digit year (e.g. 2006)public void setCalendarMonth(java.util.Date date)
date - date objectpublic void addPrevYearActivator(com.google.gwt.user.client.ui.SourcesClickEvents source)
source - button or other widget that handles click eventspublic void addNextYearActivator(com.google.gwt.user.client.ui.SourcesClickEvents source)
source - button or other widget that handles click eventspublic void addPrevMonthActivator(com.google.gwt.user.client.ui.SourcesClickEvents source)
source - button or other widget that handles click eventspublic void addNextMonthActivator(com.google.gwt.user.client.ui.SourcesClickEvents source)
source - button or other widget that handles click eventspublic void redraw()
public CalendarEvent addEvent(java.util.Date date,
boolean timeSignificant)
date - date/time of the eventtimeSignificant - false for "all day" events, like a holiday
public CalendarEvent addEvent(java.util.Date start,
java.util.Date end,
boolean timeSignificant)
start - start date/time of the eventend - end date/time of the eventtimeSignificant - false for "all day" events, like a holiday
public void removeEvent(CalendarEvent event)
event - event to be removedpublic void addCalendarListener(CalendarListener listener)
listener - public void removeCalendarListener(CalendarListener listener)
listener - public int getCurrentMonth()
public java.lang.String getCurrentMonthName()
public java.lang.String getCurrentYear()
public void setMonthNames(java.lang.String[] inMonthNames)
inMonthNames - array of 12 month namespublic void setWeekDayNames(java.lang.String[] inWeekDayNames)
inWeekDayNames - array of namespublic int getFirstDayOffset()
public void setFirstDayOffset(int firstDayOffset)
firstDayOffset - offset in daysprotected void onAttach()
onAttach in class com.google.gwt.user.client.ui.Widgetpublic java.util.List getEvents()
CalendarMonth.getEvents()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||