From 336923fe79a073c1c3e4850afbac35a8d4e6a659 Mon Sep 17 00:00:00 2001 From: cnotin Date: Wed, 12 Dec 2018 19:54:02 +0100 Subject: [PATCH] Add 'clearAll' method in SamlPanelInfo to clear all labels before displaying new values. Fixes #32 --- .../java/application/SamlTabController.java | 1 + src/main/java/gui/SamlPanelInfo.java | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/main/java/application/SamlTabController.java b/src/main/java/application/SamlTabController.java index 0ecefbc..46b09fa 100644 --- a/src/main/java/application/SamlTabController.java +++ b/src/main/java/application/SamlTabController.java @@ -331,6 +331,7 @@ public void setMessage(byte[] content, boolean isRequest) { private void setInformationDisplay() { SamlPanelInfo infoPanel = samlGUI.getInfoPanel(); + infoPanel.clearAll(); try { Document document = xmlHelpers.getXMLDocumentOfSAMLMessage(SAMLMessage); diff --git a/src/main/java/gui/SamlPanelInfo.java b/src/main/java/gui/SamlPanelInfo.java index 1243a5c..9abc604 100644 --- a/src/main/java/gui/SamlPanelInfo.java +++ b/src/main/java/gui/SamlPanelInfo.java @@ -214,11 +214,7 @@ private void initialize() { gbc_lblEncryption.gridy = 11; add(lblEncryption, gbc_lblEncryption); } - - public void setAssertionTitle(String string){ - lblAssertionTitle.setText(string); - } - + public void setIssuer(String string){ lblIssuer.setText(string); } @@ -254,5 +250,16 @@ public void setDigestAlgorithm(String string){ public void setEncryptionAlgorithm(String string){ lblEncryption.setText(string); } - + + public void clearAll(){ + setIssuer(""); + setSubject(""); + setConditionNotBefore(""); + setConditionNotAfter(""); + setSubjectConfNotBefore(""); + setSubjectConfNotAfter(""); + setSignatureAlgorithm(""); + setDigestAlgorithm(""); + setEncryptionAlgorithm(""); + } }