/hg/icedtea-web: Finished implementation of editor of state of r...

jvanek at icedtea.classpath.org jvanek at icedtea.classpath.org
Thu Oct 13 14:32:31 UTC 2016


changeset a566ba109c79 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=a566ba109c79
author: Jiri Vanek <jvanek at redhat.com>
date: Thu Oct 13 16:36:55 2016 +0200

	Finished implementation of editor of state of remembered dialogues

	* netx/net/sourceforge/jnlp/SecurityDesc.java: small fix - not enforcing array on input of method  expecting ... type
	* netx/net/sourceforge/jnlp/controlpanel/ClassFinder.java: do not count interfaces as valid members
	* netx/net/sourceforge/jnlp/controlpanel/RemmeberableDialogueEditor.java: implemented missing code for Expert edit button and for combobox selection. Implemented	save and close and close and cancel buttons.
	* netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java: highlighted some copying whew one would expect instance
	* netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java: gui creation moved to separate method, implemented reactions on RemmeberableDialogueEditor
	* netx/net/sourceforge/jnlp/resources/Messages.properties: added EPE group for RemmeberableDialogueEditor
	* netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageExtendedImpl.java: highlighted some copying whew one would expect instance
	* plugin/icedteanp/java/sun/applet/PluginMessageConsumer.java: made deamon
	* tests/netx/unit/net/sourceforge/jnlp/controlpanel/ClassFinderTest.java: adapted to ignorance of interface


diffstat:

 ChangeLog                                                                                                   |   23 +
 netx/net/sourceforge/jnlp/SecurityDesc.java                                                                 |    8 +-
 netx/net/sourceforge/jnlp/controlpanel/ClassFinder.java                                                     |   11 +-
 netx/net/sourceforge/jnlp/controlpanel/RemmeberableDialogueEditor.java                                      |   95 +++-
 netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java                                  |    4 +-
 netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java                                |  247 +++++----
 netx/net/sourceforge/jnlp/resources/Messages.properties                                                     |   12 +
 netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java                                                  |    7 +-
 netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageExtendedImpl.java |    4 +
 plugin/icedteanp/java/sun/applet/PluginMessageConsumer.java                                                 |    1 +
 tests/netx/unit/net/sourceforge/jnlp/controlpanel/ClassFinderTest.java                                      |    5 +-
 11 files changed, 277 insertions(+), 140 deletions(-)

diffs (truncated from 752 to 500 lines):

diff -r 34b7911de6aa -r a566ba109c79 ChangeLog
--- a/ChangeLog	Tue Mar 15 10:56:52 2016 +0100
+++ b/ChangeLog	Thu Oct 13 16:36:55 2016 +0200
@@ -1,3 +1,26 @@
+2016-10-13  Jiri Vanek <jvanek at redhat.com>
+
+	Finished implementation of editor of state of remembered dialogues 
+	* netx/net/sourceforge/jnlp/SecurityDesc.java: small fix - not enforcing
+	array on input of method  expecting ... type
+	* netx/net/sourceforge/jnlp/controlpanel/ClassFinder.java:
+	do not count interfaces as valid members
+	* netx/net/sourceforge/jnlp/controlpanel/RemmeberableDialogueEditor.java:
+	implemented missing code for Expert edit button and for combobox selection.
+	Implemented	save and close and close and cancel buttons.
+	* netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java:
+	highlighted some copying whew one would expect instance
+	* netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java:
+	gui creation moved to separate method, implemented reactions on RemmeberableDialogueEditor
+	* netx/net/sourceforge/jnlp/resources/Messages.properties:
+	added EPE group for RemmeberableDialogueEditor
+	* netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageExtendedImpl.java:
+	highlighted some copying whew one would expect instance
+	* plugin/icedteanp/java/sun/applet/PluginMessageConsumer.java: made deamon
+	* tests/netx/unit/net/sourceforge/jnlp/controlpanel/ClassFinderTest.java:
+	adapted to ignorance of interface
+
+
 2016-03-15  Jiri Vanek <jvanek at redhat.com>
 
 	* NEWS: mentioned PR2855
