19 package org.sleuthkit.autopsy.communications;
21 import com.google.common.eventbus.Subscribe;
22 import java.awt.Dimension;
24 import java.util.List;
25 import java.util.stream.Collectors;
26 import javax.swing.GroupLayout;
27 import javax.swing.ImageIcon;
28 import javax.swing.JTabbedPane;
29 import javax.swing.LayoutStyle;
30 import org.openide.util.Lookup;
31 import org.openide.util.NbBundle;
32 import org.openide.windows.Mode;
33 import org.openide.windows.RetainLocation;
34 import org.openide.windows.TopComponent;
35 import org.openide.windows.WindowManager;
41 @TopComponent.Description(preferredID =
"CVTTopComponent", persistenceType = TopComponent.PERSISTENCE_NEVER)
42 @TopComponent.Registration(mode =
"cvt", openAtStartup =
false)
43 @RetainLocation(
"cvt")
44 @NbBundle.Messages(
"CVTTopComponent.name= Communications Visualization")
52 setName(Bundle.CVTTopComponent_name());
60 associateLookup(proxyLookup);
64 proxyLookup.setNewLookups(selectedComponent.getLookup());
73 CVTEvents.getCVTEventBus().register(
this);
74 CVTEvents.getCVTEventBus().register(
vizPanel);
79 void pinAccount(CVTEvents.PinAccountsEvent pinEvent) {
98 browseVisualizeTabPane.addTab(NbBundle.getMessage(
CVTTopComponent.class,
"CVTTopComponent.vizPanel.TabConstraints.tabTitle_1"),
new ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/communications/images/emblem-web.png")),
vizPanel);
100 filtersPane.setMinimumSize(
new Dimension(256, 495));
102 GroupLayout layout =
new GroupLayout(
this);
103 this.setLayout(layout);
104 layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
105 .addGroup(layout.createSequentialGroup()
107 .addComponent(
filtersPane, GroupLayout.PREFERRED_SIZE, 265, GroupLayout.PREFERRED_SIZE)
108 .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
112 layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
113 .addGroup(layout.createSequentialGroup()
115 .addComponent(
filtersPane, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
117 .addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
122 browseVisualizeTabPane.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
CVTTopComponent.class,
"CVTTopComponent.browseVisualizeTabPane.AccessibleContext.accessibleName"));
135 super.componentOpened();
136 WindowManager.getDefault().setTopComponentFloating(
this,
true);
148 filtersPane.updateAndApplyFilters(
true);
158 return modes.stream().filter(mode -> mode.getName().equals(
"cvt"))
159 .collect(Collectors.toList());
VisualizationPanel vizPanel
static final long serialVersionUID
JTabbedPane browseVisualizeTabPane
AccountsBrowser accountsBrowser
List< Mode > availableModes(List< Mode > modes)