1 /* |
1 /* |
2 * Copyright (c) 2000 - 2006 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2000 - 2006 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of the License "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
25 import java.awt.GridBagConstraints; |
25 import java.awt.GridBagConstraints; |
26 import java.awt.event.ActionEvent; |
26 import java.awt.event.ActionEvent; |
27 import java.awt.event.ActionListener; |
27 import java.awt.event.ActionListener; |
28 |
28 |
29 /* javax.swing */ |
29 /* javax.swing */ |
|
30 import javax.swing.JLabel; |
30 import javax.swing.JTable; |
31 import javax.swing.JTable; |
31 import javax.swing.JPanel; |
32 import javax.swing.JPanel; |
32 import javax.swing.JComboBox; |
33 import javax.swing.JComboBox; |
33 import javax.swing.JRadioButton; |
34 import javax.swing.JRadioButton; |
34 import javax.swing.JScrollPane; |
35 import javax.swing.JScrollPane; |
75 |
76 |
76 // Domain combo box initialization |
77 // Domain combo box initialization |
77 jDomainCombo = new JComboBox(domains); |
78 jDomainCombo = new JComboBox(domains); |
78 jDomainCombo.setSelectedItem(secConfModel.getSelectedDomain()); |
79 jDomainCombo.setSelectedItem(secConfModel.getSelectedDomain()); |
79 |
80 |
80 JRadioButton realLifeRadio = new JRadioButton( |
81 // JRadioButton realLifeRadio = new JRadioButton( |
81 "Run MIDlets within security domain specified by their certificates"); |
82 // "Run MIDlets within security domain specified by their certificates"); |
82 JRadioButton emulatedRadio = new JRadioButton( |
83 // JRadioButton emulatedRadio = new JRadioButton( |
83 "Run MIDlets within the following domain:"); |
84 // "Run MIDlets within the following domain:"); |
|
85 JLabel obj_JLabel = new JLabel("Run MIDlets within the following domain:"); |
|
86 |
84 |
87 |
85 ButtonGroup bg = new ButtonGroup(); |
88 ButtonGroup bg = new ButtonGroup(); |
86 bg.add(realLifeRadio); |
89 // bg.add(realLifeRadio); |
87 bg.add(emulatedRadio); |
90 // bg.add(emulatedRadio); |
88 if (secConfModel.isEmulatedSecurityMode()) { |
91 // bg.add(obj_JLabel); |
|
92 /* if (secConfModel.isEmulatedSecurityMode()) { |
89 realLifeRadio.setSelected(false); |
93 realLifeRadio.setSelected(false); |
90 emulatedRadio.setSelected(true); |
94 emulatedRadio.setSelected(true); |
91 jDomainCombo.setEnabled(true); |
95 jDomainCombo.setEnabled(true); |
92 } else { |
96 } else { |
93 realLifeRadio.setSelected(true); |
97 realLifeRadio.setSelected(true); |
94 emulatedRadio.setSelected(false); |
98 emulatedRadio.setSelected(false); |
95 jDomainCombo.setEnabled(false); |
99 jDomainCombo.setEnabled(false); |
96 } |
100 }*/ |
97 |
101 |
98 jDomainCombo.addActionListener(new DomainSelectionListener()); |
102 jDomainCombo.addActionListener(new DomainSelectionListener()); |
99 realLifeRadio.addActionListener(new RealLifeRadioListener()); |
103 // realLifeRadio.addActionListener(new RealLifeRadioListener()); |
100 emulatedRadio.addActionListener(new EmulatedRadioListener()); |
104 // emulatedRadio.addActionListener(new EmulatedRadioListener()); |
101 |
105 |
102 BorderPanel bp = new BorderPanel(emulatedRadio); |
106 // BorderPanel bp = new BorderPanel(emulatedRadio); |
|
107 BorderPanel bp = new BorderPanel(obj_JLabel); |
103 bp.getContentPanel().add(createConfigurationsPanel()); |
108 bp.getContentPanel().add(createConfigurationsPanel()); |
104 |
109 |
105 ProtectionDomain d = secConfModel.getSelectedDomain(); |
110 ProtectionDomain d = secConfModel.getSelectedDomain(); |
106 if (d != null && d.isUserDefined() && secConfModel.isEmulatedSecurityMode()) { |
111 if (d != null && d.isUserDefined() && secConfModel.isEmulatedSecurityMode()) { |
107 jBindingsTable.setEnabled(true); |
112 jBindingsTable.setEnabled(true); |
126 gbc.gridwidth = GridBagConstraints.REMAINDER; |
131 gbc.gridwidth = GridBagConstraints.REMAINDER; |
127 gbc.fill = GridBagConstraints.HORIZONTAL; |
132 gbc.fill = GridBagConstraints.HORIZONTAL; |
128 gbc.anchor = GridBagConstraints.NORTH; |
133 gbc.anchor = GridBagConstraints.NORTH; |
129 gbc.insets.left = bp.getBorder().getBorderInsets(bp).left + |
134 gbc.insets.left = bp.getBorder().getBorderInsets(bp).left + |
130 BorderPanel.COMPONENT_INSET_H; |
135 BorderPanel.COMPONENT_INSET_H; |
131 add(realLifeRadio, gbc); |
136 //add(realLifeRadio, gbc); |
132 |
137 |
133 gbc.weighty = 1.0; |
138 gbc.weighty = 1.0; |
134 gbc.insets.left = 0; |
139 gbc.insets.left = 0; |
135 gbc.fill = GridBagConstraints.BOTH; |
140 gbc.fill = GridBagConstraints.BOTH; |
136 gbc.gridheight = GridBagConstraints.REMAINDER; |
141 gbc.gridheight = GridBagConstraints.REMAINDER; |