diff -r 34b7911de6aa -r a566ba109c79 netx/net/sourceforge/jnlp/SecurityDesc.java
--- a/netx/net/sourceforge/jnlp/SecurityDesc.java	Tue Mar 15 10:56:52 2016 +0100
+++ b/netx/net/sourceforge/jnlp/SecurityDesc.java	Thu Oct 13 16:36:55 2016 +0200
@@ -155,11 +155,11 @@
      */
     private static Class<Permission> urlPermissionClass = null;
     private static Constructor<Permission> urlPermissionConstructor = null;
-
+    
     static {
         try {
             urlPermissionClass = (Class<Permission>) Class.forName("java.net.URLPermission");
-            urlPermissionConstructor = urlPermissionClass.getDeclaredConstructor(new Class[] { String.class });
+            urlPermissionConstructor = urlPermissionClass.getDeclaredConstructor(String.class);
         } catch (final ReflectiveOperationException | SecurityException e) {
             OutputController.getLogger().log(OutputController.Level.WARNING_DEBUG, "Exception while reflectively finding URLPermission - host is probably not running Java 8+");
             OutputController.getLogger().log(OutputController.Level.WARNING_DEBUG, e);
@@ -249,7 +249,7 @@
             new PropertyPermission("swing.noxp", "read,write"),
             new PropertyPermission("swing.useSystemFontSettings", "read,write"),
     };
-
+    
     /**
      * Create a security descriptor.
      *
@@ -386,7 +386,7 @@
         for (final Permission permission : urlPermissions) {
             permissions.add(permission);
         }
-
+        
         return permissions;
     }
 
diff -r 34b7911de6aa -r a566ba109c79 netx/net/sourceforge/jnlp/controlpanel/ClassFinder.java
--- a/netx/net/sourceforge/jnlp/controlpanel/ClassFinder.java	Tue Mar 15 10:56:52 2016 +0100
+++ b/netx/net/sourceforge/jnlp/controlpanel/ClassFinder.java	Thu Oct 13 16:36:55 2016 +0200
@@ -57,12 +57,13 @@
     public static final String CUSTOM_CLASS_PATH_PROPERTY = "custom.class.path";
     public static final String BOOT_CLASS_PATH_PROPERTY = "sun.boot.class.path";
 
-    
     static public <T> List<Class<? extends T>> findAllMatchingTypes(Class<T> toFind) {
         List<Class<? extends T>> returnedClasses = new ArrayList<>();
         Set<Class> foundClasses = walkClassPath(toFind);
         for (Class<?> clazz : foundClasses) {
-            returnedClasses.add((Class<? extends T>) clazz);
+            if (!clazz.isInterface()) {
+                returnedClasses.add((Class<? extends T>) clazz);
+            }
         }
         return returnedClasses;
     }
@@ -121,9 +122,9 @@
     }
 
     static private Class determine(String name, Class toFind) {
-         if (name.contains("$")) {
-             return null;
-         }
+        if (name.contains("$")) {
+            return null;
+        }
         try {
             if (name.endsWith(".class")) {
                 name = name.replace(".class", "");
diff -r 34b7911de6aa -r a566ba109c79 netx/net/sourceforge/jnlp/controlpanel/RemmeberableDialogueEditor.java
--- a/netx/net/sourceforge/jnlp/controlpanel/RemmeberableDialogueEditor.java	Tue Mar 15 10:56:52 2016 +0100
+++ b/netx/net/sourceforge/jnlp/controlpanel/RemmeberableDialogueEditor.java	Thu Oct 13 16:36:55 2016 +0200
@@ -35,6 +35,7 @@
  */
 package net.sourceforge.jnlp.controlpanel;
 
+import java.awt.Button;
 import java.awt.GridLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -48,7 +49,9 @@
 import javax.swing.JDialog;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
+import javax.swing.JOptionPane;
 import javax.swing.event.ListDataListener;
+import net.sourceforge.jnlp.runtime.Translator;
 import net.sourceforge.jnlp.security.dialogs.remember.AppletSecurityActions;
 import net.sourceforge.jnlp.security.dialogs.remember.ExecuteAppletAction;
 import net.sourceforge.jnlp.security.dialogs.remember.RememberableDialog;
@@ -64,11 +67,19 @@
     private final List<Class<? extends RememberableDialog>> allClasses;
     private final AppletSecurityActions actions;
 
+    private AppletSecurityActions result;
+    private final RemmeberableDialogueEditor self;
+    private final JFrame frame;
+
     RemmeberableDialogueEditor(JFrame jFrame, boolean modal, Object dialogs) {
         super(jFrame, modal);
+        frame=jFrame;
+        this.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
+        self = this;
         actions = (AppletSecurityActions) dialogs;
         allClasses = ClassFinder.findAllMatchingTypes(RememberableDialog.class);
         recreateGui();
+        this.setLocationRelativeTo(jFrame);
     }
 
     private void recreateGui() {
@@ -76,13 +87,12 @@
         final JDialog d = this;
         getContentPane().removeAll();
         d.setLayout(new GridLayout(0, 4));
-        
 
-        final List<Class<? extends RememberableDialog>> addedBleClasses = new ArrayList<>(allClasses);
-        for (Map.Entry<String, SavedRememberAction> entry : entries) {
-            String dialog = entry.getKey();
-            for (int i = 0; i < addedBleClasses.size(); i++) {
-                final Class<? extends RememberableDialog> get = addedBleClasses.get(i);
+        final List<Class<? extends RememberableDialog>> addedableClasses = new ArrayList<>(allClasses);
+        for (final Map.Entry<String, SavedRememberAction> entry : entries) {
+            final String dialog = entry.getKey();
+            for (int i = 0; i < addedableClasses.size(); i++) {
+                final Class<? extends RememberableDialog> get = addedableClasses.get(i);
                 String s = get.getSimpleName();
                 if (s.equals(dialog)) {
                     JButton bb = new JButton("-");
@@ -96,11 +106,38 @@
                     });
                     d.add(bb);
                     d.add(new JLabel(entry.getKey()));
-                    JComboBox cbb = new JComboBox(ExecuteAppletAction.values());
+                    final JComboBox<ExecuteAppletAction> cbb = new JComboBox(ExecuteAppletAction.values());
                     cbb.setSelectedItem(entry.getValue().getAction());
+                    cbb.addActionListener(new ActionListener() {
+                        @Override
+                        public void actionPerformed(ActionEvent e) {
+                            actions.setAction(entry.getKey(), createRember((ExecuteAppletAction) cbb.getSelectedItem(), entry));
+                        }
+
+                        private SavedRememberAction createRember(ExecuteAppletAction nwValue, Map.Entry<String, SavedRememberAction> entry) {
+                            return new SavedRememberAction(nwValue, entry.getValue().getSavedValue());
+                        }
+                    });
                     d.add(cbb);
-                    d.add(new JButton("Expert edit"));
-                    addedBleClasses.remove(i);
+                    JButton expertButton = new JButton(Translator.R("EPEexpert"));
+                    expertButton.setToolTipText(Translator.R("EPEexpertHelp"));
+                    expertButton.addActionListener(new ActionListener() {
+                        @Override
+                        public void actionPerformed(ActionEvent e) {
+                            Object result = JOptionPane.showInputDialog(self.frame, entry.getValue().getSavedValue(), Translator.R("EPEexpertHint"), JOptionPane.YES_NO_OPTION, null, null, entry.getValue().getSavedValue());
+                            if (result != null) {
+                                String s = result.toString();
+                                if (!s.trim().isEmpty()){
+                                    actions.setAction(entry.getKey(), createRember(entry.getValue().getAction(), s));
+                                }
+                            }
+                        }
+                        private SavedRememberAction createRember(ExecuteAppletAction action, String newValue) {
+                            return new SavedRememberAction(action, newValue);
+                        }
+                    });
+                    d.add(expertButton);
+                    addedableClasses.remove(i);
                     i--;
                 }
             }
@@ -113,8 +150,8 @@
 
             @Override
             public void setSelectedItem(Object anItem) {
-                for (int i = 0; i < addedBleClasses.size(); i++) {
-                    Class<? extends RememberableDialog> get = addedBleClasses.get(i);
+                for (int i = 0; i < addedableClasses.size(); i++) {
+                    Class<? extends RememberableDialog> get = addedableClasses.get(i);
                     if (get.getSimpleName().equals(anItem)) {
                         selected = get.getSimpleName();
                     }
@@ -129,12 +166,12 @@
 
             @Override
             public int getSize() {
-                return addedBleClasses.size();
+                return addedableClasses.size();
             }
 
             @Override
             public String getElementAt(int index) {
-                return addedBleClasses.get(index).getSimpleName();
+                return addedableClasses.get(index).getSimpleName();
             }
 
             @Override
@@ -147,20 +184,50 @@
 
             }
         };
+        for (int x = 0; x < 4; x++) {
+            Button b = new Button(Translator.R("EPEhelp" + (x + 1)));
+            b.setEnabled(false);
+            d.add(b);
+        }
         final JComboBox<String> cb = new JComboBox<>(model);
         JButton b = new JButton("+");
         b.addActionListener(new ActionListener() {
 
             @Override
             public void actionPerformed(ActionEvent e) {
-                actions.setAction(addedBleClasses.get(cb.getSelectedIndex()), new SavedRememberAction(ExecuteAppletAction.NEVER, ExecuteAppletAction.NEVER.toChar()));
+                if (cb.getSelectedIndex() < 0) {
+                    return;
+                }
+                actions.setAction(addedableClasses.get(cb.getSelectedIndex()), new SavedRememberAction(ExecuteAppletAction.NEVER, ExecuteAppletAction.NEVER.toChar()));
                 recreateGui();
             }
         });
         d.add(b);
         d.add(cb);
+        JButton save = new JButton(Translator.R("EPEsave"));
+        save.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                result = actions;
+                self.setVisible(false);
+            }
+        });
+        d.add(save);
+        JButton cancel = new JButton(Translator.R("EPEcancel"));
+        cancel.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                result = null;
+                self.setVisible(false);
+            }
+        });
+        d.add(cancel);
         d.pack();
 
     }
 
