diff --git a/Core/src/org/sleuthkit/autopsy/communications/AccountDetailsNode.java b/Core/src/org/sleuthkit/autopsy/communications/AccountDetailsNode.java index 88470e87e0..7bc1a0faae 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/AccountDetailsNode.java +++ b/Core/src/org/sleuthkit/autopsy/communications/AccountDetailsNode.java @@ -38,7 +38,7 @@ import org.sleuthkit.datamodel.TskCoreException; * relationships of all the accounts in this node. * */ -class AccountDetailsNode extends AbstractNode { +final class AccountDetailsNode extends AbstractNode { private final static Logger logger = Logger.getLogger(AccountDetailsNode.class.getName()); diff --git a/Core/src/org/sleuthkit/autopsy/communications/AccountDeviceInstanceNode.java b/Core/src/org/sleuthkit/autopsy/communications/AccountDeviceInstanceNode.java index aa34a65e8e..5b88b01999 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/AccountDeviceInstanceNode.java +++ b/Core/src/org/sleuthkit/autopsy/communications/AccountDeviceInstanceNode.java @@ -54,23 +54,23 @@ final class AccountDeviceInstanceNode extends AbstractNode { setIconBaseWithExtension("org/sleuthkit/autopsy/communications/images/" + Utils.getIconFileName(account.getAccountType())); } - public AccountDeviceInstance getAccountDeviceInstance() { + AccountDeviceInstance getAccountDeviceInstance() { return accountDeviceInstanceKey.getAccountDeviceInstance(); } - public AccountDeviceInstanceKey getAccountDeviceInstanceKey() { + AccountDeviceInstanceKey getAccountDeviceInstanceKey() { return accountDeviceInstanceKey; } - public CommunicationsManager getCommsManager() { + CommunicationsManager getCommsManager() { return commsManager; } - public long getMessageCount() { + long getMessageCount() { return accountDeviceInstanceKey.getMessageCount(); } - public CommunicationsFilter getFilter() { + CommunicationsFilter getFilter() { return accountDeviceInstanceKey.getCommunicationsFilter(); } diff --git a/Core/src/org/sleuthkit/autopsy/communications/AccountsBrowser.java b/Core/src/org/sleuthkit/autopsy/communications/AccountsBrowser.java index 8d6407fe02..828d654298 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/AccountsBrowser.java +++ b/Core/src/org/sleuthkit/autopsy/communications/AccountsBrowser.java @@ -70,7 +70,7 @@ public final class AccountsBrowser extends JPanel implements ExplorerManager.Pro } - protected void init(ExplorerManager tableExplorerManager) { + void init(ExplorerManager tableExplorerManager) { this.accountsTableEM = tableExplorerManager; tableExplorerManager.addPropertyChangeListener(evt -> { if (ExplorerManager.PROP_ROOT_CONTEXT.equals(evt.getPropertyName())) { diff --git a/Core/src/org/sleuthkit/autopsy/communications/CVTEvents.java b/Core/src/org/sleuthkit/autopsy/communications/CVTEvents.java index a8e75fffe9..663b711c99 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/CVTEvents.java +++ b/Core/src/org/sleuthkit/autopsy/communications/CVTEvents.java @@ -21,14 +21,17 @@ package org.sleuthkit.autopsy.communications; import com.google.common.eventbus.EventBus; /** - * Provide he singleton EventBus. + * Provide the singleton EventBus. */ final class CVTEvents { private final static EventBus cvtEventBus = new EventBus(); - public static EventBus getCVTEventBus() { + static EventBus getCVTEventBus() { return cvtEventBus; } + private CVTEvents() { + } + } diff --git a/Core/src/org/sleuthkit/autopsy/communications/MessageBrowser.java b/Core/src/org/sleuthkit/autopsy/communications/MessageBrowser.java index 2f76267edf..d0cbdc6e64 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/MessageBrowser.java +++ b/Core/src/org/sleuthkit/autopsy/communications/MessageBrowser.java @@ -57,7 +57,7 @@ public final class MessageBrowser extends JPanel implements ExplorerManager.Prov * context-sensitive actions. */ @NbBundle.Messages({"MessageBrowser.DataResultViewerTable.title=Messages"}) - public MessageBrowser(ExplorerManager tableEM, ExplorerManager gacExplorerManager) { + MessageBrowser(ExplorerManager tableEM, ExplorerManager gacExplorerManager) { this.tableEM = tableEM; this.gacExplorerManager = gacExplorerManager; initComponents(); diff --git a/Core/src/org/sleuthkit/autopsy/communications/MessageDataContent.java b/Core/src/org/sleuthkit/autopsy/communications/MessageDataContent.java index 1c4ea0f7b4..ac54faa6ad 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/MessageDataContent.java +++ b/Core/src/org/sleuthkit/autopsy/communications/MessageDataContent.java @@ -26,7 +26,7 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataContent; * Extends MessageContentViewer so that it implements DataContent and can be set * as the only ContentViewer for a DataResultPanel */ -public class MessageDataContent extends MessageContentViewer implements DataContent { +final class MessageDataContent extends MessageContentViewer implements DataContent { private static final long serialVersionUID = 1L; diff --git a/Core/src/org/sleuthkit/autopsy/communications/PinAccountEvent.java b/Core/src/org/sleuthkit/autopsy/communications/PinAccountEvent.java index e77ab3f35d..c8ba063adb 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/PinAccountEvent.java +++ b/Core/src/org/sleuthkit/autopsy/communications/PinAccountEvent.java @@ -11,11 +11,11 @@ import java.util.Collection; /** * */ -class PinAccountEvent { +final class PinAccountEvent { private final ImmutableSet accountDeviceInstances; - public ImmutableSet getAccountDeviceInstances() { + ImmutableSet getAccountDeviceInstances() { return accountDeviceInstances; } diff --git a/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java b/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java index 31f5871b81..fff7dfa9ad 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java +++ b/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java @@ -43,11 +43,11 @@ import org.sleuthkit.datamodel.TskCoreException; /** * Node for a relationship, as represented by a BlackboardArtifact. */ -public class RelationshipNode extends BlackboardArtifactNode { +final class RelationshipNode extends BlackboardArtifactNode { private static final Logger logger = Logger.getLogger(RelationshipNode.class.getName()); - public RelationshipNode(BlackboardArtifact artifact) { + RelationshipNode(BlackboardArtifact artifact) { super(artifact); final String stripEnd = StringUtils.stripEnd(artifact.getDisplayName(), "s"); String removeEndIgnoreCase = StringUtils.removeEndIgnoreCase(stripEnd, "message"); diff --git a/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java b/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java index f07eaa32f1..709b6bf760 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java +++ b/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java @@ -27,6 +27,7 @@ import com.mxgraph.model.mxCell; import com.mxgraph.swing.mxGraphComponent; import com.mxgraph.util.mxConstants; import com.mxgraph.view.mxGraph; +import com.mxgraph.view.mxGraphView; import com.mxgraph.view.mxStylesheet; import java.awt.BorderLayout; import java.awt.Color; @@ -121,6 +122,7 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider graphComponent = new mxGraphComponent(graph); graphComponent.setAutoScroll(true); + graphComponent.setOpaque(true); graphComponent.setBackground(Color.WHITE); jPanel1.add(graphComponent, BorderLayout.CENTER); @@ -433,6 +435,11 @@ final public class VisualizationPanel extends JPanel implements Lookup.Provider private void applyOrganicLayout() { new mxOrganicLayout(graph).execute(graph.getDefaultParent()); + + mxGraphView view = graphComponent.getGraph().getView(); + int compLen = graphComponent.getWidth(); + int viewLen = (int) view.getGraphBounds().getWidth(); + view.setScale((double) compLen / viewLen * view.getScale()); graphComponent.zoomAndCenter(); }