/Users/lyon/j4p/src/net/server/cal/Entry.java

1    /* 
2     * Copyright (c) 1999 Sun Microsystems, Inc. All Rights Reserved. 
3     * 
4     * This software is the confidential and proprietary information of Sun 
5     * Microsystems, Inc. ("Confidential Information").  You shall not 
6     * disclose such Confidential Information and shall use it only in 
7     * accordance with the terms of the license agreement you entered into 
8     * with Sun. 
9     * 
10    * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE 
11    * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
12    * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
13    * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES 
14    * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING 
15    * THIS SOFTWARE OR ITS DERIVATIVES. 
16    * 
17    */ 
18    
19   package net.server.cal; 
20    
21   public class Entry { 
22    
23       String hour; 
24       String description; 
25       String color; 
26    
27       public Entry(String hour) { 
28           this.hour = hour; 
29           this.description = ""; 
30    
31       } 
32    
33       public String getHour() { 
34           return this.hour; 
35       } 
36    
37       public String getColor() { 
38           if (description.equals("")) 
39               return "lightblue"; 
40           else 
41               return "red"; 
42       } 
43    
44       public String getDescription() { 
45           if (description.equals("")) 
46               return "None"; 
47           else 
48               return this.description; 
49       } 
50    
51       public void setDescription(String descr) { 
52           description = descr; 
53       } 
54    
55   } 
56    
57    
58    
59    
60    
61