00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 package org.objectweb.proactive.ext.security.gui;
00032
00033 import javax.swing.ButtonGroup;
00034 import javax.swing.JComboBox;
00035 import javax.swing.JLabel;
00036 import javax.swing.JPanel;
00037 import javax.swing.JRadioButton;
00038
00039
00044 public class RuleCommunication extends JPanel {
00045 private JRadioButton communicationAuthorizedYes = null;
00046 private JRadioButton communicationAuthorizedNo = null;
00047 private ButtonGroup groupAuthentication = new ButtonGroup();
00048 private ButtonGroup groupConfidentiality = new ButtonGroup();
00049 private ButtonGroup groupIntegrity = new ButtonGroup();
00050 private String[] attributes = { "Authorized", "Optional", "Denied" };
00051 private JComboBox comboAuth = null;
00052 private JComboBox comboConf = null;
00053 private JComboBox comboInt = null;
00054
00058 public RuleCommunication() {
00059 super();
00060 initialize();
00061 }
00062
00068 private void initialize() {
00069 javax.swing.JLabel jLabel11 = new JLabel();
00070 javax.swing.JLabel jLabel7 = new JLabel();
00071 javax.swing.JLabel jLabel3 = new JLabel();
00072 javax.swing.JLabel jLabel2 = new JLabel();
00073 javax.swing.JLabel jLabel1 = new JLabel();
00074 javax.swing.JLabel jLabel = new JLabel();
00075 this.setLayout(null);
00076 this.setSize(337, 204);
00077 jLabel.setBounds(11, 8, 190, 26);
00078 jLabel.setText("Communication authorized ? :");
00079 jLabel1.setBounds(63, 35, 30, 26);
00080 jLabel1.setText("Yes");
00081 jLabel2.setBounds(144, 35, 26, 26);
00082 jLabel2.setText("No");
00083 jLabel3.setBounds(13, 64, 108, 28);
00084 jLabel3.setText("Authentication");
00085 jLabel7.setBounds(15, 96, 108, 28);
00086 jLabel7.setText("Confidentiality");
00087 jLabel11.setBounds(16, 132, 108, 28);
00088 jLabel11.setText("Integrity");
00089 this.add(jLabel, null);
00090 this.add(getCommunicationAuthorizedYes(), null);
00091 this.add(getCommunicationAuthorizedNo(), null);
00092 this.add(jLabel3, null);
00093 this.add(jLabel7, null);
00094 this.add(jLabel11, null);
00095 this.add(getComboAuth(), null);
00096 this.add(getComboConf(), null);
00097 this.add(getComboInt(), null);
00098 this.add(jLabel1, null);
00099 this.add(jLabel2, null);
00100 }
00101
00107 private JRadioButton getCommunicationAuthorizedYes() {
00108 if (communicationAuthorizedYes == null) {
00109 communicationAuthorizedYes = new JRadioButton();
00110 communicationAuthorizedYes.setBounds(36, 40, 21, 21);
00111 }
00112 return communicationAuthorizedYes;
00113 }
00114
00120 private JRadioButton getCommunicationAuthorizedNo() {
00121 if (communicationAuthorizedNo == null) {
00122 communicationAuthorizedNo = new JRadioButton();
00123 communicationAuthorizedNo.setBounds(109, 40, 21, 21);
00124 }
00125 return communicationAuthorizedNo;
00126 }
00127
00133 private JComboBox getComboAuth() {
00134 if (comboAuth == null) {
00135 comboAuth = new JComboBox(attributes);
00136 comboAuth.setBounds(139, 68, 169, 23);
00137 }
00138 return comboAuth;
00139 }
00140
00146 private JComboBox getComboConf() {
00147 if (comboConf == null) {
00148 comboConf = new JComboBox(attributes);
00149 comboConf.setBounds(140, 100, 169, 23);
00150 }
00151 return comboConf;
00152 }
00153
00159 private JComboBox getComboInt() {
00160 if (comboInt == null) {
00161 comboInt = new JComboBox(attributes);
00162 comboInt.setBounds(141, 134, 169, 23);
00163 }
00164 return comboInt;
00165 }
00166 }