/hg/icedtea6: netx: do not use Look and Feel related methods for...
omajid at icedtea.classpath.org
omajid at icedtea.classpath.org
Tue Jul 20 06:35:46 PDT 2010
changeset 16b019555725 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=16b019555725
author: Omair Majid <omajid at redhat.com>
date: Tue Jul 20 09:35:12 2010 -0400
netx: do not use Look and Feel related methods for setting up
security dialogs
2010-07-20 Omair Majid <omajid at redhat.com>
PR icedtea/372
* netx/net/sourceforge/jnlp/security/SecurityDialogUI.java: Renamed
to..
* netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java: New
file. Remove all usage of Look and Feel related functionality.
Extend JPanel. (createSetValueListener): New method.
(setVisible): New method. (requestFocusOnDefaultButton): New
method.
* netx/net/sourceforge/jnlp/security/AccessWarningPane.java Extend
SecurityDialogPanel instead of SecurityDialogUI
(AccessWarningPane): Take a SecurityWarningDialog instead of a
JComponent as a paramenter. Call addComponents.
(installComponents): Renamed to (addComponents): New method.
(R): Moved to parent class. (htmlWrap): Likewise.
* netx/net/sourceforge/jnlp/security/AppletWarningPane.java Extend
SecurityDialogPanel instead of SecurityDialogUI
(AppletWarningPane): Take a SecurityWarningDialog instead of a
JComponent as a paramter. Call addComponents.
(installComponents): Renamed to... (addComponents): New method.
(htmlWrap): Moved to parent class.
* netx/net/sourceforge/jnlp/security/CertWarningPane.java Extend
SecurityDialogPanel instead of SecurityDialogUI
(CertWarningPane): Take a SecurityWarningDialog instead of a
JComponent as a parameter. Call addComponents.
(installComponents): Renamed to... (addComponents): New method.
(R): Moved to parent class. (htmlWrap): Likewise.
(CheckBoxListener): Add debug information.
* netx/net/sourceforge/jnlp/security/CertsInfoPane.java Extend
SecurityDialogPanel instead of SecurityDialogUI (CertsInfoPane):
Take a SecurityWarningDialog instead of a JComponent as a
parameter. Call addComponents. (installComponents): Renamed
to... (addComponents): New method.
* netx/net/sourceforge/jnlp/security/MoreInfoPane.java Extend
SecurityDialogPanel instead of SecurityDialogUI (MoreInfoPane):
Take a SecurityWarningDialog instead of a JComponent as a
parameter. Call addComponents. (installComponents): Renamed
to... (addComponents): New method. (R): Moved to parent
class. (htmlWrap): Likewise.
* netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java
Extend JDialog instead of JOptionPane. Add panel, value as new
fields. (SecurityWarningDialog): Call super and initDialog.
(showAccessWarningDialog): Modified to use the cleaned-up api.
(showCertWarningDialog): Likewise. (showMoreInfoDialog):
Likewise. (showCertInfoDialog): Likewise.
(showSingleCertInfoDialog): Likewise. (showAppletWarning):
Likewise. (createDialog): Renamed to... (initDialog): New
method. Clean up api and remove JOptionPane references.
(updateUI): Renamed to... (installPanel): Switch from Look and
Feel related setUI methods to simple JComponents.
(selectDefaultButton): New method. Causes the default button to
request focus. (setValue): New method. Set the return value
of this dialog. (getValue): New method. Get the return value of
this dialog. (setSystemLookAndFeel): New method. Set the Look
and Feel to the System look and feel.
* netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java
(SingleCertInfoPane): Take a SecurityWarningDialog instead of a
JComponent as a parameter. (buildTree): Use parant instead
of optionPane. (populateTable): Likewise.
* netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java:
Extend JPanel instead of SecurityDialogUI. Add two new fields:
parent and defaultFocusComponent. (CertificatePane): Take a
JDialog as the argument. (installUI): Removed.
(setSystemLookAndFeel): Removed. (installComponents): Renamed to
... (addComponents): New method. (focusOnDefaultButton): New
method. Makes the defaultFocusComponent get focus.
(CloseButtonListener): New class. Disposes the JDialog.
* netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java:
Extend JDialog instead of JOptionPane (CertificateViewer):
Initialize the JDialog, add the CertificatePanel and set default
focus. (updateUI): Removed. (centerDialog): Takes no
arguments. (createDialog): Removed. (showCertificateViewer):
Use the new cleaned up api for CertificateViewer.
(setSystemLookAndFeel): New method. Sets the LookAndFeel of the
system.
diffstat:
12 files changed, 479 insertions(+), 541 deletions(-)
ChangeLog | 93 ++++
netx/net/sourceforge/jnlp/security/AccessWarningPane.java | 47 --
netx/net/sourceforge/jnlp/security/AppletWarningPane.java | 27 -
netx/net/sourceforge/jnlp/security/CertWarningPane.java | 61 +-
netx/net/sourceforge/jnlp/security/CertsInfoPane.java | 19
netx/net/sourceforge/jnlp/security/MoreInfoPane.java | 39 -
netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java | 129 ++++++
netx/net/sourceforge/jnlp/security/SecurityDialogUI.java | 204 ----------
netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java | 187 ++++-----
netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java | 7
netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java | 78 +--
netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java | 129 ++----
diffs (truncated from 1623 to 500 lines):
diff -r bd443070a313 -r 16b019555725 ChangeLog
--- a/ChangeLog Mon Jul 19 14:39:53 2010 +0200
+++ b/ChangeLog Tue Jul 20 09:35:12 2010 -0400
@@ -1,3 +1,96 @@ 2010-07-19 Gary Benson <gbenson at redhat
+2010-07-19 Omair Majid <omajid at redhat.com>
+
+ PR icedtea/372
+ * netx/net/sourceforge/jnlp/security/SecurityDialogUI.java: Renamed to..
+ * netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java: New file.
+ Remove all usage of Look and Feel related functionality. Extend JPanel.
+ (createSetValueListener): New method.
+ (setVisible): New method.
+ (requestFocusOnDefaultButton): New method.
+ * netx/net/sourceforge/jnlp/security/AccessWarningPane.java
+ Extend SecurityDialogPanel instead of SecurityDialogUI
+ (AccessWarningPane): Take a SecurityWarningDialog instead of a JComponent
+ as a paramenter. Call addComponents.
+ (installComponents): Renamed to
+ (addComponents): New method.
+ (R): Moved to parent class.
+ (htmlWrap): Likewise.
+ * netx/net/sourceforge/jnlp/security/AppletWarningPane.java
+ Extend SecurityDialogPanel instead of SecurityDialogUI
+ (AppletWarningPane): Take a SecurityWarningDialog instead of a JComponent
+ as a paramter. Call addComponents.
+ (installComponents): Renamed to...
+ (addComponents): New method.
+ (htmlWrap): Moved to parent class.
+ * netx/net/sourceforge/jnlp/security/CertWarningPane.java
+ Extend SecurityDialogPanel instead of SecurityDialogUI
+ (CertWarningPane): Take a SecurityWarningDialog instead of a JComponent as
+ a parameter. Call addComponents.
+ (installComponents): Renamed to...
+ (addComponents): New method.
+ (R): Moved to parent class.
+ (htmlWrap): Likewise.
+ (CheckBoxListener): Add debug information.
+ * netx/net/sourceforge/jnlp/security/CertsInfoPane.java
+ Extend SecurityDialogPanel instead of SecurityDialogUI
+ (CertsInfoPane): Take a SecurityWarningDialog instead of a JComponent as a
+ parameter. Call addComponents.
+ (installComponents): Renamed to...
+ (addComponents): New method.
+ * netx/net/sourceforge/jnlp/security/MoreInfoPane.java
+ Extend SecurityDialogPanel instead of SecurityDialogUI
+ (MoreInfoPane): Take a SecurityWarningDialog instead of a JComponent as a
+ parameter. Call addComponents.
+ (installComponents): Renamed to...
+ (addComponents): New method.
+ (R): Moved to parent class.
+ (htmlWrap): Likewise.
+ * netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java
+ Extend JDialog instead of JOptionPane. Add panel, value as new fields.
+ (SecurityWarningDialog): Call super and initDialog.
+ (showAccessWarningDialog): Modified to use the cleaned-up api.
+ (showCertWarningDialog): Likewise.
+ (showMoreInfoDialog): Likewise.
+ (showCertInfoDialog): Likewise.
+ (showSingleCertInfoDialog): Likewise.
+ (showAppletWarning): Likewise.
+ (createDialog): Renamed to...
+ (initDialog): New method. Clean up api and remove JOptionPane references.
+ (updateUI): Renamed to...
+ (installPanel): Switch from Look and Feel related setUI methods to simple
+ JComponents.
+ (selectDefaultButton): New method. Causes the default button to request
+ focus.
+ (setValue): New method. Set the return value of this dialog.
+ (getValue): New method. Get the return value of this dialog.
+ (setSystemLookAndFeel): New method. Set the Look and Feel to the System
+ look and feel.
+ * netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java
+ (SingleCertInfoPane): Take a SecurityWarningDialog instead of a JComponent
+ as a parameter.
+ (buildTree): Use parant instead of optionPane.
+ (populateTable): Likewise.
+ * netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java: Extend
+ JPanel instead of SecurityDialogUI. Add two new fields: parent and
+ defaultFocusComponent.
+ (CertificatePane): Take a JDialog as the argument.
+ (installUI): Removed.
+ (setSystemLookAndFeel): Removed.
+ (installComponents): Renamed to ...
+ (addComponents): New method.
+ (focusOnDefaultButton): New method. Makes the defaultFocusComponent get
+ focus.
+ (CloseButtonListener): New class. Disposes the JDialog.
+ * netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java: Extend
+ JDialog instead of JOptionPane
+ (CertificateViewer): Initialize the JDialog, add the CertificatePanel and
+ set default focus.
+ (updateUI): Removed.
+ (centerDialog): Takes no arguments.
+ (createDialog): Removed.
+ (showCertificateViewer): Use the new cleaned up api for CertificateViewer.
+ (setSystemLookAndFeel): New method. Sets the LookAndFeel of the system.
+
2010-07-19 Gary Benson <gbenson at redhat.com>
Xerxes RÃ¥nby <xerxes at zafena.se>
diff -r bd443070a313 -r 16b019555725 netx/net/sourceforge/jnlp/security/AccessWarningPane.java
--- a/netx/net/sourceforge/jnlp/security/AccessWarningPane.java Mon Jul 19 14:39:53 2010 +0200
+++ b/netx/net/sourceforge/jnlp/security/AccessWarningPane.java Tue Jul 20 09:35:12 2010 -0400
@@ -51,44 +51,42 @@ import javax.swing.ImageIcon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
-import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import net.sourceforge.jnlp.JNLPFile;
-import net.sourceforge.jnlp.runtime.JNLPRuntime;
/**
- * Provides the look and feel for a SecurityWarningDialog. These dialogs are
+ * Provides a panel to show inside a SecurityWarningDialog. These dialogs are
* used to warn the user when either signed code (with or without signing
* issues) is going to be run, or when service permission (file, clipboard,
* printer, etc) is needed with unsigned code.
*
* @author <a href="mailto:jsumali at redhat.com">Joshua Sumali</a>
*/
-public class AccessWarningPane extends SecurityDialogUI {
+public class AccessWarningPane extends SecurityDialogPanel {
JCheckBox alwaysAllow;
Object[] extras;
- public AccessWarningPane(JComponent x, CertVerifier certVerifier) {
+ public AccessWarningPane(SecurityWarningDialog x, CertVerifier certVerifier) {
super(x, certVerifier);
+ addComponents();
}
- public AccessWarningPane(JComponent x, Object[] extras, CertVerifier certVerifier) {
+ public AccessWarningPane(SecurityWarningDialog x, Object[] extras, CertVerifier certVerifier) {
super(x, certVerifier);
this.extras = extras;
+ addComponents();
}
/**
- * Creates the actual GUI components, and adds it to <code>optionPane</code>
+ * Creates the actual GUI components, and adds it to this panel
*/
- protected void installComponents() {
- SecurityWarningDialog.AccessType type =
- ((SecurityWarningDialog)optionPane).getType();
- JNLPFile file =
- ((SecurityWarningDialog)optionPane).getFile();
+ private void addComponents() {
+ SecurityWarningDialog.AccessType type = parent.getType();
+ JNLPFile file = parent.getFile();
String name = "";
String publisher = "";
@@ -173,35 +171,22 @@ public class AccessWarningPane extends S
JButton run = new JButton("Allow");
JButton cancel = new JButton("Cancel");
- run.addActionListener(createButtonActionListener(0));
+ run.addActionListener(createSetValueListener(parent,0));
run.addActionListener(new CheckBoxListener());
- cancel.addActionListener(createButtonActionListener(1));
+ cancel.addActionListener(createSetValueListener(parent, 1));
initialFocusComponent = cancel;
buttonPanel.add(run);
buttonPanel.add(cancel);
buttonPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
//all of the above
- JPanel main = new JPanel();
- main.setLayout(new BoxLayout(main, BoxLayout.Y_AXIS));
- main.add(topPanel);
- main.add(infoPanel);
- main.add(buttonPanel);
+ setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+ add(topPanel);
+ add(infoPanel);
+ add(buttonPanel);
- optionPane.add(main, BorderLayout.CENTER);
}
- private static String R(String key) {
- return JNLPRuntime.getMessage(key);
- }
-
- private static String R(String key, Object param) {
- return JNLPRuntime.getMessage(key, new Object[] {param});
- }
-
- protected String htmlWrap (String s) {
- return "<html>"+s+"</html>";
- }
private class CheckBoxListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
diff -r bd443070a313 -r 16b019555725 netx/net/sourceforge/jnlp/security/AppletWarningPane.java
--- a/netx/net/sourceforge/jnlp/security/AppletWarningPane.java Mon Jul 19 14:39:53 2010 +0200
+++ b/netx/net/sourceforge/jnlp/security/AppletWarningPane.java Tue Jul 20 09:35:12 2010 -0400
@@ -46,18 +46,18 @@ import javax.swing.BorderFactory;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JButton;
-import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
-public class AppletWarningPane extends SecurityDialogUI {
+public class AppletWarningPane extends SecurityDialogPanel {
- public AppletWarningPane(JComponent x, CertVerifier certVerifier) {
+ public AppletWarningPane(SecurityWarningDialog x, CertVerifier certVerifier) {
super(x, certVerifier);
+ addComponents();
}
- protected void installComponents() {
+ protected void addComponents() {
//Top label
String topLabelText = "While support for verifying signed code" +
@@ -95,9 +95,9 @@ public class AppletWarningPane extends S
yes.setPreferredSize(d);
no.setPreferredSize(d);
cancel.setPreferredSize(d);
- yes.addActionListener(createButtonActionListener(0));
- no.addActionListener(createButtonActionListener(1));
- cancel.addActionListener(createButtonActionListener(2));
+ yes.addActionListener(createSetValueListener(parent, 0));
+ no.addActionListener(createSetValueListener(parent, 1));
+ cancel.addActionListener(createSetValueListener(parent, 2));
initialFocusComponent = cancel;
buttonPanel.add(yes);
buttonPanel.add(no);
@@ -105,17 +105,12 @@ public class AppletWarningPane extends S
buttonPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
//all of the above
- JPanel main = new JPanel();
- main.setLayout(new BoxLayout(main, BoxLayout.Y_AXIS));
- main.add(topPanel);
- main.add(infoPanel);
- main.add(buttonPanel);
+ setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+ add(topPanel);
+ add(infoPanel);
+ add(buttonPanel);
- optionPane.add(main, BorderLayout.CENTER);
}
- protected String htmlWrap (String s) {
- return "<html>"+s+"</html>";
- }
}
diff -r bd443070a313 -r 16b019555725 netx/net/sourceforge/jnlp/security/CertWarningPane.java
--- a/netx/net/sourceforge/jnlp/security/CertWarningPane.java Mon Jul 19 14:39:53 2010 +0200
+++ b/netx/net/sourceforge/jnlp/security/CertWarningPane.java Tue Jul 20 09:35:12 2010 -0400
@@ -53,7 +53,6 @@ import javax.swing.ImageIcon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
-import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
@@ -64,33 +63,31 @@ import net.sourceforge.jnlp.tools.KeyToo
import net.sourceforge.jnlp.tools.KeyTool;
/**
- * Provides the look and feel for a SecurityWarningDialog. These dialogs are
+ * Provides the panel for using inside a SecurityWarningDialog. These dialogs are
* used to warn the user when either signed code (with or without signing
* issues) is going to be run, or when service permission (file, clipboard,
* printer, etc) is needed with unsigned code.
*
* @author <a href="mailto:jsumali at redhat.com">Joshua Sumali</a>
*/
-public class CertWarningPane extends SecurityDialogUI {
+public class CertWarningPane extends SecurityDialogPanel {
JCheckBox alwaysTrust;
CertVerifier certVerifier;
- public CertWarningPane(JComponent x, CertVerifier certVerifier) {
+ public CertWarningPane(SecurityWarningDialog x, CertVerifier certVerifier) {
super(x, certVerifier);
this.certVerifier = certVerifier;
+ addComponents();
}
/**
- * Creates the actual GUI components, and adds it to <code>optionPane</code>
+ * Creates the actual GUI components, and adds it to this panel
*/
- protected void installComponents() {
- SecurityWarningDialog.AccessType type =
- ((SecurityWarningDialog)optionPane).getType();
- JNLPFile file =
- ((SecurityWarningDialog)optionPane).getFile();
- Certificate c = ((SecurityWarningDialog)optionPane)
- .getJarSigner().getPublisher();
+ private void addComponents() {
+ SecurityWarningDialog.AccessType type = parent.getType();
+ JNLPFile file = parent.getFile();
+ Certificate c = parent.getJarSigner().getPublisher();
String name = "";
String publisher = "";
@@ -193,26 +190,25 @@ public class CertWarningPane extends Sec
Dimension d = new Dimension(buttonWidth, buttonHeight);
run.setPreferredSize(d);
cancel.setPreferredSize(d);
- run.addActionListener(createButtonActionListener(0));
+ run.addActionListener(createSetValueListener(parent, 0));
run.addActionListener(new CheckBoxListener());
- cancel.addActionListener(createButtonActionListener(1));
+ cancel.addActionListener(createSetValueListener(parent, 1));
initialFocusComponent = cancel;
buttonPanel.add(run);
buttonPanel.add(cancel);
buttonPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
//all of the above
- JPanel main = new JPanel();
- main.setLayout(new BoxLayout(main, BoxLayout.Y_AXIS));
- main.add(topPanel);
- main.add(infoPanel);
- main.add(buttonPanel);
+ setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+ add(topPanel);
+ add(infoPanel);
+ add(buttonPanel);
JLabel bottomLabel;
JButton moreInfo = new JButton("More information...");
moreInfo.addActionListener(new MoreInfoButtonListener());
- if (((SecurityWarningDialog)optionPane).getJarSigner().getRootInCacerts())
+ if (parent.getJarSigner().getRootInCacerts())
bottomLabel = new JLabel(htmlWrap(R("STrustedSource")));
else
bottomLabel = new JLabel(htmlWrap(R("SUntrustedSource")));
@@ -223,27 +219,14 @@ public class CertWarningPane extends Sec
bottomPanel.add(moreInfo);
bottomPanel.setPreferredSize(new Dimension(500,100));
bottomPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
- main.add(bottomPanel);
+ add(bottomPanel);
- optionPane.add(main, BorderLayout.CENTER);
}
-
- private static String R(String key) {
- return JNLPRuntime.getMessage(key);
- }
-
- protected String htmlWrap (String s) {
- return "<html>"+s+"</html>";
- }
private class MoreInfoButtonListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
-
- // TODO: Can we change this to just
- // optionPane.showMoreInfo(); ?
- SecurityWarningDialog.showMoreInfoDialog(
- ((SecurityWarningDialog)optionPane).getJarSigner(),
- optionPane);
+ SecurityWarningDialog.showMoreInfoDialog(parent.getJarSigner(),
+ parent);
}
}
@@ -255,9 +238,11 @@ public class CertWarningPane extends Sec
if (alwaysTrust != null && alwaysTrust.isSelected()) {
try {
KeyTool kt = new KeyTool();
- Certificate c =
- ((SecurityWarningDialog)optionPane).getJarSigner().getPublisher();
+ Certificate c = parent.getJarSigner().getPublisher();
kt.importCert(c);
+ if (JNLPRuntime.isDebug()) {
+ System.out.println("certificate is now permanently trusted");
+ }
} catch (Exception ex) {
//TODO: Let NetX show a dialog here notifying user
//about being unable to add cert to keystore
diff -r bd443070a313 -r 16b019555725 netx/net/sourceforge/jnlp/security/CertsInfoPane.java
--- a/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Mon Jul 19 14:39:53 2010 +0200
+++ b/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Tue Jul 20 09:35:12 2010 -0400
@@ -58,12 +58,12 @@ import net.sourceforge.jnlp.tools.*;
import net.sourceforge.jnlp.tools.*;
/**
- * Provides the UI for the Certificate Info dialog. This dialog displays data from
+ * Provides the panel for the Certificate Info dialog. This dialog displays data from
* X509Certificate(s) used in jar signing.
*
* @author <a href="mailto:jsumali at redhat.com">Joshua Sumali</a>
*/
-public class CertsInfoPane extends SecurityDialogUI {
+public class CertsInfoPane extends SecurityDialogPanel {
private ArrayList<CertPath> certs;
private JList list;
@@ -76,15 +76,16 @@ public class CertsInfoPane extends Secur
private String[] columnNames = { "Field", "Value" };
protected ArrayList<String[][]> certsData;
- public CertsInfoPane(JComponent x, CertVerifier certVerifier) {
+ public CertsInfoPane(SecurityWarningDialog x, CertVerifier certVerifier) {
super(x, certVerifier);
+ addComponents();
}
/**
* Builds the JTree out of CertPaths.
*/
void buildTree() {
- certs = ((SecurityWarningDialog)optionPane).getJarSigner().getCerts();
+ certs = parent.getJarSigner().getCerts();
//for now, we're only going to display the first signer, even though
//jars can be signed by multiple people.
CertPath firstPath = certs.get(0);
@@ -176,9 +177,9 @@ public class CertsInfoPane extends Secur
}
/**
- * Constructs the GUI components of this UI
+ * Constructs the GUI components of this panel
*/
- protected void installComponents() {
+ protected void addComponents() {
buildTree();
populateTable();
/**
@@ -224,14 +225,14 @@ public class CertsInfoPane extends Secur
JPanel buttonPane = new JPanel(new BorderLayout());
JButton close = new JButton("Close");
JButton copyToClipboard = new JButton("Copy to Clipboard");
- close.addActionListener(createButtonActionListener(0));
+ close.addActionListener(createSetValueListener(parent, 0));
copyToClipboard.addActionListener(new CopyToClipboardHandler());
buttonPane.add(close, BorderLayout.EAST);
buttonPane.add(copyToClipboard, BorderLayout.WEST);
buttonPane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
- optionPane.add(mainPane, BorderLayout.CENTER);
- optionPane.add(buttonPane, BorderLayout.SOUTH);
+ add(mainPane, BorderLayout.CENTER);
+ add(buttonPane, BorderLayout.SOUTH);
}
/**
diff -r bd443070a313 -r 16b019555725 netx/net/sourceforge/jnlp/security/MoreInfoPane.java
--- a/netx/net/sourceforge/jnlp/security/MoreInfoPane.java Mon Jul 19 14:39:53 2010 +0200
+++ b/netx/net/sourceforge/jnlp/security/MoreInfoPane.java Tue Jul 20 09:35:12 2010 -0400
@@ -47,29 +47,27 @@ import javax.swing.BorderFactory;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
-import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
-import net.sourceforge.jnlp.runtime.JNLPRuntime;
-
/**
- * Provides the UI for the More Info dialog. This dialog shows details about an
+ * Provides the panel for the More Info dialog. This dialog shows details about an
* application's signing status.
*
* @author <a href="mailto:jsumali at redhat.com">Joshua Sumali</a>
*/
-public class MoreInfoPane extends SecurityDialogUI {
+public class MoreInfoPane extends SecurityDialogPanel {
- public MoreInfoPane(JComponent x, CertVerifier certVerifier) {
+ public MoreInfoPane(SecurityWarningDialog x, CertVerifier certVerifier) {
super(x, certVerifier);
+ addComponents();
}
/**
- * Constructs the GUI components of this UI
+ * Constructs the GUI components of this panel
*/
- protected void installComponents() {
+ private void addComponents() {
ArrayList<String> details = certVerifier.getDetails();
int numLabels = details.size();
More information about the distro-pkg-dev
mailing list