mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 00:16:16 +00:00
Cleaned up changes
This commit is contained in:
parent
f7c50bc382
commit
fe5f587198
@ -24,6 +24,7 @@ import java.awt.Component;
|
||||
import java.awt.Font;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.swing.ImageIcon;
|
||||
@ -37,7 +38,9 @@ import org.openide.windows.RetainLocation;
|
||||
import org.openide.windows.TopComponent;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.communications.relationships.RelationshipBrowser;
|
||||
import org.sleuthkit.autopsy.communications.relationships.SelectionInfo;
|
||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||
import org.sleuthkit.datamodel.CommunicationsFilter;
|
||||
|
||||
/**
|
||||
* Top component which displays the Communications Visualization Tool.
|
||||
@ -51,11 +54,11 @@ public final class CVTTopComponent extends TopComponent {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private boolean filtersVisible = true;
|
||||
private final RelationshipBrowser relationshipBrowser;
|
||||
private final RelationshipBrowser relationshipBrowser = new RelationshipBrowser();
|
||||
private CommunicationsFilter currentFilter;
|
||||
|
||||
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
|
||||
public CVTTopComponent() {
|
||||
relationshipBrowser = new RelationshipBrowser();
|
||||
initComponents();
|
||||
|
||||
splitPane.setRightComponent(relationshipBrowser);
|
||||
@ -77,6 +80,8 @@ public final class CVTTopComponent extends TopComponent {
|
||||
Lookup lookup = ((Lookup.Provider)selectedComponent).getLookup();
|
||||
proxyLookup.setNewLookups(lookup);
|
||||
}
|
||||
|
||||
relationshipBrowser.setSelectionInfo(new SelectionInfo(new HashSet<>(), new HashSet<>(), currentFilter));
|
||||
});
|
||||
|
||||
|
||||
@ -88,12 +93,20 @@ public final class CVTTopComponent extends TopComponent {
|
||||
CVTEvents.getCVTEventBus().register(vizPanel);
|
||||
CVTEvents.getCVTEventBus().register(accountsBrowser);
|
||||
CVTEvents.getCVTEventBus().register(filtersPane);
|
||||
|
||||
filterTabbedPane.setIconAt(0, new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/arrow-180.png")));
|
||||
filterTabbedPane.setTitleAt(0, "");
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
void pinAccount(CVTEvents.PinAccountsEvent pinEvent) {
|
||||
browseVisualizeTabPane.setSelectedIndex(1);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
void handle(final CVTEvents.FilterChangeEvent filterChangeEvent) {
|
||||
currentFilter = filterChangeEvent.getNewFilter();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
@ -103,7 +116,7 @@ public final class CVTTopComponent extends TopComponent {
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
filterTabPane = new JTabbedPane();
|
||||
filterTabbedPane = new JTabbedPane();
|
||||
filterTabPanel = new JPanel();
|
||||
filtersPane = new FiltersPanel();
|
||||
splitPane = new JSplitPane();
|
||||
@ -113,17 +126,18 @@ public final class CVTTopComponent extends TopComponent {
|
||||
|
||||
setLayout(new BorderLayout());
|
||||
|
||||
filterTabPane.addMouseListener(new MouseAdapter() {
|
||||
filterTabbedPane.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent evt) {
|
||||
filterTabPaneMouseClicked(evt);
|
||||
filterTabbedPaneMouseClicked(evt);
|
||||
}
|
||||
});
|
||||
|
||||
filterTabPanel.add(filtersPane);
|
||||
filterTabPanel.setLayout(new BorderLayout());
|
||||
filterTabPanel.add(filtersPane, BorderLayout.CENTER);
|
||||
|
||||
filterTabPane.addTab(NbBundle.getMessage(CVTTopComponent.class, "CVTTopComponent.filterTabPanel.TabConstraints.tabTitle"), filterTabPanel); // NOI18N
|
||||
filterTabbedPane.addTab(NbBundle.getMessage(CVTTopComponent.class, "CVTTopComponent.filterTabPanel.TabConstraints.tabTitle"), filterTabPanel); // NOI18N
|
||||
|
||||
add(filterTabPane, BorderLayout.WEST);
|
||||
add(filterTabbedPane, BorderLayout.WEST);
|
||||
|
||||
splitPane.setDividerLocation(1);
|
||||
splitPane.setResizeWeight(0.25);
|
||||
@ -138,15 +152,17 @@ public final class CVTTopComponent extends TopComponent {
|
||||
add(splitPane, BorderLayout.CENTER);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void filterTabPaneMouseClicked(MouseEvent evt) {//GEN-FIRST:event_filterTabPaneMouseClicked
|
||||
int index = filterTabPane.indexAtLocation(evt.getX(), evt.getY());
|
||||
private void filterTabbedPaneMouseClicked(MouseEvent evt) {//GEN-FIRST:event_filterTabPaneMouseClicked
|
||||
int index = filterTabbedPane.indexAtLocation(evt.getX(), evt.getY());
|
||||
if(index != -1) {
|
||||
if(filtersVisible) {
|
||||
filterTabbedPane.setIconAt(0, new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/arrow.png")));
|
||||
filterTabPanel.removeAll();
|
||||
filterTabPanel.revalidate();
|
||||
filtersVisible = false;
|
||||
} else {
|
||||
filterTabPanel.add(filtersPane);
|
||||
filterTabbedPane.setIconAt(0, new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/arrow-180.png")));
|
||||
filterTabPanel.add(filtersPane, BorderLayout.CENTER);
|
||||
filterTabPanel.revalidate();
|
||||
filtersVisible = true;
|
||||
}
|
||||
@ -157,7 +173,7 @@ public final class CVTTopComponent extends TopComponent {
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private AccountsBrowser accountsBrowser;
|
||||
private JTabbedPane browseVisualizeTabPane;
|
||||
private JTabbedPane filterTabPane;
|
||||
private JTabbedPane filterTabbedPane;
|
||||
private JPanel filterTabPanel;
|
||||
private FiltersPanel filtersPane;
|
||||
private JSplitPane splitPane;
|
||||
|
@ -18,6 +18,7 @@
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="scrollPane">
|
||||
<Properties>
|
||||
<Property name="autoscrolls" type="boolean" value="true"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
@ -37,7 +38,7 @@
|
||||
<Container class="javax.swing.JPanel" name="limitPane">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="15" insetsLeft="0" insetsBottom="15" insetsRight="0" anchor="18" weightX="1.0" weightY="1.0"/>
|
||||
<GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="15" insetsLeft="0" insetsBottom="15" insetsRight="25" anchor="18" weightX="1.0" weightY="1.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
@ -128,7 +129,7 @@
|
||||
<Container class="javax.swing.JPanel" name="dateRangePane">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="15" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="15" insetsLeft="0" insetsBottom="0" insetsRight="25" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
@ -222,7 +223,7 @@
|
||||
<Container class="javax.swing.JPanel" name="devicesPane">
|
||||
<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="2" ipadX="0" ipadY="100" insetsTop="15" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="100" insetsTop="15" insetsLeft="0" insetsBottom="0" insetsRight="25" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
@ -325,7 +326,7 @@
|
||||
<Container class="javax.swing.JPanel" name="accountTypesPane">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="15" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="15" insetsLeft="0" insetsBottom="0" insetsRight="25" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
@ -422,7 +423,7 @@
|
||||
<Container class="javax.swing.JPanel" name="topPane">
|
||||
<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="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="24" weightX="1.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="25" anchor="24" weightX="1.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
|
@ -477,6 +477,7 @@ final public class FiltersPanel extends JPanel {
|
||||
|
||||
setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
scrollPane.setAutoscrolls(true);
|
||||
scrollPane.setBorder(null);
|
||||
|
||||
mainPanel.setLayout(new java.awt.GridBagLayout());
|
||||
@ -541,7 +542,7 @@ final public class FiltersPanel extends JPanel {
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(15, 0, 15, 0);
|
||||
gridBagConstraints.insets = new java.awt.Insets(15, 0, 15, 25);
|
||||
mainPanel.add(limitPane, gridBagConstraints);
|
||||
|
||||
startDatePicker.setEnabled(false);
|
||||
@ -608,7 +609,7 @@ final public class FiltersPanel extends JPanel {
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
|
||||
gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 25);
|
||||
mainPanel.add(dateRangePane, gridBagConstraints);
|
||||
|
||||
devicesPane.setLayout(new java.awt.GridBagLayout());
|
||||
@ -686,7 +687,7 @@ final public class FiltersPanel extends JPanel {
|
||||
gridBagConstraints.ipady = 100;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
|
||||
gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 25);
|
||||
mainPanel.add(devicesPane, gridBagConstraints);
|
||||
|
||||
accountTypesPane.setLayout(new java.awt.GridBagLayout());
|
||||
@ -760,7 +761,7 @@ final public class FiltersPanel extends JPanel {
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
|
||||
gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 25);
|
||||
mainPanel.add(accountTypesPane, gridBagConstraints);
|
||||
|
||||
topPane.setLayout(new java.awt.GridBagLayout());
|
||||
@ -810,6 +811,7 @@ final public class FiltersPanel extends JPanel {
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_END;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 25);
|
||||
mainPanel.add(topPane, gridBagConstraints);
|
||||
|
||||
scrollPane.setViewportView(mainPanel);
|
||||
|
@ -15,7 +15,7 @@
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,-106,0,0,4,-59"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,63,0,0,4,-59"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
@ -40,9 +40,9 @@
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace pref="315" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="316" max="32767" attributes="0"/>
|
||||
<Component id="jTextArea1" min="-2" pref="424" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="482" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="481" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
@ -47,8 +47,6 @@ import java.awt.FlowLayout;
|
||||
import java.awt.Font;
|
||||
import java.awt.Frame;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
@ -113,7 +111,7 @@ import org.sleuthkit.datamodel.AccountDeviceInstance;
|
||||
import org.sleuthkit.datamodel.CommunicationsFilter;
|
||||
import org.sleuthkit.datamodel.CommunicationsManager;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.autopsy.corecomponents.WrapLayout;
|
||||
import org.sleuthkit.autopsy.uicomponents.WrapLayout;
|
||||
/**
|
||||
* A panel that goes in the Visualize tab of the Communications Visualization
|
||||
* Tool. Hosts an JGraphX mxGraphComponent that implements the communications
|
||||
@ -410,9 +408,9 @@ final public class VisualizationPanel extends JPanel {
|
||||
placeHolderPanel.setLayout(placeHolderPanelLayout);
|
||||
placeHolderPanelLayout.setHorizontalGroup(placeHolderPanelLayout.createParallelGroup(GroupLayout.LEADING)
|
||||
.add(placeHolderPanelLayout.createSequentialGroup()
|
||||
.addContainerGap(315, Short.MAX_VALUE)
|
||||
.addContainerGap(316, Short.MAX_VALUE)
|
||||
.add(jTextArea1, GroupLayout.PREFERRED_SIZE, 424, GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(482, Short.MAX_VALUE))
|
||||
.addContainerGap(481, Short.MAX_VALUE))
|
||||
);
|
||||
placeHolderPanelLayout.setVerticalGroup(placeHolderPanelLayout.createParallelGroup(GroupLayout.LEADING)
|
||||
.add(placeHolderPanelLayout.createSequentialGroup()
|
||||
|
BIN
Core/src/org/sleuthkit/autopsy/communications/images/arrow-180.png
Executable file
BIN
Core/src/org/sleuthkit/autopsy/communications/images/arrow-180.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 1022 B |
BIN
Core/src/org/sleuthkit/autopsy/communications/images/arrow.png
Executable file
BIN
Core/src/org/sleuthkit/autopsy/communications/images/arrow.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
@ -56,6 +56,7 @@ import static org.sleuthkit.autopsy.corecomponents.Bundle.*;
|
||||
import org.sleuthkit.autopsy.corecomponents.ResultViewerPersistence.SortCriterion;
|
||||
import org.sleuthkit.autopsy.coreutils.ImageUtils;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.uicomponents.WrapLayout;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
|
2
Core/src/org/sleuthkit/autopsy/corecomponents/WrapLayout.java → Core/src/org/sleuthkit/autopsy/uicomponents/WrapLayout.java
Normal file → Executable file
2
Core/src/org/sleuthkit/autopsy/corecomponents/WrapLayout.java → Core/src/org/sleuthkit/autopsy/uicomponents/WrapLayout.java
Normal file → Executable file
@ -16,7 +16,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.corecomponents;
|
||||
package org.sleuthkit.autopsy.uicomponents;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.Container;
|
Loading…
x
Reference in New Issue
Block a user