43 |
43 |
*
|
44 |
44 |
*/
|
45 |
45 |
public class TypicalOrAdvancedPanel extends JPanel implements ItemListener,
|
46 |
|
DocumentListener {
|
|
46 |
DocumentListener {
|
47 |
47 |
|
48 |
|
private static final long serialVersionUID = 8488517767926838568L;
|
|
48 |
private static final long serialVersionUID = 8488517767926838568L;
|
49 |
49 |
|
50 |
|
protected DefaultSwingInstallerManager swingInstallerManager = null;
|
|
50 |
protected DefaultSwingInstallerManager swingInstallerManager = null;
|
51 |
51 |
|
52 |
|
private JPanel northPanel;
|
53 |
|
private JRadioButton typicalModeRadioButton;
|
54 |
|
private JRadioButton advancedModeRadioButton;
|
55 |
|
private ButtonGroup buttonGroup;
|
|
52 |
private JPanel northPanel;
|
|
53 |
private JRadioButton typicalModeRadioButton;
|
|
54 |
private JRadioButton advancedModeRadioButton;
|
|
55 |
private ButtonGroup buttonGroup;
|
56 |
56 |
|
57 |
|
public TypicalOrAdvancedPanel() {
|
58 |
|
swingInstallerManager =
|
59 |
|
(DefaultSwingInstallerManager) SwingInstallerLocator
|
60 |
|
.getSwingInstallerManager();
|
61 |
|
initComponents();
|
62 |
|
initListeners();
|
63 |
|
typicalModeRadioButton.setSelected(true);
|
|
57 |
public TypicalOrAdvancedPanel() {
|
|
58 |
swingInstallerManager = (DefaultSwingInstallerManager) SwingInstallerLocator
|
|
59 |
.getSwingInstallerManager();
|
|
60 |
initComponents();
|
|
61 |
initListeners();
|
|
62 |
typicalModeRadioButton.setSelected(true);
|
64 |
63 |
|
65 |
|
}
|
|
64 |
}
|
66 |
65 |
|
67 |
|
private void initListeners() {
|
68 |
|
typicalModeRadioButton.addItemListener(this);
|
69 |
|
advancedModeRadioButton.addItemListener(this);
|
70 |
|
}
|
|
66 |
private void initListeners() {
|
|
67 |
typicalModeRadioButton.addItemListener(this);
|
|
68 |
advancedModeRadioButton.addItemListener(this);
|
|
69 |
}
|
71 |
70 |
|
72 |
|
private void initComponents() {
|
73 |
|
java.awt.GridBagConstraints gridBagConstraints;
|
|
71 |
private void initComponents() {
|
|
72 |
java.awt.GridBagConstraints gridBagConstraints;
|
74 |
73 |
|
75 |
|
northPanel = new JPanel();
|
76 |
|
typicalModeRadioButton = new JRadioButton();
|
77 |
|
advancedModeRadioButton = new JRadioButton();
|
|
74 |
northPanel = new JPanel();
|
|
75 |
typicalModeRadioButton = new JRadioButton();
|
|
76 |
advancedModeRadioButton = new JRadioButton();
|
78 |
77 |
|
79 |
|
buttonGroup = new ButtonGroup();
|
|
78 |
buttonGroup = new ButtonGroup();
|
80 |
79 |
|
81 |
|
buttonGroup.add(typicalModeRadioButton);
|
82 |
|
buttonGroup.add(advancedModeRadioButton);
|
|
80 |
buttonGroup.add(typicalModeRadioButton);
|
|
81 |
buttonGroup.add(advancedModeRadioButton);
|
83 |
82 |
|
84 |
|
setLayout(new BorderLayout());
|
|
83 |
setLayout(new BorderLayout());
|
85 |
84 |
|
86 |
|
northPanel.setLayout(new GridBagLayout());
|
|
85 |
northPanel.setLayout(new GridBagLayout());
|
87 |
86 |
|
88 |
|
typicalModeRadioButton.setText(swingInstallerManager
|
89 |
|
.getText("_typical_installation"));
|
90 |
|
gridBagConstraints = new GridBagConstraints();
|
91 |
|
gridBagConstraints.gridx = 0;
|
92 |
|
gridBagConstraints.gridy = 1;
|
93 |
|
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
94 |
|
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
95 |
|
northPanel.add(typicalModeRadioButton, gridBagConstraints);
|
|
87 |
typicalModeRadioButton.setText(swingInstallerManager
|
|
88 |
.getText("_typical_installation"));
|
|
89 |
gridBagConstraints = new GridBagConstraints();
|
|
90 |
gridBagConstraints.gridx = 0;
|
|
91 |
gridBagConstraints.gridy = 1;
|
|
92 |
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
|
93 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
94 |
northPanel.add(typicalModeRadioButton, gridBagConstraints);
|
96 |
95 |
|
97 |
|
advancedModeRadioButton.setText(swingInstallerManager
|
98 |
|
.getText("_advanced_installation"));
|
99 |
|
gridBagConstraints = new GridBagConstraints();
|
100 |
|
gridBagConstraints.gridx = 0;
|
101 |
|
gridBagConstraints.gridy = 2;
|
102 |
|
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
103 |
|
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
104 |
|
northPanel.add(advancedModeRadioButton, gridBagConstraints);
|
|
96 |
advancedModeRadioButton.setText(swingInstallerManager
|
|
97 |
.getText("_advanced_installation"));
|
|
98 |
gridBagConstraints = new GridBagConstraints();
|
|
99 |
gridBagConstraints.gridx = 0;
|
|
100 |
gridBagConstraints.gridy = 2;
|
|
101 |
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
|
102 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
103 |
northPanel.add(advancedModeRadioButton, gridBagConstraints);
|
105 |
104 |
|
106 |
|
add(northPanel, java.awt.BorderLayout.WEST);
|
107 |
|
}
|
|
105 |
add(northPanel, java.awt.BorderLayout.WEST);
|
|
106 |
}
|
108 |
107 |
|
109 |
|
protected boolean isTypicalModeSelected() {
|
110 |
|
return typicalModeRadioButton.isSelected();
|
111 |
|
}
|
|
108 |
protected boolean isTypicalModeSelected() {
|
|
109 |
return typicalModeRadioButton.isSelected();
|
|
110 |
}
|
112 |
111 |
|
113 |
|
protected boolean isAdvancedModeSelected() {
|
114 |
|
return advancedModeRadioButton.isSelected();
|
115 |
|
}
|
|
112 |
protected boolean isAdvancedModeSelected() {
|
|
113 |
return advancedModeRadioButton.isSelected();
|
|
114 |
}
|
116 |
115 |
|
117 |
|
protected void setEnableTypicalMode(boolean active) {
|
118 |
|
if (active) {
|
119 |
|
typicalModeRadioButton.setSelected(true);
|
120 |
|
} else {
|
121 |
|
advancedModeRadioButton.setSelected(true);
|
122 |
|
}
|
123 |
|
typicalModeRadioButton.setEnabled(active);
|
124 |
|
}
|
|
116 |
protected void setEnableTypicalMode(boolean active) {
|
|
117 |
if (active) {
|
|
118 |
typicalModeRadioButton.setSelected(true);
|
|
119 |
} else {
|
|
120 |
advancedModeRadioButton.setSelected(true);
|
|
121 |
}
|
|
122 |
typicalModeRadioButton.setEnabled(active);
|
|
123 |
}
|
125 |
124 |
|
126 |
|
public void itemStateChanged(ItemEvent arg0) {
|
127 |
|
}
|
|
125 |
public void itemStateChanged(ItemEvent arg0) {
|
|
126 |
}
|
128 |
127 |
|
129 |
|
public void changedUpdate(DocumentEvent arg0) {
|
130 |
|
}
|
|
128 |
public void changedUpdate(DocumentEvent arg0) {
|
|
129 |
}
|
131 |
130 |
|
132 |
|
public void insertUpdate(DocumentEvent arg0) {
|
133 |
|
}
|
|
131 |
public void insertUpdate(DocumentEvent arg0) {
|
|
132 |
}
|
134 |
133 |
|
135 |
|
public void removeUpdate(DocumentEvent arg0) {
|
136 |
|
}
|
|
134 |
public void removeUpdate(DocumentEvent arg0) {
|
|
135 |
}
|
137 |
136 |
|
138 |
137 |
}
|