01: package org.acm.seguin.pmd.swingui.event;
02:
03: import java.util.EventObject;
04: import java.util.Iterator;
05: import java.util.List;
06:
07: /**
08: *
09: * @author Donald A. Leckie
10: * @since December 13, 2002
11: * @version $Revision: 1.1 $, $Date: 2003/07/29 20:51:59 $
12: */
13: public class RuleSetEvent extends EventObject {
14:
15: private List m_ruleSetList;
16:
17: /**
18: *****************************************************************************
19: *
20: * @param source
21: */
22: private RuleSetEvent(Object source) {
23: super (source);
24: }
25:
26: /**
27: *****************************************************************************
28: *
29: * @param source
30: * @param ruleSetList
31: */
32: private RuleSetEvent(Object source, List ruleSetList) {
33: super (source);
34:
35: m_ruleSetList = ruleSetList;
36: }
37:
38: /**
39: *****************************************************************************
40: *
41: * @return
42: */
43: public List getRuleSetList() {
44: return m_ruleSetList;
45: }
46:
47: /**
48: *****************************************************************************
49: *
50: * @param registeredRuleSets
51: */
52: public static final void notifySaveRuleSets(Object source,
53: List ruleSetList) {
54: RuleSetEvent event = new RuleSetEvent(source, ruleSetList);
55: List listenerList = ListenerList
56: .getListeners(RuleSetEventListener.class);
57: Iterator listeners = listenerList.iterator();
58:
59: while (listeners.hasNext()) {
60: RuleSetEventListener listener;
61:
62: listener = (RuleSetEventListener) listeners.next();
63: listener.saveRuleSets(event);
64: }
65: }
66: }
|