aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/security/AppletWarningPane.java
diff options
context:
space:
mode:
authorDeepak Bhole <[email protected]>2010-12-06 15:34:01 -0500
committerDeepak Bhole <[email protected]>2010-12-06 15:34:01 -0500
commit6ca1a9a369b10703da9af8f8a1ced0f3b02ae5c2 (patch)
tree568f8e454db94fa8abc896b46ce8cac7a9f3b74d /netx/net/sourceforge/jnlp/security/AppletWarningPane.java
parent0d66adf24179c33bbdccaacc10d4c8a5f5e2cd54 (diff)
Fixed indentation and spacing for all .java files.
Added a new .settings directory which contains Eclipse preferences for code style.
Diffstat (limited to 'netx/net/sourceforge/jnlp/security/AppletWarningPane.java')
-rw-r--r--netx/net/sourceforge/jnlp/security/AppletWarningPane.java101
1 files changed, 50 insertions, 51 deletions
diff --git a/netx/net/sourceforge/jnlp/security/AppletWarningPane.java b/netx/net/sourceforge/jnlp/security/AppletWarningPane.java
index 8bd14ef..5a959bc 100644
--- a/netx/net/sourceforge/jnlp/security/AppletWarningPane.java
+++ b/netx/net/sourceforge/jnlp/security/AppletWarningPane.java
@@ -49,67 +49,66 @@ import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
-
public class AppletWarningPane extends SecurityDialogPanel {
- public AppletWarningPane(SecurityWarningDialog x, CertVerifier certVerifier) {
- super(x, certVerifier);
- addComponents();
- }
+ public AppletWarningPane(SecurityWarningDialog x, CertVerifier certVerifier) {
+ super(x, certVerifier);
+ addComponents();
+ }
- protected void addComponents() {
+ protected void addComponents() {
- //Top label
- String topLabelText = "While support for verifying signed code" +
+ //Top label
+ String topLabelText = "While support for verifying signed code" +
" has not been implemented yet, some applets will not run " +
"properly under the default restricted security level.";
- String bottomLabelText = "Do you want to run this applet under the " +
+ String bottomLabelText = "Do you want to run this applet under the " +
"restricted security level? (clicking No will run this applet " +
"without any security checking, and should only be done if you " +
"trust the applet!)";
- JLabel topLabel = new JLabel(htmlWrap(topLabelText));
- topLabel.setFont(new Font(topLabel.getFont().toString(),
+ JLabel topLabel = new JLabel(htmlWrap(topLabelText));
+ topLabel.setFont(new Font(topLabel.getFont().toString(),
Font.BOLD, 12));
- JPanel topPanel = new JPanel(new BorderLayout());
- topPanel.setBackground(Color.WHITE);
- topPanel.add(topLabel, BorderLayout.CENTER);
- topPanel.setPreferredSize(new Dimension(400,80));
- topPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
-
- JLabel bottomLabel = new JLabel(htmlWrap(bottomLabelText));
- JPanel infoPanel = new JPanel(new BorderLayout());
- infoPanel.add(bottomLabel, BorderLayout.CENTER);
- infoPanel.setPreferredSize(new Dimension(400,80));
- infoPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
-
- //run and cancel buttons
- JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
-
- JButton yes = new JButton("Yes");
- JButton no = new JButton("No");
- JButton cancel = new JButton("Cancel");
- int buttonWidth = cancel.getMinimumSize().width;
- int buttonHeight = cancel.getMinimumSize().height;
- Dimension d = new Dimension(buttonWidth, buttonHeight);
- yes.setPreferredSize(d);
- no.setPreferredSize(d);
- cancel.setPreferredSize(d);
- yes.addActionListener(createSetValueListener(parent, 0));
- no.addActionListener(createSetValueListener(parent, 1));
- cancel.addActionListener(createSetValueListener(parent, 2));
- initialFocusComponent = cancel;
- buttonPanel.add(yes);
- buttonPanel.add(no);
- buttonPanel.add(cancel);
- buttonPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
-
- //all of the above
- setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
- add(topPanel);
- add(infoPanel);
- add(buttonPanel);
-
- }
+ JPanel topPanel = new JPanel(new BorderLayout());
+ topPanel.setBackground(Color.WHITE);
+ topPanel.add(topLabel, BorderLayout.CENTER);
+ topPanel.setPreferredSize(new Dimension(400, 80));
+ topPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
+
+ JLabel bottomLabel = new JLabel(htmlWrap(bottomLabelText));
+ JPanel infoPanel = new JPanel(new BorderLayout());
+ infoPanel.add(bottomLabel, BorderLayout.CENTER);
+ infoPanel.setPreferredSize(new Dimension(400, 80));
+ infoPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
+
+ //run and cancel buttons
+ JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
+
+ JButton yes = new JButton("Yes");
+ JButton no = new JButton("No");
+ JButton cancel = new JButton("Cancel");
+ int buttonWidth = cancel.getMinimumSize().width;
+ int buttonHeight = cancel.getMinimumSize().height;
+ Dimension d = new Dimension(buttonWidth, buttonHeight);
+ yes.setPreferredSize(d);
+ no.setPreferredSize(d);
+ cancel.setPreferredSize(d);
+ yes.addActionListener(createSetValueListener(parent, 0));
+ no.addActionListener(createSetValueListener(parent, 1));
+ cancel.addActionListener(createSetValueListener(parent, 2));
+ initialFocusComponent = cancel;
+ buttonPanel.add(yes);
+ buttonPanel.add(no);
+ buttonPanel.add(cancel);
+ buttonPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
+
+ //all of the above
+ setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+ add(topPanel);
+ add(infoPanel);
+ add(buttonPanel);
+
+ }
}