com.bradrydzewski.gwt.calendar.client.monthview
Class MonthView

java.lang.Object
  extended by com.bradrydzewski.gwt.calendar.client.CalendarView
      extended by com.bradrydzewski.gwt.calendar.client.monthview.MonthView
All Implemented Interfaces:
HasSettings

public class MonthView
extends CalendarView

A CalendarView that displays appointments for a given month. The Month is displayed in a grid-style view where cells represents days, columns represents days of the week (i.e. Monday, Tuesday, etc.) and rows represent a full week (Sunday through Saturday).

CSS Style Rules

Since:
0.9.0
Author:
Brad Rydzewski

Field Summary
static Comparator<Appointment> APPOINTMENT_COMPARATOR
           
 
Fields inherited from class com.bradrydzewski.gwt.calendar.client.CalendarView
calendarWidget
 
Constructor Summary
MonthView()
           
 
Method Summary
 void attach(CalendarWidget widget)
          This method is called when the MonthView is attached to the Calendar and displayed.
 void doLayout()
          Performs a Layout and arranges all appointments on the MonthView's appointment canvas.
 String getStyleName()
          Gets the Month View's primary style name.
 void onAppointmentSelected(Appointment appt)
           
 void onDeleteKeyPressed()
          Processes user com.google.gwt.event.dom.client.KeyCodes.KEY_DELETE keystrokes.
 void onDoubleClick(com.google.gwt.user.client.Element clickedElement, com.google.gwt.user.client.Event event)
          Handles the DoubleClick event to determine if an Appointment has been selected.
 void onMouseOver(com.google.gwt.user.client.Element element, com.google.gwt.user.client.Event event)
           
 void onSingleClick(com.google.gwt.user.client.Element clickedElement, com.google.gwt.user.client.Event event)
          Handles the a single click to determine if an appointment has been selected.
 
Methods inherited from class com.bradrydzewski.gwt.calendar.client.CalendarView
createAppointment, createAppointment, deleteAppointment, detatch, doSizing, getDisplayedDays, getSettings, onDownArrowKeyPressed, onLeftArrowKeyPressed, onRightArrowKeyPressed, onUpArrowKeyPressed, openAppointment, scrollToHour, selectAppointment, selectNextAppointment, selectPreviousAppointment, setDisplayedDays, setSettings, updateAppointment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPOINTMENT_COMPARATOR

public static final Comparator<Appointment> APPOINTMENT_COMPARATOR
Constructor Detail

MonthView

public MonthView()
Method Detail

attach

public void attach(CalendarWidget widget)
This method is called when the MonthView is attached to the Calendar and displayed. This is where all components are configured and added to the RootPanel.

Overrides:
attach in class CalendarView
Parameters:
widget - The interactive widget containing the calendar

doLayout

public void doLayout()
Performs a Layout and arranges all appointments on the MonthView's appointment canvas.

Specified by:
doLayout in class CalendarView

getStyleName

public String getStyleName()
Gets the Month View's primary style name.

Specified by:
getStyleName in class CalendarView
Returns:
The CSS style that should be used when rendering this calendar view

onDoubleClick

public void onDoubleClick(com.google.gwt.user.client.Element clickedElement,
                          com.google.gwt.user.client.Event event)
Handles the DoubleClick event to determine if an Appointment has been selected. If an appointment has been double clicked the OpenEvent will get fired for that appointment.

Specified by:
onDoubleClick in class CalendarView

onSingleClick

public void onSingleClick(com.google.gwt.user.client.Element clickedElement,
                          com.google.gwt.user.client.Event event)
Handles the a single click to determine if an appointment has been selected. If an appointment is clicked it's selected status will be set to true and a SelectionEvent will be fired.

Specified by:
onSingleClick in class CalendarView

onMouseOver

public void onMouseOver(com.google.gwt.user.client.Element element,
                        com.google.gwt.user.client.Event event)
Specified by:
onMouseOver in class CalendarView

onDeleteKeyPressed

public void onDeleteKeyPressed()
Description copied from class: CalendarView
Processes user com.google.gwt.event.dom.client.KeyCodes.KEY_DELETE keystrokes. The CalendarView implementation is empty so that subclasses are not forced to implement it if no specific logic is needed for com.google.gwt.event.dom.client.KeyCodes.KEY_DELETE keystrokes.

Overrides:
onDeleteKeyPressed in class CalendarView

onAppointmentSelected

public void onAppointmentSelected(Appointment appt)
Specified by:
onAppointmentSelected in class CalendarView


Copyright © 2012. All Rights Reserved.