|
||||||||||
| 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.Composite
com.bradrydzewski.gwt.calendar.client.InteractiveWidget
com.bradrydzewski.gwt.calendar.client.CalendarWidget
public class CalendarWidget
CalendarWidget is an InteractiveWidget
that maintains a calendar model (a set of Appointment objects)
managed through an AppointmentManager.
InteractiveWidget| Nested Class Summary |
|---|
| 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 |
| Field Summary |
|---|
| Fields inherited from class com.bradrydzewski.gwt.calendar.client.InteractiveWidget |
|---|
rootPanel |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
CalendarWidget()
Creates a CalendarWidget with an empty set of appointments
and the current system date as the date currently displayed by the
calendar. |
|
CalendarWidget(Date date)
|
|
| Method Summary | |
|---|---|
void |
addAppointment(Appointment appointment)
Adds an appointment to the calendar. |
void |
addAppointments(ArrayList<Appointment> appointments)
Adds each appointment in the list to the calendar. |
com.google.gwt.event.shared.HandlerRegistration |
addCreateHandler(CreateHandler<Appointment> handler)
|
com.google.gwt.event.shared.HandlerRegistration |
addDateRequestHandler(DateRequestHandler<Date> handler)
Adds a DateRequestEvent handler. |
void |
addDaysToDate(int numOfDays)
Moves this calendar widget current date as many days as
specified by the numOfDays parameter. |
com.google.gwt.event.shared.HandlerRegistration |
addDeleteHandler(DeleteHandler<Appointment> handler)
Adds a DeleteEvent handler. |
com.google.gwt.event.shared.HandlerRegistration |
addMouseOverHandler(MouseOverHandler<Appointment> handler)
Adds a DeleteEvent handler. |
com.google.gwt.event.shared.HandlerRegistration |
addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<Appointment> handler)
|
com.google.gwt.event.shared.HandlerRegistration |
addSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler<Appointment> handler)
|
com.google.gwt.event.shared.HandlerRegistration |
addTimeBlockClickHandler(TimeBlockClickHandler<Date> handler)
Adds a DeleteEvent handler. |
void |
addToRootPanel(com.google.gwt.user.client.ui.Widget widget)
|
com.google.gwt.event.shared.HandlerRegistration |
addUpdateHandler(UpdateHandler<Appointment> handler)
Adds a UpdateEvent handler. |
void |
clearAppointments()
Clears all appointment items. |
void |
doLayout()
Forces the widget to re-calculate and perform layout operations. |
void |
doSizing()
|
void |
fireCreateEvent(Appointment appointment)
|
void |
fireDateRequestEvent(Date date)
|
void |
fireDateRequestEvent(Date date,
com.google.gwt.user.client.Element clicked)
|
void |
fireDeleteEvent(Appointment appointment)
|
void |
fireMouseOverEvent(Appointment appointment,
com.google.gwt.user.client.Element element)
|
void |
fireOpenEvent(Appointment appointment)
|
void |
fireSelectionEvent(Appointment appointment)
|
void |
fireTimeBlockClickEvent(Date date)
|
void |
fireUpdateEvent(Appointment appointment)
|
ArrayList<Appointment> |
getAppointments()
Returns the collection of appointments in the underlying in-memory model of this calendar widget. |
Date |
getDate()
|
int |
getDays()
|
Appointment |
getSelectedAppointment()
Gets the currently selected item. |
CalendarSettings |
getSettings()
|
CalendarView |
getView()
|
boolean |
hasAppointmentSelected()
Indicates whether there is a "currently selected" appointment at the moment. |
boolean |
isTheSelectedAppointment(Appointment appointment)
Tells whether the passed appointment is the currently
selected appointment. |
void |
onDeleteKeyPressed()
Processes com.google.gwt.event.dom.client.KeyCodes.KEY_DELETE
keystrokes. |
void |
onDoubleClick(com.google.gwt.user.client.Element element,
com.google.gwt.user.client.Event event)
Processes mouse double-click events. |
void |
onDownArrowKeyPressed()
Processes com.google.gwt.event.dom.client.KeyCodes.KEY_DOWN
keystrokes. |
void |
onLeftArrowKeyPressed()
Processes com.google.gwt.event.dom.client.KeyCodes.KEY_LEFT
keystrokes. |
void |
onLoad()
|
void |
onMouseDown(com.google.gwt.user.client.Element element,
com.google.gwt.user.client.Event event)
Processes mouse button pressing events. |
void |
onMouseOver(com.google.gwt.user.client.Element element,
com.google.gwt.user.client.Event event)
Processes mouse over events. |
void |
onRightArrowKeyPressed()
Processes com.google.gwt.event.dom.client.KeyCodes.KEY_RIGHT
keystrokes. |
void |
onUpArrowKeyPressed()
Processes com.google.gwt.event.dom.client.KeyCodes.KEY_UP
keystrokes. |
protected void |
refresh()
Performs all layout calculations for the list of appointments and resizes the Calendar View appropriately. |
void |
removeAppointment(Appointment appointment)
Removes an appointment from the calendar. |
void |
removeAppointment(Appointment appointment,
boolean fireEvents)
Removes an appointment from the calendar. |
void |
removeCurrentlySelectedAppointment()
Removes the currently selected appointment from the model, if such appointment is set. |
void |
resetSelectedAppointment()
Resets the "currently selected" appointment of this calendar. |
void |
resumeLayout()
Allows the calendar to perform a layout, sizing the component and placing all appointments. |
void |
scrollToHour(int hour)
|
boolean |
selectNextAppointment()
|
boolean |
selectPreviousAppointment()
|
void |
setCommittedAppointment(Appointment appt)
|
void |
setDate(Date date)
|
void |
setDate(Date date,
int days)
|
void |
setDays(int days)
|
void |
setRollbackAppointment(Appointment appt)
|
void |
setSelectedAppointment(Appointment appointment)
Sets the currently selected item. |
void |
setSelectedAppointment(Appointment appointment,
boolean fireEvents)
|
void |
setSettings(CalendarSettings settings)
|
void |
setView(CalendarView view)
Changes the current view of this calendar widget to the specified view. |
void |
suspendLayout()
Suspends the calendar from performing a layout. |
| Methods inherited from class com.bradrydzewski.gwt.calendar.client.InteractiveWidget |
|---|
getRootPanel, keyboardNavigation, onBrowserEvent |
| Methods inherited from class com.google.gwt.user.client.ui.Composite |
|---|
getWidget, initWidget, isAttached, onAttach, onDetach, performDetachedInitialization, render, render, resolvePotentialElement, setWidget, wrapElement |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onUnload, removeFromParent, setLayoutData, sinkEvents |
| 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, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public CalendarWidget()
CalendarWidget with an empty set of appointments
and the current system date as the date currently displayed by the
calendar.
public CalendarWidget(Date date)
| Method Detail |
|---|
public final void setView(CalendarView view)
view. By setting this widget's current view the whole widget
panel is cleared.
view - The CalendarView implementation to render this
widget's underlying calendarpublic final CalendarView getView()
public Date getDate()
public void setDate(Date date,
int days)
public void setDate(Date date)
public void addDaysToDate(int numOfDays)
date as many days as
specified by the numOfDays parameter.
numOfDays - The number of days to change the calendar date forward
(positive number) or backwards.public int getDays()
public void setDays(int days)
public ArrayList<Appointment> getAppointments()
AppointmentManager.getAppointments()public void removeAppointment(Appointment appointment)
removeAppointment in interface HasAppointmentsappointment - the item to be removed.public void removeCurrentlySelectedAppointment()
public void removeAppointment(Appointment appointment,
boolean fireEvents)
removeAppointment in interface HasAppointmentsappointment - the item to be removed.fireEvents - true to allow deletion events to be
firedpublic void resetSelectedAppointment()
AppointmentManagerpublic void addAppointment(Appointment appointment)
addAppointment in interface HasAppointmentsappointment - item to be addedpublic void addAppointments(ArrayList<Appointment> appointments)
addAppointments in interface HasAppointmentsappointments - items to be added.public void clearAppointments()
clearAppointments in interface HasAppointmentspublic void setSelectedAppointment(Appointment appointment)
setSelectedAppointment in interface HasAppointmentsappointment - the item to be selected, or null to
de-select all items.
public void setSelectedAppointment(Appointment appointment,
boolean fireEvents)
setSelectedAppointment in interface HasAppointmentspublic boolean hasAppointmentSelected()
hasAppointmentSelected in interface HasAppointmentstrue if there is an appointment currently selected,
false if it is null.AppointmentManager.hasAppointmentSelected()public Appointment getSelectedAppointment()
getSelectedAppointment in interface HasAppointmentspublic boolean isTheSelectedAppointment(Appointment appointment)
appointment is the currently
selected appointment.
appointment - The appointment to test to be the currently selected
true if there is a currently selected appointment
and happens to be equal to the passed appointmentAppointmentManager.isTheSelectedAppointment(Appointment)protected void refresh()
public void doLayout()
HasLayout
doLayout in interface HasLayoutpublic void doSizing()
public void onLoad()
onLoad in class com.google.gwt.user.client.ui.Widgetpublic void suspendLayout()
suspendLayout in interface HasLayoutpublic void resumeLayout()
resumeLayout in interface HasLayoutpublic CalendarSettings getSettings()
public void setSettings(CalendarSettings settings)
public void scrollToHour(int hour)
public boolean selectPreviousAppointment()
public boolean selectNextAppointment()
public void onDeleteKeyPressed()
InteractiveWidgetcom.google.gwt.event.dom.client.KeyCodes.KEY_DELETE
keystrokes. Concrete interactive widgets should provide the component's
specific logic.
onDeleteKeyPressed in class InteractiveWidget
public void onDoubleClick(com.google.gwt.user.client.Element element,
com.google.gwt.user.client.Event event)
InteractiveWidget
onDoubleClick in class InteractiveWidgetelement - The HTML DOM element that originated the eventpublic void onDownArrowKeyPressed()
InteractiveWidgetcom.google.gwt.event.dom.client.KeyCodes.KEY_DOWN
keystrokes. Concrete interactive widgets should provide the component's
specific logic.
onDownArrowKeyPressed in class InteractiveWidgetpublic void onLeftArrowKeyPressed()
InteractiveWidgetcom.google.gwt.event.dom.client.KeyCodes.KEY_LEFT
keystrokes. Concrete interactive widgets should provide the component's
specific logic.
onLeftArrowKeyPressed in class InteractiveWidget
public void onMouseDown(com.google.gwt.user.client.Element element,
com.google.gwt.user.client.Event event)
InteractiveWidget
onMouseDown in class InteractiveWidgetelement - The HTML DOM element that originated the event
public void onMouseOver(com.google.gwt.user.client.Element element,
com.google.gwt.user.client.Event event)
InteractiveWidget
onMouseOver in class InteractiveWidgetelement - The HTML DOM element that originated the eventevent - The HTML DOM event that was triggeredpublic void onRightArrowKeyPressed()
InteractiveWidgetcom.google.gwt.event.dom.client.KeyCodes.KEY_RIGHT
keystrokes. Concrete interactive widgets should provide the component's
specific logic.
onRightArrowKeyPressed in class InteractiveWidgetpublic void onUpArrowKeyPressed()
InteractiveWidgetcom.google.gwt.event.dom.client.KeyCodes.KEY_UP
keystrokes. Concrete interactive widgets should provide the component's
specific logic.
onUpArrowKeyPressed in class InteractiveWidgetpublic void fireOpenEvent(Appointment appointment)
public void fireDeleteEvent(Appointment appointment)
public void fireSelectionEvent(Appointment appointment)
public void fireMouseOverEvent(Appointment appointment,
com.google.gwt.user.client.Element element)
public void fireTimeBlockClickEvent(Date date)
public void fireCreateEvent(Appointment appointment)
public void fireDateRequestEvent(Date date)
public void fireDateRequestEvent(Date date,
com.google.gwt.user.client.Element clicked)
public void fireUpdateEvent(Appointment appointment)
public com.google.gwt.event.shared.HandlerRegistration addSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler<Appointment> handler)
addSelectionHandler in interface com.google.gwt.event.logical.shared.HasSelectionHandlers<Appointment>public com.google.gwt.event.shared.HandlerRegistration addDeleteHandler(DeleteHandler<Appointment> handler)
HasDeleteHandlersDeleteEvent handler.
addDeleteHandler in interface HasDeleteHandlers<Appointment>handler - the handler
public com.google.gwt.event.shared.HandlerRegistration addMouseOverHandler(MouseOverHandler<Appointment> handler)
HasMouseOverHandlersDeleteEvent handler.
addMouseOverHandler in interface HasMouseOverHandlers<Appointment>handler - the handler
public com.google.gwt.event.shared.HandlerRegistration addTimeBlockClickHandler(TimeBlockClickHandler<Date> handler)
HasTimeBlockClickHandlersDeleteEvent handler.
addTimeBlockClickHandler in interface HasTimeBlockClickHandlers<Date>handler - the handler
public com.google.gwt.event.shared.HandlerRegistration addUpdateHandler(UpdateHandler<Appointment> handler)
HasUpdateHandlersUpdateEvent handler.
addUpdateHandler in interface HasUpdateHandlers<Appointment>handler - the handler
public com.google.gwt.event.shared.HandlerRegistration addCreateHandler(CreateHandler<Appointment> handler)
public com.google.gwt.event.shared.HandlerRegistration addOpenHandler(com.google.gwt.event.logical.shared.OpenHandler<Appointment> handler)
addOpenHandler in interface com.google.gwt.event.logical.shared.HasOpenHandlers<Appointment>public com.google.gwt.event.shared.HandlerRegistration addDateRequestHandler(DateRequestHandler<Date> handler)
HasDateRequestHandlersDateRequestEvent handler.
addDateRequestHandler in interface HasDateRequestHandlers<Date>handler - the handler
public void addToRootPanel(com.google.gwt.user.client.ui.Widget widget)
public void setRollbackAppointment(Appointment appt)
public void setCommittedAppointment(Appointment appt)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||