6773 adjust comments remove unnecessary code

This commit is contained in:
William Schaefer 2020-10-27 13:08:18 -04:00
parent 377eae9750
commit f6fa07b5d5
5 changed files with 12 additions and 13 deletions

View File

@ -92,6 +92,10 @@ class ArtifactsListPanel extends JPanel {
return tableModel.getRowCount() <= 0;
}
/**
* Select the first available artifact in the list if it is not empty to
* populate the panel to the right.
*/
void selectFirst() {
if (!isEmpty()) {
jTable1.setRowSelectionInterval(0, 0);

View File

@ -1,7 +1,7 @@
/*
* Autopsy
*
* Copyright 2019-2020 Basis Technology Corp.
* Copyright 2020 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -50,7 +50,6 @@
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new AnimatedSplitPane()"/>
<AuxValue name="JavaCodeGenerator_LayoutCodePost" type="java.lang.String" value="setDetailsVisible(false);"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">

View File

@ -149,7 +149,6 @@ public final class DiscoveryTopComponent extends TopComponent {
DiscoveryEventUtils.getDiscoveryEventBus().unregister(groupListPanel);
DiscoveryEventUtils.getDiscoveryEventBus().unregister(resultsPanel);
DiscoveryEventUtils.getDiscoveryEventBus().unregister(rightSplitPane.getBottomComponent());
setDetailsVisible(false);
super.componentClosed();
}
@ -180,9 +179,6 @@ public final class DiscoveryTopComponent extends TopComponent {
rightSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
rightSplitPane.setResizeWeight(1.0);
rightSplitPane.setPreferredSize(new java.awt.Dimension(800, 700));
setDetailsVisible(false);
mainSplitPane.setRightComponent(rightSplitPane);
add(mainSplitPane, java.awt.BorderLayout.CENTER);
@ -293,11 +289,6 @@ public final class DiscoveryTopComponent extends TopComponent {
progressMessageTextArea.setText(Bundle.DiscoveryTopComponent_searchInProgress_text(searchType.name()));
}
private void setDetailsVisible(boolean isVisible) {
rightSplitPane.getComponent(1).setVisible(isVisible);
rightSplitPane.getComponent(2).setVisible(isVisible);
}
/**
* Subscribe to the SearchCompleteEvent for updating the UI accordingly.
*
@ -324,7 +315,6 @@ public final class DiscoveryTopComponent extends TopComponent {
} else {
rightSplitPane.setBottomComponent(new FileDetailsPanel());
}
setDetailsVisible(true);
DiscoveryEventUtils.getDiscoveryEventBus().register(rightSplitPane.getBottomComponent());
descriptionText += searchCompleteEvent.getFilters().stream().map(AbstractFilter::getDesc).collect(Collectors.joining("; "));
progressMessageTextArea.setText(Bundle.DiscoveryTopComponent_searchComplete_text(descriptionText));

View File

@ -106,6 +106,12 @@ final class DomainArtifactsTabPanel extends JPanel {
}
}
/**
* Handle the event which indicates the artifacts have been retrieved.
*
* @param artifactListEvent The event which indicates the artifacts have
* been retrieved.
*/
@Subscribe
void handleArtifactListRetrievedEvent(DiscoveryEventUtils.ArtifactListRetrievedEvent artifactListEvent) {
SwingUtilities.invokeLater(() -> {