1 /*
2 * Copyright (c) 2003-2008 by Cosylab d. d.
3 *
4 * This file is part of CosyBeans.
5 *
6 * CosyBeans is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * CosyBeans is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with CosyBeans. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 package com.cosylab.application;
21
22 import java.util.EventObject;
23
24 /**
25 * <code>PlugInEvent</code> is triggered by the PlugInManager.
26 *
27 * @author Igor Kriznar (igor.kriznar@cosylab.com)
28 * @version @@VERSION@@
29 */
30 /**
31 * Event used in event notifications through <code>PlugInListener</code>
32 * interface.
33 *
34 * @version @@VERSION@@
35 */
36 public class PlugInEvent extends EventObject {
37
38 private static final long serialVersionUID = 1L;
39 private PlugIn plugin;
40
41 /**
42 * Creates a new instance of this event. Delegates to
43 * parent constructor.
44 *
45 * @param source the plugin manager that is firing this event
46 * @param plugin the plugin which was installed
47 */
48 public PlugInEvent(PlugInManager source, PlugIn plugin)
49 {
50 super(source);
51 this.plugin=plugin;
52 }
53
54
55 /**
56 * Returns plugin which generated this event.
57 * @return plugin which generated this event
58 */
59 public PlugIn getPlugIn() {
60 return plugin;
61 }
62 }
63