Java Calendar Component v3.1
www.java-calendar.com

com.imagine.component.calendar.selection
Class CalendarSelectionModelMultipleIntervalSelection

java.lang.Object
  extended bycom.imagine.component.calendar.selection.CalendarSelectionModel
      extended bycom.imagine.component.calendar.selection.CalendarSelectionModelMultipleIntervalSelection

public class CalendarSelectionModelMultipleIntervalSelection
extends CalendarSelectionModel

Defines the selection model for single interval selection.


Constructor Summary
CalendarSelectionModelMultipleIntervalSelection()
           
 
Method Summary
 void addCalendarSelectionListener(CalendarSelectionListener calendarSelectionListener)
          Add a calendar component listener.
 java.util.Date getAnchorSelectionDate()
          Get the anchor selection date.
 java.util.Date getLeadSelectionDate()
          Get the lead selection date.
 java.lang.String getName()
          Get the name of the selection model.
 java.util.Date[] getSelectedDates()
          An array containing the selected dates.
 boolean isDateSelected(java.util.Date date)
          Returns true if the specified date is selected.
 boolean processKeyEvent(java.util.Date date, KeyEventType keyEventType, java.awt.event.KeyEvent keyEvent)
          Process the specified key event received from the calendar component.
 boolean processMouseEvent(java.util.Date date, MouseEventType mouseEventType, java.awt.event.MouseEvent mouseEvent)
          Process the specified mouse event received from the calendar component.
 boolean processMouseMotionEvent(java.util.Date date, MouseMotionEventType mouseMotionEventType, java.awt.event.MouseEvent mouseEvent)
          Process the specified mouse motion event received from the calendar component.
 boolean removeCalendarSelectionListener(CalendarSelectionListener calendarSelectionListener)
          Remove a calendar component listener.
 void setAnchorSelectionDate(java.util.Date date)
          Set the anchor selection date.
 void setLeadSelectionDate(java.util.Date date)
          Set the lead selection date.
 void setSelectedDates(java.util.Date[] dates)
          Set the selected dates.
 
Methods inherited from class com.imagine.component.calendar.selection.CalendarSelectionModel
getCalendarComponent, isDateDisabled, isDateSelectable, isEmptySelectionAllowed, setCalendarComponent, setEmptySelectionAllowed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CalendarSelectionModelMultipleIntervalSelection

public CalendarSelectionModelMultipleIntervalSelection()
Method Detail

processKeyEvent

public boolean processKeyEvent(java.util.Date date,
                               KeyEventType keyEventType,
                               java.awt.event.KeyEvent keyEvent)
Description copied from class: CalendarSelectionModel
Process the specified key event received from the calendar component.

Specified by:
processKeyEvent in class CalendarSelectionModel
Parameters:
date - The current selected date.
keyEventType - The key event type.
keyEvent - The key event to process.
Returns:
true if the event was processed.

processMouseEvent

public boolean processMouseEvent(java.util.Date date,
                                 MouseEventType mouseEventType,
                                 java.awt.event.MouseEvent mouseEvent)
Description copied from class: CalendarSelectionModel
Process the specified mouse event received from the calendar component.

Specified by:
processMouseEvent in class CalendarSelectionModel
Parameters:
date - The current selected date.
mouseEventType - The mouse event type.
mouseEvent - The mouse event to process.
Returns:
true if the event was processed.

processMouseMotionEvent

public boolean processMouseMotionEvent(java.util.Date date,
                                       MouseMotionEventType mouseMotionEventType,
                                       java.awt.event.MouseEvent mouseEvent)
Description copied from class: CalendarSelectionModel
Process the specified mouse motion event received from the calendar component.

Specified by:
processMouseMotionEvent in class CalendarSelectionModel
Parameters:
date - The current selected date.
mouseEvent - The mouse event to process.
Returns:
true if the event was processed.

isDateSelected

public boolean isDateSelected(java.util.Date date)
Description copied from class: CalendarSelectionModel
Returns true if the specified date is selected.

Specified by:
isDateSelected in class CalendarSelectionModel
Parameters:
date - The date to be checked whether it is selected. If the date is null, it tests if the selection is empty.
Returns:
true if the provided date is selected.

setSelectedDates

public void setSelectedDates(java.util.Date[] dates)
Description copied from class: CalendarSelectionModel
Set the selected dates.

Specified by:
setSelectedDates in class CalendarSelectionModel
Parameters:
dates - An array containing the selected dates.

getSelectedDates

public java.util.Date[] getSelectedDates()
Description copied from class: CalendarSelectionModel
An array containing the selected dates.

Specified by:
getSelectedDates in class CalendarSelectionModel
Returns:
An array containing the selected dates.

getAnchorSelectionDate

public java.util.Date getAnchorSelectionDate()
Description copied from class: CalendarSelectionModel
Get the anchor selection date. This is the first selected date in the selected range.

Specified by:
getAnchorSelectionDate in class CalendarSelectionModel
Returns:
The anchor selection date.

setAnchorSelectionDate

public void setAnchorSelectionDate(java.util.Date date)
Description copied from class: CalendarSelectionModel
Set the anchor selection date. This is the first selected date in the selected range.

Specified by:
setAnchorSelectionDate in class CalendarSelectionModel
Parameters:
date - The anchor selection date.

getLeadSelectionDate

public java.util.Date getLeadSelectionDate()
Description copied from class: CalendarSelectionModel
Get the lead selection date. This is the second selected date in the selected range.

Specified by:
getLeadSelectionDate in class CalendarSelectionModel
Returns:
The lead selection date.

setLeadSelectionDate

public void setLeadSelectionDate(java.util.Date date)
Description copied from class: CalendarSelectionModel
Set the lead selection date. This is the second selected date in the selected range.

Specified by:
setLeadSelectionDate in class CalendarSelectionModel
Parameters:
date - The lead selection date.

addCalendarSelectionListener

public void addCalendarSelectionListener(CalendarSelectionListener calendarSelectionListener)
Description copied from class: CalendarSelectionModel
Add a calendar component listener.

Specified by:
addCalendarSelectionListener in class CalendarSelectionModel
Parameters:
calendarSelectionListener - The calendar component listener to be added.

removeCalendarSelectionListener

public boolean removeCalendarSelectionListener(CalendarSelectionListener calendarSelectionListener)
Description copied from class: CalendarSelectionModel
Remove a calendar component listener.

Specified by:
removeCalendarSelectionListener in class CalendarSelectionModel
Parameters:
calendarSelectionListener - The calendar component listener to be removed.

getName

public java.lang.String getName()
Description copied from class: CalendarSelectionModel
Get the name of the selection model.

Specified by:
getName in class CalendarSelectionModel
Returns:
The name of the selection model.

Java Calendar Component v3.1
www.java-calendar.com