From 62a17e69f8212c35bac18583d0392c031f64a342 Mon Sep 17 00:00:00 2001 From: millmanorama Date: Mon, 26 Feb 2018 12:00:19 +0100 Subject: [PATCH 1/5] distinguish account from seperate devices --- .../communications/CommunicationsGraph.java | 14 ++++---------- .../autopsy/communications/VisualizationPanel.java | 3 ++- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java b/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java index 81ec5d7838..4cc456a500 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java +++ b/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java @@ -222,27 +222,21 @@ final class CommunicationsGraph extends mxGraph { private mxCell getOrCreateVertex(AccountDeviceInstanceKey accountDeviceInstanceKey) { final AccountDeviceInstance accountDeviceInstance = accountDeviceInstanceKey.getAccountDeviceInstance(); - final String name =// accountDeviceInstance.getDeviceId() + ":" + + final String name = accountDeviceInstance.getAccount().getTypeSpecificID(); - final mxCell vertex = nodeMap.computeIfAbsent(name, vertexName -> { + final mxCell vertex = nodeMap.computeIfAbsent(name+accountDeviceInstance.getDeviceId(), vertexName -> { double size = Math.sqrt(accountDeviceInstanceKey.getMessageCount()) + 10; mxCell newVertex = (mxCell) insertVertex( getDefaultParent(), - vertexName, accountDeviceInstanceKey, + name, accountDeviceInstanceKey, Math.random() * 400, Math.random() * 400, size, size); return newVertex; }); -// final mxCellState state = getView().getState(vertex, true); -// -// getView().updateLabel(state); -// getView().updateLabelBounds(state); -// getView().updateBoundingBox(state); - return vertex; } @@ -310,7 +304,7 @@ final class CommunicationsGraph extends mxGraph { Set accountIDs = relatedAccounts.keySet(); - Map relationshipCounts = commsManager.getRelationshipCounts(accountIDs, currentFilter); + Map relationshipCounts = commsManager.getRelationshipCountsBetween(accountIDs, currentFilter); int total = relationshipCounts.size(); int k = 0; diff --git a/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java b/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java index 889b81cf74..54ca6e425f 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java +++ b/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java @@ -728,7 +728,8 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider mxICell target = (mxICell) graph.getModel().getTerminal(cell, false); AccountDeviceInstanceKey account2 = (AccountDeviceInstanceKey) target.getValue(); try { - final List relationshipSources1 = commsManager.getRelationshipSources(account1.getAccountDeviceInstance(), + final List relationshipSources1 = commsManager.getRelationshipSources( + account1.getAccountDeviceInstance(), account2.getAccountDeviceInstance(), currentFilter); relationshipSources.addAll(relationshipSources1); From 4239c92f9e8f52de45e714cae3794887bcf295b6 Mon Sep 17 00:00:00 2001 From: millmanorama Date: Mon, 26 Feb 2018 15:25:53 +0100 Subject: [PATCH 2/5] cleanup and add info to tool tips --- .../communications/CommunicationsGraph.java | 42 +++++-------------- .../communications/Vertex_Label_template.html | 2 +- 2 files changed, 11 insertions(+), 33 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java b/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java index 4cc456a500..1a64f10c47 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java +++ b/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java @@ -193,19 +193,22 @@ final class CommunicationsGraph extends mxGraph { final AccountDeviceInstanceKey adiKey = (AccountDeviceInstanceKey) value; scopes.put("accountName", adiKey.getAccountDeviceInstance().getAccount().getTypeSpecificID()); - scopes.put("size", 12);// Math.round(Math.log(adiKey.getMessageCount()) + 5)); + scopes.put("relationships", 12);// Math.round(Math.log(adiKey.getMessageCount()) + 5)); scopes.put("iconFileName", CommunicationsGraph.class.getResource("/org/sleuthkit/autopsy/communications/images/" + Utils.getIconFileName(adiKey.getAccountDeviceInstance().getAccount().getAccountType()))); scopes.put("pinned", pinnedAccountModel.isAccountPinned(adiKey)); scopes.put("MARKER_PIN_URL", MARKER_PIN_URL); scopes.put("locked", lockedVertexModel.isVertexLocked((mxCell) cell)); scopes.put("LOCK_URL", LOCK_URL); + scopes.put("device_id", adiKey.getAccountDeviceInstance().getDeviceId()); labelMustache.execute(stringWriter, scopes); return stringWriter.toString(); } else { - return ((mxICell) cell).getId(); + final mxICell edge = (mxICell) cell; + final long count = (long) edge.getValue(); + return""+ edge.getId() + "
" + count + (count == 1 ? " relationship" : " relationships")+""; } } @@ -222,10 +225,9 @@ final class CommunicationsGraph extends mxGraph { private mxCell getOrCreateVertex(AccountDeviceInstanceKey accountDeviceInstanceKey) { final AccountDeviceInstance accountDeviceInstance = accountDeviceInstanceKey.getAccountDeviceInstance(); - final String name = - accountDeviceInstance.getAccount().getTypeSpecificID(); + final String name = accountDeviceInstance.getAccount().getTypeSpecificID(); - final mxCell vertex = nodeMap.computeIfAbsent(name+accountDeviceInstance.getDeviceId(), vertexName -> { + final mxCell vertex = nodeMap.computeIfAbsent(name + accountDeviceInstance.getDeviceId(), vertexName -> { double size = Math.sqrt(accountDeviceInstanceKey.getMessageCount()) + 10; mxCell newVertex = (mxCell) insertVertex( @@ -247,12 +249,11 @@ final class CommunicationsGraph extends mxGraph { Object[] edgesBetween = getEdgesBetween(vertex1, vertex2); mxCell edge; if (edgesBetween.length == 0) { - final String edgeName = vertex1.getId() + " <-> " + vertex2.getId(); + final String edgeName = vertex1.getId() + " - " + vertex2.getId(); edge = (mxCell) insertEdge(getDefaultParent(), edgeName, relSources, vertex1, vertex2, "strokeWidth=" + (Math.log(relSources) + 1)); } else { edge = (mxCell) edgesBetween[0]; -// ((Collection) edge.getValue()).addAll(relSources); edge.setStyle("strokeWidth=" + (Math.log(relSources) + 1)); } return edge; @@ -308,38 +309,15 @@ final class CommunicationsGraph extends mxGraph { int total = relationshipCounts.size(); int k = 0; - progress.switchToDeterminate("", 0,total); + progress.switchToDeterminate("", 0, total); for (Map.Entry entry : relationshipCounts.entrySet()) { Long count = entry.getValue(); Relationship.RelationshipKey relationshipKey = entry.getKey(); AccountDeviceInstanceKey account1 = relatedAccounts.get(relationshipKey.getAccount1ID()); AccountDeviceInstanceKey account2 = relatedAccounts.get(relationshipKey.getAccount2ID()); mxCell addEdge = addOrUpdateEdge(count, account1, account2); - progress.progress(addEdge.getId(),k++); + progress.progress(addEdge.getId(), k++); } -// //for each pair of related accounts add edges if they are related o each other. -// // this is O(n^2) in the number of related accounts!!! -// List relatedAccountsList = new ArrayList<>(relatedAccounts); -// progress.switchToDeterminate("", 0, relatedAccountsList.size()); -// -// for (i = 0; i < relatedAccountsList.size(); i++) { -// AccountDeviceInstanceKey adiKey1 = relatedAccountsList.get(i); -// for (int j = i; j < relatedAccountsList.size(); j++) { -// if (isCancelled()) { -// break; -// } -// AccountDeviceInstanceKey adiKey2 = relatedAccountsList.get(j); -// List relationships = commsManager.getRelationshipSources( -// adiKey1.getAccountDeviceInstance(), -// adiKey2.getAccountDeviceInstance(), -// currentFilter); -// if (relationships.size() > 0) { -// mxCell addEdge = addEdge(relationships, adiKey1, adiKey2); -// progress.progress(addEdge.getId()); -// } -// } -// progress.progress(i); -// } } catch (TskCoreException tskCoreException) { logger.log(Level.SEVERE, "Error", tskCoreException); } finally { diff --git a/Core/src/org/sleuthkit/autopsy/communications/Vertex_Label_template.html b/Core/src/org/sleuthkit/autopsy/communications/Vertex_Label_template.html index 4e489c992a..4b6d3db580 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/Vertex_Label_template.html +++ b/Core/src/org/sleuthkit/autopsy/communications/Vertex_Label_template.html @@ -1,3 +1,3 @@ -
{{#pinned}}{{/pinned}}{{#locked}}{{/locked}}{{accountName}}
+
{{#pinned}}{{/pinned}}{{#locked}}{{/locked}}{{accountName}} {{#device_id}}
data source: {{device_id}}{{/device_id}}
\ No newline at end of file From 9d4f697754338be29c0d9ff0d26eb3be4f2f415b Mon Sep 17 00:00:00 2001 From: Jonathan Millman Date: Tue, 27 Feb 2018 10:43:05 +0100 Subject: [PATCH 3/5] use correct method name --- .../sleuthkit/autopsy/communications/CommunicationsGraph.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java b/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java index 81ec5d7838..3d51f3c292 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java +++ b/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java @@ -310,7 +310,7 @@ final class CommunicationsGraph extends mxGraph { Set accountIDs = relatedAccounts.keySet(); - Map relationshipCounts = commsManager.getRelationshipCounts(accountIDs, currentFilter); + Map relationshipCounts = commsManager.getRelationshipCountsBetween(accountIDs, currentFilter); int total = relationshipCounts.size(); int k = 0; From 3f5619933d6dd73f4fe560a9c724e43e195bd1c7 Mon Sep 17 00:00:00 2001 From: millmanorama Date: Tue, 27 Feb 2018 15:24:44 +0100 Subject: [PATCH 4/5] reset state of data source filters when case is opened. --- .../communications/CVTTopComponent.java | 2 +- .../communications/CommunicationsGraph.java | 2 +- .../autopsy/communications/FiltersPanel.java | 68 +++++++++++++------ 3 files changed, 48 insertions(+), 24 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java b/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java index 11ae8809e8..539459fdea 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java @@ -142,7 +142,7 @@ public final class CVTTopComponent extends TopComponent { * * Re-applying the filters means we will lose the selection... */ - filtersPane.updateAndApplyFilters(); + filtersPane.updateAndApplyFilters(true); } @Override diff --git a/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java b/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java index 81ec5d7838..3d51f3c292 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java +++ b/Core/src/org/sleuthkit/autopsy/communications/CommunicationsGraph.java @@ -310,7 +310,7 @@ final class CommunicationsGraph extends mxGraph { Set accountIDs = relatedAccounts.keySet(); - Map relationshipCounts = commsManager.getRelationshipCounts(accountIDs, currentFilter); + Map relationshipCounts = commsManager.getRelationshipCountsBetween(accountIDs, currentFilter); int total = relationshipCounts.size(); int k = 0; diff --git a/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java b/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java index 36f9ac4410..f9031af04a 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java +++ b/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java @@ -61,8 +61,15 @@ final public class FiltersPanel extends JPanel { private static final long serialVersionUID = 1L; private static final Logger logger = Logger.getLogger(FiltersPanel.class.getName()); + /** + * Map from Account.Type to the checkbox for that account type's filter. + */ @ThreadConfined(type = ThreadConfined.ThreadType.AWT) private final Map accountTypeMap = new HashMap<>(); + + /** + * Map from datasource device id to the checkbox for that datasource. + */ @ThreadConfined(type = ThreadConfined.ThreadType.AWT) private final Map devicesMap = new HashMap<>(); @@ -70,6 +77,11 @@ final public class FiltersPanel extends JPanel { * Listens to ingest events to enable refresh button */ private final PropertyChangeListener ingestListener; + + /** + * Flag that indicates the UI is not up-sto-date with respect to the case DB + * and it should be refreshed (by reapplying the filters). + */ private boolean needsRefresh; /** @@ -78,10 +90,16 @@ final public class FiltersPanel extends JPanel { * results) */ private final ItemListener validationListener; - private boolean deviceAccountTypeEnabled = false; - @NbBundle.Messages({"refreshText=Refresh Results", - "applyText=Apply"}) + /** + * Is the device account type filter enabled or not. It should be enabled + * when the Table/Brows mode is active and disabled when the visualization + * is active. Initially false since the browse/table mode is active + * initially. + */ + private boolean deviceAccountTypeEnabled; + + @NbBundle.Messages({"refreshText=Refresh Results", "applyText=Apply"}) public FiltersPanel() { initComponents(); deviceRequiredLabel.setVisible(false); @@ -102,8 +120,7 @@ final public class FiltersPanel extends JPanel { updateTimeZone(); validationListener = itemEvent -> validateFilters(); - updateFilters(); - setAllDevicesSelected(true); + updateFilters(true); UserPreferences.addChangeListener(preferenceChangeEvent -> { if (preferenceChangeEvent.getKey().equals(UserPreferences.DISPLAY_TIMES_IN_LOCAL_TIME)) { updateTimeZone(); @@ -118,7 +135,7 @@ final public class FiltersPanel extends JPanel { if (null != eventData && eventData.getBlackboardArtifactType().getTypeID() != BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID() && eventData.getBlackboardArtifactType().getTypeID() != BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT.getTypeID()) { - updateFilters(); + updateFilters(false); needsRefresh = true; validateFilters(); } @@ -150,8 +167,8 @@ final public class FiltersPanel extends JPanel { /** * Update the filter widgets, and apply them. */ - void updateAndApplyFilters() { - updateFilters(); + void updateAndApplyFilters(boolean initialState) { + updateFilters(initialState); applyFilters(); } @@ -162,9 +179,9 @@ final public class FiltersPanel extends JPanel { /** * Updates the filter widgets to reflect he data sources/types in the case. */ - private void updateFilters() { + private void updateFilters(boolean initialState) { updateAccountTypeFilter(); - updateDeviceFilter(); + updateDeviceFilter(initialState); } @Override @@ -221,7 +238,7 @@ final public class FiltersPanel extends JPanel { /** * Populate the devices filter widgets */ - private void updateDeviceFilter() { + private void updateDeviceFilter(boolean initialState) { try { final SleuthkitCase sleuthkitCase = Case.getCurrentCase().getSleuthkitCase(); @@ -229,13 +246,12 @@ final public class FiltersPanel extends JPanel { String dsName = sleuthkitCase.getContentById(dataSource.getId()).getName(); //store the device id in the map, but display a datasource name in the UI. devicesMap.computeIfAbsent(dataSource.getDeviceId(), ds -> { - final JCheckBox jCheckBox = new JCheckBox(dsName, false); + final JCheckBox jCheckBox = new JCheckBox(dsName, initialState); jCheckBox.addItemListener(validationListener); devicesPane.add(jCheckBox); return jCheckBox; }); - }; - + } } catch (IllegalStateException ex) { logger.log(Level.WARNING, "Communications Visualization Tool opened with no open case.", ex); } catch (TskCoreException tskCoreException) { @@ -538,6 +554,21 @@ final public class FiltersPanel extends JPanel { return new DateRangeFilter(start, end); } + /** + * Enable or disable the device account type filter. The filter should be + * disabled for the browse/table mode and enabled for the visualization. + * + * @param enable True to enable the device account type filter, False to + * disable it. + */ + void setDeviceAccountTypeEnabled(boolean enable) { + deviceAccountTypeEnabled = enable; + JCheckBox deviceCheckbox = accountTypeMap.get(Account.Type.DEVICE); + if (deviceCheckbox != null) { + deviceCheckbox.setEnabled(deviceAccountTypeEnabled); + } + } + /** * Set the selection state of all the account type check boxes * @@ -569,6 +600,7 @@ final public class FiltersPanel extends JPanel { private void setAllSelected(Map map, boolean selected) { map.values().forEach(box -> box.setSelected(selected)); } + private void unCheckAllAccountTypesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_unCheckAllAccountTypesButtonActionPerformed setAllAccountTypesSelected(false); }//GEN-LAST:event_unCheckAllAccountTypesButtonActionPerformed @@ -620,12 +652,4 @@ final public class FiltersPanel extends JPanel { private final javax.swing.JButton unCheckAllAccountTypesButton = new javax.swing.JButton(); private final javax.swing.JButton unCheckAllDevicesButton = new javax.swing.JButton(); // End of variables declaration//GEN-END:variables - - void setDeviceAccountTypeEnabled(boolean enableDeviceAccountType) { - deviceAccountTypeEnabled = enableDeviceAccountType; - JCheckBox deviceCheckbox = accountTypeMap.get(Account.Type.DEVICE); - if (deviceCheckbox != null) { - deviceCheckbox.setEnabled(deviceAccountTypeEnabled); - } - } } From 0f4e58569be87a3f1bf963b6b0f6c9b04641b84e Mon Sep 17 00:00:00 2001 From: millmanorama Date: Tue, 27 Feb 2018 15:36:27 +0100 Subject: [PATCH 5/5] resolve codacy issues --- .../communications/CVTTopComponent.form | 4 +- .../communications/CVTTopComponent.java | 68 +++++++++++-------- 2 files changed, 43 insertions(+), 29 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.form b/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.form index 75898c859e..055719c488 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.form +++ b/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.form @@ -4,7 +4,7 @@ - + @@ -92,4 +92,4 @@ - \ No newline at end of file + diff --git a/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java b/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java index 539459fdea..47a478ec2d 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java @@ -19,8 +19,14 @@ package org.sleuthkit.autopsy.communications; import com.google.common.eventbus.Subscribe; +import java.awt.Dimension; +import java.awt.Font; import java.util.List; import java.util.stream.Collectors; +import javax.swing.GroupLayout; +import javax.swing.ImageIcon; +import javax.swing.JTabbedPane; +import javax.swing.LayoutStyle; import org.openide.util.Lookup; import org.openide.util.NbBundle; import org.openide.util.lookup.ProxyLookup; @@ -83,48 +89,46 @@ public final class CVTTopComponent extends TopComponent { // //GEN-BEGIN:initComponents private void initComponents() { - browseVisualizeTabPane = new javax.swing.JTabbedPane(); - accountsBrowser = new org.sleuthkit.autopsy.communications.AccountsBrowser(); - vizPanel = new org.sleuthkit.autopsy.communications.VisualizationPanel(); - filtersPane = new org.sleuthkit.autopsy.communications.FiltersPanel(); + browseVisualizeTabPane = new JTabbedPane(); + accountsBrowser = new AccountsBrowser(); + vizPanel = new VisualizationPanel(); + filtersPane = new FiltersPanel(); - browseVisualizeTabPane.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N - browseVisualizeTabPane.addTab(org.openide.util.NbBundle.getMessage(CVTTopComponent.class, "CVTTopComponent.accountsBrowser.TabConstraints.tabTitle_1"), new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/table.png")), accountsBrowser); // NOI18N - browseVisualizeTabPane.addTab(org.openide.util.NbBundle.getMessage(CVTTopComponent.class, "CVTTopComponent.vizPanel.TabConstraints.tabTitle_1"), new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/emblem-web.png")), vizPanel); // NOI18N + browseVisualizeTabPane.setFont(new Font("Tahoma", 0, 18)); // NOI18N + browseVisualizeTabPane.addTab(NbBundle.getMessage(CVTTopComponent.class, "CVTTopComponent.accountsBrowser.TabConstraints.tabTitle_1"), new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/table.png")), accountsBrowser); // NOI18N + browseVisualizeTabPane.addTab(NbBundle.getMessage(CVTTopComponent.class, "CVTTopComponent.vizPanel.TabConstraints.tabTitle_1"), new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/emblem-web.png")), vizPanel); // NOI18N - filtersPane.setMinimumSize(new java.awt.Dimension(256, 495)); + filtersPane.setMinimumSize(new Dimension(256, 495)); - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); + GroupLayout layout = new GroupLayout(this); this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(6, 6, 6) - .addComponent(filtersPane, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(browseVisualizeTabPane, javax.swing.GroupLayout.DEFAULT_SIZE, 786, Short.MAX_VALUE) + .addComponent(filtersPane, GroupLayout.PREFERRED_SIZE, 265, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(browseVisualizeTabPane, GroupLayout.PREFERRED_SIZE, 786, Short.MAX_VALUE) .addContainerGap()) ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(6, 6, 6) - .addComponent(filtersPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(filtersPane, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(5, 5, 5)) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(browseVisualizeTabPane) .addContainerGap()) ); - browseVisualizeTabPane.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CVTTopComponent.class, "CVTTopComponent.browseVisualizeTabPane.AccessibleContext.accessibleName")); // NOI18N + browseVisualizeTabPane.getAccessibleContext().setAccessibleName(NbBundle.getMessage(CVTTopComponent.class, "CVTTopComponent.browseVisualizeTabPane.AccessibleContext.accessibleName")); // NOI18N }// //GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables - private org.sleuthkit.autopsy.communications.AccountsBrowser accountsBrowser; - private javax.swing.JTabbedPane browseVisualizeTabPane; - private org.sleuthkit.autopsy.communications.FiltersPanel filtersPane; - private org.sleuthkit.autopsy.communications.VisualizationPanel vizPanel; + private AccountsBrowser accountsBrowser; + private JTabbedPane browseVisualizeTabPane; + private FiltersPanel filtersPane; + private VisualizationPanel vizPanel; // End of variables declaration//GEN-END:variables @Override @@ -156,14 +160,24 @@ public final class CVTTopComponent extends TopComponent { .collect(Collectors.toList()); } + /** + * Extension of ProxyLookup that exposes the ability to change the Lookups + * delegated to. + * + */ final private static class ProxyLookupImpl extends ProxyLookup { - ProxyLookupImpl(Lookup... l) { - super(l); + ProxyLookupImpl(Lookup... lookups) { + super(lookups); } - protected void changeLookups(Lookup... l) { - setLookups(l); + /** + * Set the Lookups delegated to by this lookup. + * + * @param lookups The new Lookups to delegate to. + */ + protected void changeLookups(Lookup... lookups) { + setLookups(lookups); } } }