org/objectweb/proactive/ext/security/gui/RuleCommunication.java

00001 /* 
00002  * ################################################################
00003  * 
00004  * ProActive: The Java(TM) library for Parallel, Distributed, 
00005  *            Concurrent computing with Security and Mobility
00006  * 
00007  * Copyright (C) 1997-2007 INRIA/University of Nice-Sophia Antipolis
00008  * Contact: proactive@objectweb.org
00009  * 
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Lesser General Public
00012  * License as published by the Free Software Foundation; either
00013  * version 2.1 of the License, or any later version.
00014  *  
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * Lesser General Public License for more details.
00019  * 
00020  * You should have received a copy of the GNU Lesser General Public
00021  * License along with this library; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00023  * USA
00024  *  
00025  *  Initial developer(s):               The ProActive Team
00026  *                        http://www.inria.fr/oasis/ProActive/contacts.html
00027  *  Contributor(s): 
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 } //  @jve:decl-index=0:visual-constraint="74,84"

Generated on Mon Jan 22 15:16:11 2007 for ProActive by  doxygen 1.5.1