mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
Merge branch 'CVT-VisualizeTab' into CVT-link-selection
# Conflicts: # Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java
This commit is contained in:
commit
59d99e5d10
@ -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());
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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())) {
|
||||
|
@ -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() {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
||||
|
@ -11,11 +11,11 @@ import java.util.Collection;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class PinAccountEvent {
|
||||
final class PinAccountEvent {
|
||||
|
||||
private final ImmutableSet<AccountDeviceInstanceKey> accountDeviceInstances;
|
||||
|
||||
public ImmutableSet<AccountDeviceInstanceKey> getAccountDeviceInstances() {
|
||||
ImmutableSet<AccountDeviceInstanceKey> getAccountDeviceInstances() {
|
||||
return accountDeviceInstances;
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user