visualweb.websvcmgr/test/unit/src/org/netbeans/modules/websvc/manager/test/DialogDisplayerNotifier.java
Tests at least should compile now.
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4 * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
6 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7 * Other names may be trademarks of their respective owners.
9 * The contents of this file are subject to the terms of either the GNU
10 * General Public License Version 2 only ("GPL") or the Common
11 * Development and Distribution License("CDDL") (collectively, the
12 * "License"). You may not use this file except in compliance with the
13 * License. You can obtain a copy of the License at
14 * http://www.netbeans.org/cddl-gplv2.html
15 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16 * specific language governing permissions and limitations under the
17 * License. When distributing the software, include this License Header
18 * Notice in each file and include the License file at
19 * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
20 * particular file as subject to the "Classpath" exception as provided
21 * by Oracle in the GPL Version 2 section of the License file that
22 * accompanied this code. If applicable, add the following below the
23 * License Header, with the fields enclosed by brackets [] replaced by
24 * your own identifying information:
25 * "Portions Copyrighted [year] [name of copyright owner]"
29 * Portions Copyrighted 2007 Sun Microsystems, Inc.
32 package org.netbeans.modules.websvc.manager.test;
34 import java.awt.Dialog;
35 import java.util.LinkedList;
36 import org.openide.DialogDescriptor;
37 import org.openide.DialogDisplayer;
38 import org.openide.NotifyDescriptor;
44 public class DialogDisplayerNotifier extends DialogDisplayer {
45 private LinkedList<WebServiceManagerListener> listeners = new LinkedList<WebServiceManagerListener>();
47 public void addListener(WebServiceManagerListener listener) {
48 listeners.add(listener);
51 public void removeListener(WebServiceManagerListener listener) {
52 listeners.remove(listener);
55 public void removeAllListeners() {
60 public Object notify(NotifyDescriptor descriptor) {
61 for (WebServiceManagerListener listener : listeners) {
62 listener.eventFired(new WebServiceManagerEvent((String)descriptor.getMessage()));
64 return NotifyDescriptor.OK_OPTION;
68 public Dialog createDialog(DialogDescriptor descriptor) {