org/objectweb/proactive/ext/security/gui/SecurityGui.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.DefaultListModel;
00034 import javax.swing.JFrame;
00035 import javax.swing.JList;
00036 import javax.swing.JMenu;
00037 import javax.swing.JMenuBar;
00038 import javax.swing.JMenuItem;
00039 import javax.swing.JPanel;
00040 import javax.swing.JScrollPane;
00041 
00042 
00047 public class SecurityGui extends JFrame {
00048     private JMenuBar jJMenuBar = null;
00049     private JMenu jMenu = null;
00050     private JMenuItem Menu = null;
00051     private JPanel jPanel = null;
00052     private JList jList = null;
00053     private DefaultListModel listModel = new DefaultListModel();
00054     private JScrollPane jScrollPane = null;
00055     private RuleEditor ruleEditor = null;
00056 
00060     public SecurityGui() {
00061         super();
00062         initialize();
00063     }
00064 
00070     private void initialize() {
00071         this.setContentPane(getJPanel());
00072         this.setVisible(true);
00073         this.setJMenuBar(getJJMenuBar());
00074         this.setSize(859, 599);
00075     }
00076 
00082     private JMenuBar getJJMenuBar() {
00083         if (jJMenuBar == null) {
00084             jJMenuBar = new JMenuBar();
00085             jJMenuBar.add(getJMenu());
00086         }
00087         return jJMenuBar;
00088     }
00089 
00095     private JMenu getJMenu() {
00096         if (jMenu == null) {
00097             jMenu = new JMenu();
00098             jMenu.setText("File");
00099             jMenu.add(getJMenuItem());
00100         }
00101         return jMenu;
00102     }
00103 
00109     private JMenuItem getJMenuItem() {
00110         if (Menu == null) {
00111             Menu = new JMenuItem();
00112             Menu.setName("Menu");
00113             Menu.setText("Connect");
00114         }
00115         return Menu;
00116     }
00117 
00123     private JPanel getJPanel() {
00124         if (jPanel == null) {
00125             jPanel = new JPanel();
00126             jPanel.setLayout(null);
00127             jPanel.setBorder(javax.swing.BorderFactory.createLineBorder(
00128                     java.awt.Color.gray, 5));
00129             jPanel.add(getJScrollPane(), null);
00130             jPanel.add(getRuleEditor(), null);
00131         }
00132         return jPanel;
00133     }
00134 
00140     private JList getJList() {
00141         if (jList == null) {
00142             jList = new JList(listModel);
00143         }
00144         return jList;
00145     }
00146 
00152     private JScrollPane getJScrollPane() {
00153         if (jScrollPane == null) {
00154             jScrollPane = new JScrollPane();
00155             jScrollPane.setBounds(20, 40, 144, 455);
00156             jScrollPane.setViewportView(getJList());
00157         }
00158         return jScrollPane;
00159     }
00160 
00166     private RuleEditor getRuleEditor() {
00167         if (ruleEditor == null) {
00168             ruleEditor = new RuleEditor();
00169             ruleEditor.setBounds(181, 38, 631, 455);
00170         }
00171         return ruleEditor;
00172     }
00173 
00174     public static void main(String[] args) {
00175         SecurityGui s = new SecurityGui();
00176     }
00177 } //  @jve:decl-index=0:visual-constraint="25,19"

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