00001 /* 00002 * ProjectEvent.java 00003 * 00004 * Copyright (C) 2005 Project SQUID, http://www.cs.helsinki.fi/group/squid/ 00005 * 00006 * This file is part of Ikayaki. 00007 * 00008 * Ikayaki is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * Ikayaki is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with Ikayaki; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 */ 00022 package ikayaki; 00023 00024 import java.util.EventObject; 00025 00031 public class ProjectEvent extends EventObject { 00032 00036 private Project project; 00037 00041 private Type type; 00042 00050 public ProjectEvent(Project project, Type type) { 00051 super(project); 00052 if (project == null || type == null) { 00053 throw new NullPointerException(); 00054 } 00055 this.project = project; 00056 this.type = type; 00057 } 00058 00062 public Project getProject() { 00063 return project; 00064 } 00065 00069 public Type getType() { 00070 return type; 00071 } 00072 00076 public enum Type { 00077 STATE_CHANGED, DATA_CHANGED, FILE_SAVED 00078 } 00079 }