Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add border DH parameters #503

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions kse/src/main/java/org/kse/gui/dialogs/DViewDHParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingUtilities;
import javax.swing.filechooser.FileNameExtensionFilter;

Expand Down Expand Up @@ -70,6 +72,7 @@ public class DViewDHParameters extends JEscDialog {
private static ResourceBundle res = ResourceBundle.getBundle("org/kse/gui/dialogs/resources");

private JTextArea jtAreaPem;
private JScrollPane jspAreaPem;
private JButton jbExport;
private JButton jbOK;
private JButton jbCopy;
Expand Down Expand Up @@ -106,8 +109,11 @@ private void initComponents(byte[] dhParams) throws CryptoException {
jtAreaPem.setEditable(false);
jtAreaPem.setFont(new Font(Font.MONOSPACED, Font.PLAIN, LnfUtil.getDefaultFontSize()));
// keep uneditable color same as editable
jtAreaPem.putClientProperty("JTextArea.infoBackground", Boolean.TRUE);
jtAreaPem.putClientProperty("JTextArea.infoBackground", Boolean.TRUE);

jspAreaPem = PlatformUtil.createScrollPane(jtAreaPem, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

jbExport = new JButton(res.getString("DViewDHParameters.jbExport.export.text"));
jbExport.setToolTipText(res.getString("DViewDHParameters.jbExport.export.tooltip"));
PlatformUtil.setMnemonic(jbExport, res.getString("DViewDHParameters.jbExport.mnemonic").charAt(0));
Expand All @@ -120,7 +126,7 @@ private void initComponents(byte[] dhParams) throws CryptoException {

Container pane = getContentPane();
pane.setLayout(new MigLayout("insets dialog"));
pane.add(jtAreaPem, "span");
pane.add(jspAreaPem, "span");
pane.add(jbCopy, "tag Copy");
pane.add(jbExport, "tag Export");
pane.add(jbOK, "tag Ok");
Expand Down
Loading