01: /*
02: * ChainBuilder ESB
03: * Visual Enterprise Integration
04: *
05: * Copyright (C) 2006 Bostech Corporation
06: *
07: * This program is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU General Public License as published by the
09: * Free Software Foundation; either version 2 of the License, or (at your option)
10: * any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15: * for more details.
16: *
17: * You should have received a copy of the GNU General Public License along with
18: * this program; if not, write to the Free Software Foundation, Inc.,
19: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: *
21: *
22: * $Id$
23: */
24: package com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.edit.parts;
25:
26: import java.util.ArrayList;
27: import java.util.Collection;
28: import java.util.Iterator;
29:
30: import org.eclipse.emf.common.notify.Notification;
31: import org.eclipse.emf.ecore.EStructuralFeature;
32: import org.eclipse.gmf.runtime.notation.View;
33:
34: /**
35: * @generated NOT
36: */
37: public interface IUpdatableEditPart {
38: /**
39: * @generated
40: */
41: public Refresher getRefresher(EStructuralFeature feature,
42: Notification msg);
43:
44: /**
45: * @generated
46: */
47: public interface Refresher {
48: /**
49: * @generated
50: */
51: public void refresh();
52: }
53:
54: /**
55: * @generated NOT
56: */
57: public void wizardOut(View view, boolean newCom);
58:
59: /**
60: * @generated
61: */
62: public class CompositeRefresher implements Refresher {
63: /**
64: * @generated
65: */
66: public void addRefresher(Refresher refresher) {
67: refreshers.add(refresher);
68: }
69:
70: /**
71: * @generated
72: */
73: public void removeRefresher(Refresher refresher) {
74: refreshers.remove(refresher);
75: }
76:
77: /**
78: * @generated
79: */
80: public void refresh() {
81: for (Iterator it = refreshers.iterator(); it.hasNext();) {
82: Refresher next = (Refresher) it.next();
83: next.refresh();
84: }
85: }
86:
87: private Collection/*<Refresher>*/refreshers = new ArrayList();
88: }
89: }
|