Revision 11042 trunk/libraries/libUIComponent/src-test/org/gvsig/gui/beans/dialogPanel/TestDialogPanel.java
TestDialogPanel.java | ||
---|---|---|
19 | 19 |
package org.gvsig.gui.beans.dialogPanel; |
20 | 20 |
|
21 | 21 |
import java.awt.BorderLayout; |
22 |
import java.awt.event.ActionEvent; |
|
23 |
import java.awt.event.ActionListener; |
|
24 | 22 |
|
25 | 23 |
import javax.swing.JButton; |
26 | 24 |
import javax.swing.JFrame; |
27 | 25 |
import javax.swing.UIManager; |
28 | 26 |
|
29 | 27 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanel; |
28 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelEvent; |
|
29 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelListener; |
|
30 | 30 |
import org.gvsig.gui.beans.defaultbuttonspanel.DefaultButtonsPanel; |
31 | 31 |
/** |
32 | 32 |
* <code>TestDialogPanel</code>. Test para comprobar el funcionamiento de la |
... | ... | |
35 | 35 |
* @version 15/03/2007 |
36 | 36 |
* @author Borja Sanchez Zamorano (borja.sanchez@iver.es) |
37 | 37 |
*/ |
38 |
public class TestDialogPanel implements ActionListener {
|
|
38 |
public class TestDialogPanel implements ButtonsPanelListener {
|
|
39 | 39 |
private JFrame frame = new JFrame(); |
40 | 40 |
|
41 | 41 |
class NewComponentDialog extends DefaultButtonsPanel { |
... | ... | |
60 | 60 |
frame.getContentPane().add(ncd); |
61 | 61 |
frame.show(); |
62 | 62 |
|
63 |
ncd.getButtonsPanel().addActionListener(this);
|
|
63 |
ncd.addButtonPressedListener(this);
|
|
64 | 64 |
} |
65 | 65 |
|
66 | 66 |
public static void main(String[] args) { |
... | ... | |
72 | 72 |
new TestDialogPanel(); |
73 | 73 |
} |
74 | 74 |
|
75 |
public void actionPerformed(ActionEvent e) {
|
|
76 |
System.out.println("Bot?n pulsado: " + e.getActionCommand());
|
|
75 |
public void actionButtonPressed(ButtonsPanelEvent e) {
|
|
76 |
System.out.println("Bot?n pulsado: " + e.getButton());
|
|
77 | 77 |
} |
78 | 78 |
} |
Also available in: Unified diff