/**
* Copyright 1999-2009 The Pegadi Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.pegadi.storysketch.cells;
import java.util.Date;
public class Appointment implements org.jgraph.graph.DefaultGraphCell.ValueChangeHandler, java.io.Serializable {
public static final int TYPE_INTERVIEW = 0;
public static final int TYPE_PHOTOGRAPHER = 1;
public static final int TYPE_OTHER = 2;
String who,where,howLong, interviewBefore, interviewAfter, notes, status;
Date when;
int type;
public Appointment() {
who = "";
where = "";
howLong = "";
// Default date is in one hour
when = new Date((new Date()).getTime() + 1000*60*60);
interviewBefore = "";
interviewAfter = "";
notes = "";
type = TYPE_INTERVIEW;
status = "none";
}
public void setWho(String who) {
this.who = who;
}
public void setWhere(String where) {
this.where = where;
}
public void setHowLong(String howLong) {
this.howLong = howLong;
}
public void setWhen(Date when) {
this.when = when;
}
public String getWho() {
return who;
}
public String getWhere() {
return where;
}
public String getHowLong() {
return howLong;
}
public Date getWhen() {
return when;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getInterviewBefore() {
return interviewBefore;
}
public void setInterviewBefore(String interviewBefore) {
this.interviewBefore = interviewBefore;
}
public String getInterviewAfter() {
return interviewAfter;
}
public void setInterviewAfter(String interviewAfter) {
this.interviewAfter = interviewAfter;
}
public void setNotes(String notes) {
this.notes = notes;
}
public String getNotes() {
return notes;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Object valueChanged(Object value) {
return this;
}
public Object clone() {
Appointment a = new Appointment();
a.setWho(getWho());
a.setWhere(getWhere());
a.setWhen(getWhen());
a.setHowLong(getHowLong());
return a;
}
public String toString() {
return "Avtale";
}
}