19 package org.sleuthkit.autopsy.communications.relationships;
21 import java.awt.CardLayout;
22 import javax.swing.JTable;
23 import javax.swing.SwingUtilities;
24 import javax.swing.table.TableColumn;
25 import org.openide.explorer.ExplorerManager;
26 import static org.openide.explorer.ExplorerUtils.createLookup;
27 import org.openide.explorer.view.OutlineView;
28 import org.openide.nodes.Node;;
29 import org.openide.util.Lookup;
38 public class OutlineViewPanel extends javax.swing.JPanel implements ExplorerManager.Provider, Lookup.Provider{
46 tableEm =
new ExplorerManager();
47 lookup = createLookup(tableEm, getActionMap());
68 SwingUtilities.invokeLater(() -> {
69 CardLayout layout = (CardLayout)this.getLayout();
70 layout.show(
this,
"messageCard");
79 SwingUtilities.invokeLater(() -> {
80 CardLayout layout = (CardLayout)this.getLayout();
81 layout.show(
this,
"outlineCard");
95 tableEm.setRootContext(node);
100 super.setEnabled(enabled);
116 for (
int i = 0; i < table.getColumnModel().getColumnCount(); i++) {
117 total += percentages[i];
120 for (
int i = 0; i < table.getColumnModel().getColumnCount(); i++) {
121 TableColumn column = table.getColumnModel().getColumn(i);
122 column.setPreferredWidth((
int) (table.getPreferredSize().width * (percentages[i] / total)));
131 @SuppressWarnings(
"unchecked")
139 setLayout(
new java.awt.CardLayout(5, 5));
144 messageLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
ExplorerManager getExplorerManager()
void setTableColumnsWidth(double...percentages)
void setEnabled(boolean enabled)
org.openide.explorer.view.OutlineView outlineView
javax.swing.JLabel messageLabel
javax.swing.JPanel messagePanel
final ExplorerManager tableEm
void hideOutlineView(String message)
OutlineView getOutlineView()