2 |
26 Feb 07 |
jari |
1 |
/* |
2 |
26 Feb 07 |
jari |
Copyright @ 1999-2003, The Institute for Genomic Research (TIGR). |
2 |
26 Feb 07 |
jari |
All rights reserved. |
2 |
26 Feb 07 |
jari |
4 |
*/ |
2 |
26 Feb 07 |
jari |
5 |
/* |
2 |
26 Feb 07 |
jari |
* $RCSfile: ActionInfoDialog.java,v $ |
2 |
26 Feb 07 |
jari |
* $Revision: 1.2 $ |
2 |
26 Feb 07 |
jari |
* $Date: 2006/02/23 21:00:04 $ |
2 |
26 Feb 07 |
jari |
* $Author: caliente $ |
2 |
26 Feb 07 |
jari |
* $State: Exp $ |
2 |
26 Feb 07 |
jari |
11 |
*/ |
2 |
26 Feb 07 |
jari |
12 |
package org.tigr.util.awt; |
2 |
26 Feb 07 |
jari |
13 |
|
2 |
26 Feb 07 |
jari |
14 |
import java.awt.Container; |
2 |
26 Feb 07 |
jari |
15 |
import java.util.Vector; |
2 |
26 Feb 07 |
jari |
16 |
|
2 |
26 Feb 07 |
jari |
17 |
import javax.swing.JDialog; |
2 |
26 Feb 07 |
jari |
18 |
import javax.swing.JFrame; |
2 |
26 Feb 07 |
jari |
19 |
|
2 |
26 Feb 07 |
jari |
20 |
public class ActionInfoDialog extends JDialog { |
2 |
26 Feb 07 |
jari |
21 |
protected Vector listeners = new Vector(); |
2 |
26 Feb 07 |
jari |
22 |
protected Container contentPane; |
2 |
26 Feb 07 |
jari |
23 |
|
2 |
26 Feb 07 |
jari |
24 |
public ActionInfoDialog(JFrame parent, boolean modal) { |
2 |
26 Feb 07 |
jari |
25 |
super(parent, modal); |
2 |
26 Feb 07 |
jari |
26 |
contentPane = getContentPane(); |
2 |
26 Feb 07 |
jari |
27 |
} |
2 |
26 Feb 07 |
jari |
28 |
|
2 |
26 Feb 07 |
jari |
29 |
public ActionInfoDialog(JFrame parent, String title, boolean modal) { |
2 |
26 Feb 07 |
jari |
30 |
super(parent, title, modal); |
2 |
26 Feb 07 |
jari |
31 |
contentPane = getContentPane(); |
2 |
26 Feb 07 |
jari |
32 |
} |
2 |
26 Feb 07 |
jari |
33 |
|
2 |
26 Feb 07 |
jari |
34 |
public void addActionInfoListener(ActionInfoListener listener) { |
2 |
26 Feb 07 |
jari |
35 |
listeners.addElement(listener); |
2 |
26 Feb 07 |
jari |
36 |
} |
2 |
26 Feb 07 |
jari |
37 |
|
2 |
26 Feb 07 |
jari |
38 |
public void removeActionInfoListener(ActionInfoListener listener) { |
2 |
26 Feb 07 |
jari |
39 |
listeners.removeElement(listener); |
2 |
26 Feb 07 |
jari |
40 |
} |
2 |
26 Feb 07 |
jari |
41 |
|
2 |
26 Feb 07 |
jari |
42 |
public void fireEvent(ActionInfoEvent event) { |
2 |
26 Feb 07 |
jari |
43 |
Vector targets = (Vector) listeners.clone(); |
2 |
26 Feb 07 |
jari |
44 |
for (int i = 0; i < targets.size(); i++) { |
2 |
26 Feb 07 |
jari |
45 |
ActionInfoListener listener = (ActionInfoListener) targets.elementAt(i); |
2 |
26 Feb 07 |
jari |
46 |
listener.actionInfoPerformed(event); |
2 |
26 Feb 07 |
jari |
47 |
} |
2 |
26 Feb 07 |
jari |
48 |
} |
2 |
26 Feb 07 |
jari |
49 |
} |