+    public AppletSecurityActions getResult() {
+        return result;
+    }
+
 }
diff -r 34b7911de6aa -r a566ba109c79 netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java
--- a/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java	Tue Mar 15 10:56:52 2016 +0100
+++ b/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java	Thu Oct 13 16:36:55 2016 +0200
@@ -113,7 +113,7 @@
 
     @Override
     public Object getValueAt(int rowIndex, int columnIndex) {
-
+        //tis returns copy, so we can save/cancel
         UnsignedAppletActionEntry source = back.toArray()[rowIndex];
         if (columnIndex == 0) {
             return source.getAppletSecurityActions();
@@ -136,7 +136,7 @@
     @Override
     public void setValueAt(final Object aValue, final int rowIndex, final int columnIndex) {
         final UnsignedAppletActionEntry source = back.toArray()[rowIndex];
-        back.modify(source, columnIndex, aValue);
+        back.modify(source, columnIndex, aValue.toString());
 
     }
 
diff -r 34b7911de6aa -r a566ba109c79 netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java
--- a/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java	Tue Mar 15 10:56:52 2016 +0100
+++ b/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java	Thu Oct 13 16:36:55 2016 +0200
@@ -37,12 +37,14 @@
 
 import java.awt.BorderLayout;
 import java.awt.Component;
+import java.awt.Container;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.KeyEvent;
 import java.awt.event.KeyListener;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
+import java.awt.event.WindowEvent;
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileOutputStream;
@@ -71,7 +73,6 @@
 import javax.swing.JScrollPane;
 import javax.swing.JTabbedPane;
 import javax.swing.JTable;
-import javax.swing.JTextArea;
 import javax.swing.JTextField;
 import javax.swing.LayoutStyle;
 import javax.swing.ListCellRenderer;
@@ -165,6 +166,7 @@
             }
         });
     }
