From 0176f83d84d416c7b519c8c1f2cb57395248503c Mon Sep 17 00:00:00 2001 From: Mark McKinnon <Mark.McKinnon13@outlook.com> Date: Mon, 21 Aug 2023 14:57:13 -0400 Subject: [PATCH] fixes Fixes --- .../autopsy/ctoptions/CTOptionsPanel.java | 2 ++ .../ctcloud/CTMalwareScannerOptionsPanel.form | 9 ++------- .../ctcloud/CTMalwareScannerOptionsPanel.java | 13 +++++++++++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/CTOptionsPanel.java b/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/CTOptionsPanel.java index 29f8bec3a4..83a4a9a51a 100644 --- a/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/CTOptionsPanel.java +++ b/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/CTOptionsPanel.java @@ -24,6 +24,7 @@ import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.Collection; +import java.util.Comparator; import java.util.List; import java.util.logging.Logger; import java.util.stream.Collectors; @@ -63,6 +64,7 @@ public CTOptionsPanel() { } }) .filter(item -> item != null) + .sorted(Comparator.comparing(p -> p.getClass().getSimpleName().toUpperCase()).reversed()) .collect(Collectors.toList()); addSubOptionsPanels(this.subPanels); } diff --git a/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/CTMalwareScannerOptionsPanel.form b/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/CTMalwareScannerOptionsPanel.form index 841490d657..52595d16a3 100644 --- a/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/CTMalwareScannerOptionsPanel.form +++ b/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/CTMalwareScannerOptionsPanel.form @@ -132,7 +132,7 @@ <Container class="javax.swing.JPanel" name="malwareScannerStatsPanel"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> - <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/> </Constraint> </Constraints> @@ -231,10 +231,6 @@ <ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.purchaseFromLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> </Properties> - <AuxValues> - <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> - <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> - </AuxValues> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> @@ -254,8 +250,7 @@ <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="purchaseLinkMouseClicked"/> </Events> <AuxValues> - <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> - <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> + <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/> </AuxValues> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> diff --git a/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/CTMalwareScannerOptionsPanel.java b/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/CTMalwareScannerOptionsPanel.java index 4d4f156fe9..fd39cd5fad 100644 --- a/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/CTMalwareScannerOptionsPanel.java +++ b/Core/src/com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/CTMalwareScannerOptionsPanel.java @@ -134,6 +134,11 @@ public synchronized void loadSettings() { setMalwareScansDisplay(null, null); if (licenseInfo != null) { loadMalwareScansInfo(licenseInfo); + this.purchaseFromLabel.setVisible(false); + this.purchaseLink.setVisible(false); + } else { + this.purchaseFromLabel.setVisible(false); + this.purchaseLink.setVisible(false); } } @@ -241,8 +246,8 @@ private void initComponents() { hashLookupsRemainingLabel = new javax.swing.JLabel(); fileUploadsRemainingLabel = new javax.swing.JLabel(); javax.swing.JPanel purchasePanel = new javax.swing.JPanel(); - javax.swing.JLabel purchaseFromLabel = new javax.swing.JLabel(); - javax.swing.JLabel purchaseLink = new javax.swing.JLabel(); + purchaseFromLabel = new javax.swing.JLabel(); + purchaseLink = new javax.swing.JLabel(); setLayout(new java.awt.GridBagLayout()); @@ -384,7 +389,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; malwareScansPanel.add(malwareScannerStatsPanel, gridBagConstraints); purchasePanel.setLayout(new java.awt.GridBagLayout()); @@ -732,5 +739,7 @@ protected void done() { private javax.swing.JPanel malwareScansPanel; private javax.swing.JLabel maxFileUploadsLabel; private javax.swing.JLabel maxHashLookupsLabel; + private javax.swing.JLabel purchaseFromLabel; + private javax.swing.JLabel purchaseLink; // End of variables declaration//GEN-END:variables } -- GitLab