KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > ModelProviderEvent


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.core;
12
13 import org.eclipse.pde.core.IModel;
14 import org.eclipse.pde.core.IModelProviderEvent;
15
16 public class ModelProviderEvent implements IModelProviderEvent {
17     private int types;
18     private Object JavaDoc source;
19     private IModel [] added;
20     private IModel [] removed;
21     private IModel [] changed;
22
23 public ModelProviderEvent(Object JavaDoc source, int types, IModel [] added, IModel [] removed, IModel [] changed) {
24     this.source = source;
25     this.types = types;
26     this.added = added;
27     this.removed = removed;
28     this.changed = changed;
29 }
30
31 public IModel [] getAddedModels() {
32     return (added == null) ? new IModel[0] : added ;
33 }
34
35 public IModel [] getRemovedModels() {
36     return (removed == null) ? new IModel[0] : removed;
37 }
38
39 public IModel [] getChangedModels() {
40     return (changed == null) ? new IModel[0] : changed;
41 }
42
43 public int getEventTypes() {
44     return types;
45 }
46
47 public Object JavaDoc getEventSource() {
48     return source;
49 }
50 }
51
Popular Tags