+    private final UnsignedAppletsTrustingListPanel self;
 
     public UnsignedAppletsTrustingListPanel(File globalSettings, File customSettings, DeploymentConfiguration conf) {
         customBackEnd = new UnsignedAppletActionStorageExtendedImpl(customSettings);
@@ -173,24 +175,9 @@
         globalModel = new UnsignedAppletActionTableModel(globalBackEnd);
         customFilter = new ByPermanencyFilter(customModel);
         globalFilter = new ByPermanencyFilter(globalModel);
-        initComponents();
-        userTable.setRowSorter(customFilter);
-        globalTable.setRowSorter(globalFilter);
+        self=this;
         this.conf = conf;
-        AppletSecurityLevel gs = AppletSecurityLevel.getDefault();
-        String s = conf.getProperty(DeploymentConfiguration.KEY_SECURITY_LEVEL);
-        if (s != null) {
-            gs = AppletSecurityLevel.fromString(s);
-        }
-        mainPolicyComboBox.setSelectedItem(gs);
-        userTable.getSelectionModel().addListSelectionListener(new SingleSelectionListenerImpl(userTable));
-        globalTable.getSelectionModel().addListSelectionListener(new SingleSelectionListenerImpl(globalTable));
-
-        userTable.addKeyListener(new DeleteAdapter(userTable));
-        globalTable.addKeyListener(new DeleteAdapter(globalTable));
-        currentTable = userTable;
-        currentModel = customModel;
-        setButtons((!currentModel.back.isReadOnly()));
+        reloadGui();
     }
 
     public static String appletItemsToCaption(List<UnsignedAppletActionEntry> ii, String caption) {
@@ -266,9 +253,9 @@
         public final Component getListCellRendererComponent(final JList<?> list,
                 final Object value, final int index, final boolean isSelected,
                 final boolean cellHasFocus) {
-        	if (value != null) {
-        		setToolTipText(value.toString());
-        	}
+            if (value != null) {
+                setToolTipText(value.toString());
+            }
             return super.getListCellRendererComponent(list, value, index, isSelected,
                     cellHasFocus);
         }
@@ -282,15 +269,15 @@
         userTable = createTable(customModel);
         globalTable = createTable(globalModel);
         helpButton = new JButton();
-        mainPolicyComboBox = new JComboBox<>(new AppletSecurityLevel[] {
-                    AppletSecurityLevel.DENY_ALL,
-                    AppletSecurityLevel.DENY_UNSIGNED,
-                    AppletSecurityLevel.ASK_UNSIGNED,
-                    AppletSecurityLevel.ALLOW_UNSIGNED
-                });
+        mainPolicyComboBox = new JComboBox<>(new AppletSecurityLevel[]{
+            AppletSecurityLevel.DENY_ALL,
+            AppletSecurityLevel.DENY_UNSIGNED,
+            AppletSecurityLevel.ASK_UNSIGNED,
+            AppletSecurityLevel.ALLOW_UNSIGNED
+        });
         mainPolicyComboBox.setSelectedItem(AppletSecurityLevel.getDefault());
         mainPolicyComboBox.setRenderer(comboRendererWithToolTips);
-        
+
         securityLevelLabel = new JLabel();
         globalBehaviourLabel = new JLabel();
         deleteTypeComboBox = new JComboBox<>();
@@ -365,27 +352,26 @@
             }
         });
 
