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.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 }