| | |
| | | import java.util.Date;
|
| | |
|
| | | import javax.swing.JButton;
|
| | | import javax.swing.JCheckBox;
|
| | | import javax.swing.JDialog;
|
| | | import javax.swing.JLabel;
|
| | | import javax.swing.JOptionPane;
|
| | |
| | |
|
| | | JDateChooser expirationDate;
|
| | | JTextField hostname;
|
| | | JCheckBox serveCertificate;
|
| | | boolean isCanceled = true;
|
| | |
|
| | | public NewSSLCertificateDialog(Frame owner, Date defaultExpiration) {
|
| | |
| | |
|
| | | expirationDate = new JDateChooser(defaultExpiration);
|
| | | hostname = new JTextField(20);
|
| | | serveCertificate = new JCheckBox(Translation.get("gb.serveCertificate"), true);
|
| | |
|
| | | JPanel panel = new JPanel(new GridLayout(0, 2, Utils.MARGIN, Utils.MARGIN));
|
| | |
|
| | |
| | |
|
| | | panel.add(new JLabel(Translation.get("gb.expires")));
|
| | | panel.add(expirationDate);
|
| | | |
| | | panel.add(new JLabel(""));
|
| | | panel.add(serveCertificate);
|
| | |
|
| | | JButton ok = new JButton(Translation.get("gb.ok"));
|
| | | ok.addActionListener(new ActionListener() {
|
| | |
| | | return expirationDate.getDate();
|
| | | }
|
| | |
|
| | | public boolean isServeCertificate() {
|
| | | return serveCertificate.isSelected();
|
| | | }
|
| | |
|
| | | public boolean isCanceled() {
|
| | | return isCanceled;
|
| | | }
|