From e3591dbec96d4a4b5f9e6f2c6f4263c19657aa9e Mon Sep 17 00:00:00 2001 From: millmanorama Date: Thu, 26 Oct 2017 15:01:40 +0200 Subject: [PATCH] don't shown credit cards or device in the account type filter widget --- .../autopsy/communications/FiltersPanel.java | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java b/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java index d2e95cdd5d..53a973eede 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java +++ b/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java @@ -81,17 +81,25 @@ final public class FiltersPanel extends javax.swing.JPanel { //List accountTypesInUse = communicationsManager.getAccountTypesInUse(); //accountTypesInUSe.forEach(...) Account.Type.PREDEFINED_ACCOUNT_TYPES.forEach( - type -> accountTypeMap.computeIfAbsent(type, t -> { - final JCheckBox jCheckBox = new JCheckBox( - "
" + type.getDisplayName() + "
", - true - ); - accountTypePane.add(jCheckBox); - return jCheckBox; - }) + type -> { + if (type.equals(Account.Type.CREDIT_CARD)) { + //don't show a check box for credit cards + } else if (type.equals(Account.Type.DEVICE)) { + //don't show a check box fro device + } else { + accountTypeMap.computeIfAbsent(type, t -> { + final JCheckBox jCheckBox = new JCheckBox( + "
" + type.getDisplayName() + "
", + true + ); + accountTypePane.add(jCheckBox); + return jCheckBox; + }); + } + } ); }