Revision 11042 trunk/libraries/libUIComponent/src-test/org/gvsig/gui/beans/progressPanel/TestProgressPanel.java
TestProgressPanel.java | ||
---|---|---|
18 | 18 |
*/ |
19 | 19 |
package org.gvsig.gui.beans.progressPanel; |
20 | 20 |
|
21 |
import java.awt.event.ActionEvent; |
|
22 |
import java.awt.event.ActionListener; |
|
23 |
|
|
24 | 21 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanel; |
22 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelEvent; |
|
23 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelListener; |
|
25 | 24 |
import org.gvsig.gui.beans.progresspanel.ProgressPanel; |
26 | 25 |
|
27 | 26 |
/** |
... | ... | |
35 | 34 |
|
36 | 35 |
private tryPanel frame = null; |
37 | 36 |
|
38 |
public class tryPanel implements Runnable, ActionListener {
|
|
37 |
public class tryPanel implements Runnable, ButtonsPanelListener {
|
|
39 | 38 |
private ProgressPanel frame = new ProgressPanel(); |
40 | 39 |
private volatile Thread blinker; |
41 | 40 |
|
... | ... | |
44 | 43 |
frame.setTitle("Actualizando datos"); |
45 | 44 |
frame.showLog(false); |
46 | 45 |
frame.show(); |
47 |
frame.getButtonsPanel().addActionListener(this);
|
|
46 |
frame.getButtonsPanel().addButtonPressedListener(this);
|
|
48 | 47 |
} |
49 | 48 |
|
50 | 49 |
private boolean threadSuspended = false; |
... | ... | |
99 | 98 |
frame = null; |
100 | 99 |
} |
101 | 100 |
|
102 |
public void actionPerformed(ActionEvent e) {
|
|
103 |
if (e.getActionCommand().compareTo(ButtonsPanel.BUTTON_CANCEL + "" ) == 0) {
|
|
101 |
public void actionButtonPressed(ButtonsPanelEvent e) {
|
|
102 |
if (e.getButton() == ButtonsPanel.BUTTON_CANCEL) {
|
|
104 | 103 |
this.stop(); |
105 | 104 |
} |
106 |
|
|
107 | 105 |
} |
108 | 106 |
} |
109 | 107 |
|
Also available in: Unified diff