-
         securityLevelLabel.setText(Translator.R("APPEXTSECguiPanelSecurityLevel"));
 
         globalBehaviourLabel.setText(Translator.R("APPEXTSECguiPanelGlobalBehaviourCaption"));
 
-        deleteTypeComboBox.setModel(new DefaultComboBoxModel<>(new String[] {
-                    Translator.R("APPEXTSECguiPanelDeleteMenuSelected"),
-                    Translator.R("APPEXTSECguiPanelDeleteMenuAllA"),
-                    Translator.R("APPEXTSECguiPanelDeleteMenuAllN"),
-                    Translator.R("APPEXTSECguiPanelDeleteMenuAlly"),
-                    Translator.R("APPEXTSECguiPanelDeleteMenuAlln"),
-                    Translator.R("APPEXTSECguiPanelDeleteMenuAllAll")}));
+        deleteTypeComboBox.setModel(new DefaultComboBoxModel<>(new String[]{
+            Translator.R("APPEXTSECguiPanelDeleteMenuSelected"),
+            Translator.R("APPEXTSECguiPanelDeleteMenuAllA"),
+            Translator.R("APPEXTSECguiPanelDeleteMenuAllN"),
+            Translator.R("APPEXTSECguiPanelDeleteMenuAlly"),
+            Translator.R("APPEXTSECguiPanelDeleteMenuAlln"),
+            Translator.R("APPEXTSECguiPanelDeleteMenuAllAll")}));
         deleteTypeComboBox.setRenderer(comboRendererWithToolTips);
