01: package com.nexes.test;
02:
03: import com.nexes.wizard.*;
04:
05: import java.awt.*;
06: import java.awt.event.*;
07: import javax.swing.*;
08:
09: public class TestPanel2Descriptor extends WizardPanelDescriptor
10: implements ActionListener {
11:
12: public static final String IDENTIFIER = "CONNECTOR_CHOOSE_PANEL";
13:
14: TestPanel2 panel2;
15:
16: public TestPanel2Descriptor() {
17:
18: panel2 = new TestPanel2();
19: panel2.addCheckBoxActionListener(this );
20:
21: setPanelDescriptorIdentifier(IDENTIFIER);
22: setPanelComponent(panel2);
23:
24: }
25:
26: public Object getNextPanelDescriptor() {
27: return TestPanel3Descriptor.IDENTIFIER;
28: }
29:
30: public Object getBackPanelDescriptor() {
31: return TestPanel1Descriptor.IDENTIFIER;
32: }
33:
34: public void aboutToDisplayPanel() {
35: setNextButtonAccordingToCheckBox();
36: }
37:
38: public void actionPerformed(ActionEvent e) {
39: setNextButtonAccordingToCheckBox();
40: }
41:
42: private void setNextButtonAccordingToCheckBox() {
43: if (panel2.isCheckBoxSelected())
44: getWizard().setNextFinishButtonEnabled(true);
45: else
46: getWizard().setNextFinishButtonEnabled(false);
47:
48: }
49: }
|