KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > syncclient > demo > DemoCalendar


1 /**
2  * Copyright (C) 2003-2005 Funambol
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * 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
19 package sync4j.syncclient.demo;
20
21 import sync4j.foundation.pdi.event.Calendar;
22
23 /**
24  * An object representing a calendar.
25  * Each calendar is identified by its filename
26  * and the calendar itself in the form of a Calendar object.
27  *
28  * @see sync4j.foundation.pdi.event.Calendar
29  *
30  * @author Fabio Maggi @ Funambol
31  * @author Marco Magistrali @ Funambol
32  * @version $Id: DemoCalendar.java,v 1.3 2005/01/19 11:01:11 fabius Exp $
33  */

34 public class DemoCalendar {
35
36     //---------------------------------------------------------- Constants
37

38     //---------------------------------------------------------- Private data
39

40     private String JavaDoc filename = null ;
41     private Calendar calendar = null ;
42
43     //---------------------------------------------------------- Public methods
44

45     /**
46      * Creates a new calendar
47      *
48      * @param filename the filename for this calendar
49      * @param calendar the Calendar object for this calendar
50      */

51     public DemoCalendar(String JavaDoc filename, Calendar calendar) {
52         this.filename = filename;
53         this.calendar = calendar;
54     }
55
56     /**
57      * Returns the filename for this calendar
58      *
59      * @return the filename for this calendar
60      */

61     public String JavaDoc getFilename() {
62         return filename;
63     }
64
65     /**
66      * Returns the calendar object for this calendar
67      *
68      * @return the calendar object for this calendar
69      */

70     public Calendar getCalendar() {
71         return calendar;
72     }
73
74     /**
75      * Sets the calendar objecy of this calendar
76      *
77      * @param calendar the calendar object to set
78      */

79     public void setCalendar(Calendar calendar) {
80         this.calendar = calendar;
81     }
82
83     //---------------------------------------------------------- Private methods
84
}
Popular Tags