01: //** Copyright Statement ***************************************************
02: //The Salmon Open Framework for Internet Applications (SOFIA)
03: // Copyright (C) 1999 - 2002, Salmon LLC
04: //
05: // This program is free software; you can redistribute it and/or
06: // modify it under the terms of the GNU General Public License version 2
07: // as published by the Free Software Foundation;
08: //
09: // This program is distributed in the hope that it will be useful,
10: // but WITHOUT ANY WARRANTY; without even the implied warranty of
11: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: // GNU General Public License for more details.
13: //
14: // You should have received a copy of the GNU General Public License
15: // along with this program; if not, write to the Free Software
16: // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17: //
18: // For more information please visit http://www.salmonllc.com
19: //** End Copyright Statement ***************************************************
20: package com.salmonllc.html.events;
21:
22: /////////////////////////
23: //$Archive: /JADE/SourceCode/com/salmonllc/html/events/CalendarDateSelectedEvent.java $
24: //$Author: Dan $
25: //$Revision: 6 $
26: //$Modtime: 10/30/02 2:40p $
27: /////////////////////////
28:
29: import com.salmonllc.html.*;
30: import java.util.*;
31:
32: /**
33: * This object will be created and passed to every Calendar Date Selected event method.
34: */
35:
36: public class CalendarDateSelectedEvent extends java.awt.AWTEvent {
37: GregorianCalendar _date;
38: java.sql.Date _sqlDate;
39: HtmlCalendar _source;
40:
41: /**
42: * This method constructs a new Event.
43: */
44:
45: public CalendarDateSelectedEvent(HtmlCalendar source,
46: GregorianCalendar gDate, java.sql.Date sDate) {
47: super (source, 0);
48: _source = source;
49: _date = gDate;
50: _sqlDate = sDate;
51: }
52:
53: /**
54: * This method returns the calendar that generated the event.
55: */
56: public HtmlCalendar getCalendar() {
57: return _source;
58: }
59:
60: /**
61: * This method returns the selected date as a gregorian calendar
62: */
63: public GregorianCalendar getDateAsCalendar() {
64: return _date;
65: }
66:
67: /**
68: * This method returns the selected date as an SQL Date field
69: */
70: public java.sql.Date getDateAsSQLDate() {
71: return _sqlDate;
72: }
73: }
|