-        viewFilter.setModel(new DefaultComboBoxModel<>(new String[] {
-                    Translator.R("APPEXTSECguiPanelShowOnlyPermanent"),
-                    Translator.R("APPEXTSECguiPanelShowOnlyTemporal"),
-                    Translator.R("APPEXTSECguiPanelShowAll"),
-                    Translator.R("APPEXTSECguiPanelShowOnlyPermanentA"),
-                    Translator.R("APPEXTSECguiPanelShowOnlyPermanentN"),
-                    Translator.R("APPEXTSECguiPanelShowOnlyTemporalY"),
-                    Translator.R("APPEXTSECguiPanelShowOnlyTemporalN")}));
+        viewFilter.setModel(new DefaultComboBoxModel<>(new String[]{
+            Translator.R("APPEXTSECguiPanelShowOnlyPermanent"),
+            Translator.R("APPEXTSECguiPanelShowOnlyTemporal"),
+            Translator.R("APPEXTSECguiPanelShowAll"),
+            Translator.R("APPEXTSECguiPanelShowOnlyPermanentA"),
+            Translator.R("APPEXTSECguiPanelShowOnlyPermanentN"),
+            Translator.R("APPEXTSECguiPanelShowOnlyTemporalY"),
+            Translator.R("APPEXTSECguiPanelShowOnlyTemporalN")}));
         viewFilter.setRenderer(comboRendererWithToolTips);
         deleteButton.setText(Translator.R("APPEXTSECguiPanelDeleteButton"));
         deleteButton.setToolTipText(Translator.R("APPEXTSECguiPanelDeleteButtonToolTip"));
@@ -462,54 +448,54 @@
         layout.setHorizontalGroup(
                 layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                 .addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap()
-                .addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
-                .addComponent(mainTabPanel, GroupLayout.Alignment.LEADING, 0, 583, Short.MAX_VALUE)
-                .addComponent(globalBehaviourLabel, GroupLayout.Alignment.LEADING, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
-                .addComponent(securityLevelLabel, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(mainPolicyComboBox, 0, 474, Short.MAX_VALUE))
-                .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
-                .addComponent(addRowButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
-                .addComponent(validateTableButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
-                .addComponent(testUrlButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 94, Short.MAX_VALUE)
-                .addComponent(moveRowDownButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(moveRowUpButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                .addGroup(layout.createSequentialGroup()
-                .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                .addGroup(layout.createSequentialGroup()
-                .addComponent(deleteButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(deleteTypeComboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(invertSelectionButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                .addGroup(layout.createSequentialGroup()
-                .addComponent(askBeforeActionCheckBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(filterRegexesCheckBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 93, Short.MAX_VALUE)
-                .addComponent(viewFilter, 0, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE))).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(helpButton, GroupLayout.PREFERRED_SIZE, 108, GroupLayout.PREFERRED_SIZE))).addContainerGap()));
+                        .addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
+                                .addComponent(mainTabPanel, GroupLayout.Alignment.LEADING, 0, 583, Short.MAX_VALUE)
+                                .addComponent(globalBehaviourLabel, GroupLayout.Alignment.LEADING, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                                .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
+                                        .addComponent(securityLevelLabel, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+                                        .addComponent(mainPolicyComboBox, 0, 474, Short.MAX_VALUE))
+                                .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
+                                        .addComponent(addRowButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
+                                        .addComponent(validateTableButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
+                                        .addComponent(testUrlButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 94, Short.MAX_VALUE)
+                                        .addComponent(moveRowDownButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+                                        .addComponent(moveRowUpButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                                .addGroup(layout.createSequentialGroup()
+                                        .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
+                                                .addGroup(layout.createSequentialGroup()
+                                                        .addComponent(deleteButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+                                                        .addComponent(deleteTypeComboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+                                                        .addComponent(invertSelectionButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                                                .addGroup(layout.createSequentialGroup()
+                                                        .addComponent(askBeforeActionCheckBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+                                                        .addComponent(filterRegexesCheckBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 93, Short.MAX_VALUE)
+                                                        .addComponent(viewFilter, 0, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE))).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+                                        .addComponent(helpButton, GroupLayout.PREFERRED_SIZE, 108, GroupLayout.PREFERRED_SIZE))).addContainerGap()));
         layout.setVerticalGroup(
                 layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                 .addGroup(layout.createSequentialGroup().addContainerGap()
-                .addComponent(globalBehaviourLabel).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
-                .addComponent(securityLevelLabel)
-                .addComponent(mainPolicyComboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
-                .addGroup(layout.createSequentialGroup()
-                .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
-                .addComponent(deleteButton)
-                .addComponent(deleteTypeComboBox)


More information about the distro-pkg-dev mailing list