From 8feec32e9d5532434b472a0d3f51f73ba840adad Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Mon, 16 Sep 2013 12:36:52 -0400 Subject: [PATCH 01/17] Loading large amounts of Nodes no longer blocks the UI. --- .../corecomponents/DataResultPanel.java | 2 +- .../corecomponents/DataResultViewerTable.java | 90 +++++++++++++++---- .../datamodel/FileSearchFilterChildren.java | 15 ++-- 3 files changed, 81 insertions(+), 26 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java index 18a13ec560..4f21a1ce5a 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java @@ -287,7 +287,7 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C public void setNode(Node selectedNode) { this.rootNode = selectedNode; if (selectedNode != null) { - int childrenCount = selectedNode.getChildren().getNodesCount(true); + int childrenCount = selectedNode.getChildren().getNodesCount(); this.numberMatchLabel.setText(Integer.toString(childrenCount)); } diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java index 36ccb8715d..3fc82abb00 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java @@ -22,14 +22,17 @@ import java.awt.Cursor; import java.awt.FontMetrics; import java.awt.Graphics; import java.awt.dnd.DnDConstants; +import java.beans.PropertyChangeEvent; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; +import java.util.logging.Level; import org.sleuthkit.autopsy.coreutils.Logger; import javax.swing.JTable; import javax.swing.ListSelectionModel; +import javax.swing.SwingUtilities; import org.netbeans.swing.outline.DefaultOutlineModel; import org.openide.explorer.ExplorerManager; import org.openide.explorer.view.OutlineView; @@ -38,6 +41,10 @@ import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.nodes.Node.Property; import org.openide.nodes.Node.PropertySet; +import org.openide.nodes.NodeEvent; +import org.openide.nodes.NodeListener; +import org.openide.nodes.NodeMemberEvent; +import org.openide.nodes.NodeReorderEvent; import org.openide.nodes.Sheet; import org.sleuthkit.autopsy.corecomponentinterfaces.DataResultViewer; @@ -53,6 +60,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer { private String firstColumnLabel = "Name"; private Set propertiesAcc = new LinkedHashSet<>(); private static final Logger logger = Logger.getLogger(DataResultViewerTable.class.getName()); + private final DummyNodeListener dummyNodeListener = new DummyNodeListener(); /** * Creates a DataResultViewerTable object that is compatible with node @@ -246,11 +254,38 @@ public class DataResultViewerTable extends AbstractDataResultViewer { hasChildren = selectedNode.getChildren().getNodesCount() > 0; } - + Node oldNode = this.em.getRootContext(); + if (oldNode != null) { + oldNode.removeNodeListener(dummyNodeListener); + } + // if there's no selection node, do nothing if (hasChildren) { Node root = selectedNode; - + root.addNodeListener(dummyNodeListener); + setupTable(root); + } else { + final OutlineView ov = ((OutlineView) this.tableScrollPanel); + Node emptyNode = new AbstractNode(Children.LEAF); + em.setRootContext(emptyNode); // make empty node + ov.getOutline().setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); + ov.setPropertyColumns(); // set the empty property header + } + } finally { + this.setCursor(null); + } + } + + /** + * Create Column Headers based on the Content represented by the Nodes in + * the table. + * + * @param root The parent Node of the ContentNodes + */ + private void setupTable(final Node root) { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { //wrap to filter out children //note: this breaks the tree view mode in this generic viewer, //so wrap nodes earlier if want 1 level view @@ -261,11 +296,11 @@ public class DataResultViewerTable extends AbstractDataResultViewer { em.setRootContext(root); - final OutlineView ov = ((OutlineView) this.tableScrollPanel); + final OutlineView ov = ((OutlineView) DataResultViewerTable.this.tableScrollPanel); propertiesAcc.clear(); - this.getAllChildPropertyHeadersRec(selectedNode, 100); + DataResultViewerTable.this.getAllChildPropertyHeadersRec(root, 100); List props = new ArrayList(propertiesAcc); if (props.size() > 0) { Node.Property prop = props.remove(0); @@ -315,7 +350,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer { // get first 100 rows values for the table Object[][] content = null; - content = getRowValues(selectedNode, 100); + content = getRowValues(root, 100); if (content != null) { @@ -341,17 +376,8 @@ public class DataResultViewerTable extends AbstractDataResultViewer { // turn on the auto resize ov.getOutline().setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); } - - } else { - final OutlineView ov = ((OutlineView) this.tableScrollPanel); - Node emptyNode = new AbstractNode(Children.LEAF); - em.setRootContext(emptyNode); // make empty node - ov.getOutline().setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); - ov.setPropertyColumns(); // set the empty property header } - } finally { - this.setCursor(null); - } + }); } private static Object[][] getRowValues(Node node, int rows) { @@ -454,4 +480,38 @@ public class DataResultViewerTable extends AbstractDataResultViewer { super.clearComponent(); } + + private class DummyNodeListener implements NodeListener { + private static final String DUMMY_NODE_DISPLAY_NAME = "Please Wait..."; + + @Override + public void childrenAdded(NodeMemberEvent nme) { + } + + @Override + public void childrenRemoved(NodeMemberEvent nme) { + Node removed = nme.getDelta()[0]; + if (! removed.getDisplayName().equals(DUMMY_NODE_DISPLAY_NAME)) { + // If it's not the dummy waiting node, we don't want + // to reload the table headers + return; + } + + // dummy node removed. Reset the table headers. + Node node = nme.getNode(); + setupTable(node); + } + + @Override + public void childrenReordered(NodeReorderEvent nre) { + } + + @Override + public void nodeDestroyed(NodeEvent ne) { + } + + @Override + public void propertyChange(PropertyChangeEvent evt) { + } + } } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FileSearchFilterChildren.java b/Core/src/org/sleuthkit/autopsy/datamodel/FileSearchFilterChildren.java index cc4f6309f0..0b351ea5bc 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FileSearchFilterChildren.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FileSearchFilterChildren.java @@ -25,7 +25,6 @@ import org.sleuthkit.autopsy.coreutils.Logger; import org.openide.nodes.AbstractNode; import org.openide.nodes.ChildFactory; import org.openide.nodes.Node; -import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.ContentVisitor; import org.sleuthkit.datamodel.DerivedFile; @@ -45,7 +44,7 @@ class FileSearchFilterChildren extends ChildFactory { private SleuthkitCase skCase; private SearchFilters.SearchFilterInterface filter; private static final Logger logger = Logger.getLogger(FileSearchFilterChildren.class.getName()); - //private final static int MAX_OBJECTS = 2000; +// private final static int MAX_OBJECTS = 2000; public FileSearchFilterChildren(SearchFilters.SearchFilterInterface filter, SleuthkitCase skCase) { this.filter = filter; @@ -57,7 +56,6 @@ class FileSearchFilterChildren extends ChildFactory { list.addAll(runQuery()); return true; } - private String createQuery(){ String query = "(dir_type = " + TskData.TSK_FS_NAME_TYPE_ENUM.REG.getValue() + ")" @@ -66,18 +64,15 @@ class FileSearchFilterChildren extends ChildFactory { query += " OR name LIKE '%" + s + "'"; } query += ')'; - //query += " LIMIT " + MAX_OBJECTS; +// query += " LIMIT " + MAX_OBJECTS; return query; } - private List runQuery(){ - List list = new ArrayList(); + private List runQuery(){ + List list = new ArrayList<>(); try { - List res = skCase.findAllFilesWhere(createQuery()); - for(AbstractFile c : res){ - list.add(c); - } + list = skCase.findAllFilesWhere(createQuery()); } catch (TskCoreException ex) { logger.log(Level.SEVERE, "Couldn't get search results", ex); } From 260776a2910f6a3b4cd47c16045bdaf6ee0aa8d6 Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Tue, 17 Sep 2013 12:12:13 -0400 Subject: [PATCH 02/17] Added cap to number of Nodes generated in DeletedContent --- Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java b/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java index 72f8bd451c..5b6d47906c 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java @@ -213,6 +213,8 @@ public class DeletedContent implements AutopsyVisitableItem { private SleuthkitCase skCase; private DeletedContent.DeletedContentFilter filter; private final Logger logger = Logger.getLogger(DeletedContentChildren.class.getName()); + + private static final int MAX_OBJECTS = 2000; DeletedContentChildren(DeletedContent.DeletedContentFilter filter, SleuthkitCase skCase) { this.skCase = skCase; @@ -258,6 +260,7 @@ public class DeletedContent implements AutopsyVisitableItem { } + query += " LIMIT " + MAX_OBJECTS; return query; } From 7e896c073123c453320ae375ca25373dd4d87ecd Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Tue, 17 Sep 2013 12:35:13 -0400 Subject: [PATCH 03/17] DataResultPanel now checks which DRV are supported for the current Node when the children are done loading. --- .../corecomponents/DataResultPanel.java | 57 ++++++++++++++++--- 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java index 4f21a1ce5a..bc2e4f9282 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java @@ -19,6 +19,7 @@ package org.sleuthkit.autopsy.corecomponents; import java.awt.Cursor; +import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.util.ArrayList; @@ -29,6 +30,10 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import org.openide.explorer.ExplorerManager; import org.openide.nodes.Node; +import org.openide.nodes.NodeEvent; +import org.openide.nodes.NodeListener; +import org.openide.nodes.NodeMemberEvent; +import org.openide.nodes.NodeReorderEvent; import org.openide.util.Lookup; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.corecomponentinterfaces.DataContent; @@ -58,6 +63,7 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C private DataContent customContentViewer; private boolean isMain; private String title; + private final DummyNodeListener dummyNodeListener = new DummyNodeListener(); private static final Logger logger = Logger.getLogger(DataResultPanel.class.getName() ); @@ -285,7 +291,16 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C @Override public void setNode(Node selectedNode) { + if (this.rootNode != null) { + this.rootNode.removeNodeListener(dummyNodeListener); + } this.rootNode = selectedNode; + if (this.rootNode != null) { + this.rootNode.addNodeListener(dummyNodeListener); + } + + setupTabs(selectedNode); + if (selectedNode != null) { int childrenCount = selectedNode.getChildren().getNodesCount(); this.numberMatchLabel.setText(Integer.toString(childrenCount)); @@ -295,7 +310,16 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C this.numberMatchLabel.setVisible(true); resetTabs(selectedNode); - + + // set the display on the current active tab + int currentActiveTab = this.dataResultTabbedPanel.getSelectedIndex(); + if (currentActiveTab != -1) { + UpdateWrapper drv = viewers.get(currentActiveTab); + drv.setNode(selectedNode); + } + } + + private void setupTabs(Node selectedNode) { //update/disable tabs based on if supported for this node int drvC = 0; for (UpdateWrapper drv : viewers) { @@ -307,13 +331,6 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C } ++drvC; } - - // set the display on the current active tab - int currentActiveTab = this.dataResultTabbedPanel.getSelectedIndex(); - if (currentActiveTab != -1) { - UpdateWrapper drv = viewers.get(currentActiveTab); - drv.setNode(selectedNode); - } } @Override @@ -499,4 +516,28 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C public void setNumMatches(int numMatches) { this.numberMatchLabel.setText(Integer.toString(numMatches)); } + + private class DummyNodeListener implements NodeListener { + + @Override + public void childrenAdded(NodeMemberEvent nme) { + setupTabs(nme.getNode()); + } + + @Override + public void childrenRemoved(NodeMemberEvent nme) { + } + + @Override + public void childrenReordered(NodeReorderEvent nre) { + } + + @Override + public void nodeDestroyed(NodeEvent ne) { + } + + @Override + public void propertyChange(PropertyChangeEvent evt) { + } + } } From 4b0fe6dd63e75d6e4cddc54423f4f332ba3b807e Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Wed, 18 Sep 2013 16:13:02 -0400 Subject: [PATCH 04/17] Moved adding of jdkhome property to the windows installer targets. --- build-windows.xml | 11 +++++++++++ build.xml | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build-windows.xml b/build-windows.xml index 330321f372..f048ee98b2 100644 --- a/build-windows.xml +++ b/build-windows.xml @@ -27,6 +27,17 @@ + + + + + + + + + + + diff --git a/build.xml b/build.xml index 11f80417cb..417487251e 100644 --- a/build.xml +++ b/build.xml @@ -78,7 +78,6 @@ - From 393f9180fbe648e1e50c6ea39ab4e870b75cf000 Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Thu, 19 Sep 2013 10:55:20 -0400 Subject: [PATCH 05/17] Corrected gstreamer env variable in build script. --- build-windows.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-windows.xml b/build-windows.xml index f048ee98b2..dc7cec7600 100644 --- a/build-windows.xml +++ b/build-windows.xml @@ -185,7 +185,7 @@ - + From 0370fddf57623a4aab92ebeeed851789ec96dfa3 Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Thu, 19 Sep 2013 13:42:44 -0400 Subject: [PATCH 06/17] Added popup dialog to DeletedCotent to alert the user that not all deleted files are shown. --- .../autopsy/datamodel/DeletedContent.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java b/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java index 5b6d47906c..66390045ee 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/DeletedContent.java @@ -22,6 +22,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.logging.Level; +import javax.swing.JOptionPane; +import javax.swing.SwingUtilities; import org.openide.nodes.AbstractNode; import org.openide.nodes.ChildFactory; import org.openide.nodes.Children; @@ -214,7 +216,7 @@ public class DeletedContent implements AutopsyVisitableItem { private DeletedContent.DeletedContentFilter filter; private final Logger logger = Logger.getLogger(DeletedContentChildren.class.getName()); - private static final int MAX_OBJECTS = 2000; + private static final int MAX_OBJECTS = 2001; DeletedContentChildren(DeletedContent.DeletedContentFilter filter, SleuthkitCase skCase) { this.skCase = skCase; @@ -223,7 +225,20 @@ public class DeletedContent implements AutopsyVisitableItem { @Override protected boolean createKeys(List list) { - list.addAll(runFsQuery()); + List queryList = runFsQuery(); + if (queryList.size() == MAX_OBJECTS) { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + JOptionPane.showMessageDialog(null, "There are more Deleted Files than can be displayed. Only the first " + + (MAX_OBJECTS - 1) + + " Deleted Files will be shown."); + } + }); + } + + queryList.remove(queryList.size() - 1); + list.addAll(queryList); return true; } From 81b5761684f77a44123fc49b87876944b44a137c Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Fri, 20 Sep 2013 15:08:36 -0400 Subject: [PATCH 07/17] Added fix to ensure DataResultPanel sets up activated tabs on the EDT. Cleaned up NodeListener logic. --- .../corecomponents/DataResultPanel.java | 73 +++++++++++-------- .../corecomponents/DataResultViewerTable.java | 18 ++--- 2 files changed, 51 insertions(+), 40 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java index 23ded6576d..d44eed57a7 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import javax.swing.JTabbedPane; +import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import org.openide.explorer.ExplorerManager; @@ -379,40 +380,46 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C } } - private void setupTabs(Node selectedNode) { - //update/disable tabs based on if supported for this node - int drvC = 0; - for (UpdateWrapper drv : viewers) { + private void setupTabs(final Node selectedNode) { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + //update/disable tabs based on if supported for this node + int drvC = 0; + for (UpdateWrapper drv : viewers) { - if (drv.isSupported(selectedNode)) { - dataResultTabbedPanel.setEnabledAt(drvC, true); - } else { - dataResultTabbedPanel.setEnabledAt(drvC, false); - } - ++drvC; - } + if (drv.isSupported(selectedNode)) { + dataResultTabbedPanel.setEnabledAt(drvC, true); + } else { + dataResultTabbedPanel.setEnabledAt(drvC, false); + } + ++drvC; + } - // if the current tab is no longer enabled, then find one that is - boolean hasViewerEnabled = true; - int currentActiveTab = this.dataResultTabbedPanel.getSelectedIndex(); - if ((currentActiveTab == -1) || (dataResultTabbedPanel.isEnabledAt(currentActiveTab) == false)) { - hasViewerEnabled = false; - for (int i = 0; i < dataResultTabbedPanel.getTabCount(); i++) { - if (dataResultTabbedPanel.isEnabledAt(i)) { - currentActiveTab = i; - hasViewerEnabled = true; - break; + // if the current tab is no longer enabled, then find one that is + boolean hasViewerEnabled = true; + int currentActiveTab = dataResultTabbedPanel.getSelectedIndex(); + if ((currentActiveTab == -1) || (dataResultTabbedPanel.isEnabledAt(currentActiveTab) == false)) { + hasViewerEnabled = false; + for (int i = 0; i < dataResultTabbedPanel.getTabCount(); i++) { + if (dataResultTabbedPanel.isEnabledAt(i)) { + currentActiveTab = i; + hasViewerEnabled = true; + break; + } + } + + if (hasViewerEnabled) { + dataResultTabbedPanel.setSelectedIndex(currentActiveTab); + } + } + + if (hasViewerEnabled) { + viewers.get(currentActiveTab).setNode(selectedNode); } } - - if (hasViewerEnabled) { - dataResultTabbedPanel.setSelectedIndex(currentActiveTab); - } - } + }); - if (hasViewerEnabled) { - viewers.get(currentActiveTab).setNode(selectedNode); - } } @Override @@ -604,9 +611,15 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C } private class DummyNodeListener implements NodeListener { + private static final String DUMMY_NODE_DISPLAY_NAME = "Please Wait..."; @Override - public void childrenAdded(NodeMemberEvent nme) { + public void childrenAdded(final NodeMemberEvent nme) { + Node added = nme.getNode(); + if (added.getDisplayName().equals(DUMMY_NODE_DISPLAY_NAME)) { + // don't set up tabs if the new node is a waiting node + return; + } setupTabs(nme.getNode()); } diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java index ac29e7008e..6c42c9f7bf 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java @@ -481,20 +481,18 @@ public class DataResultViewerTable extends AbstractDataResultViewer { @Override public void childrenAdded(NodeMemberEvent nme) { + Node added = nme.getNode(); + if (added.getDisplayName().equals(DUMMY_NODE_DISPLAY_NAME)) { + // If it's the dummy waiting node, we don't want + // to reload the table headers + return; + } + setupTable(added); } @Override public void childrenRemoved(NodeMemberEvent nme) { - Node removed = nme.getDelta()[0]; - if (! removed.getDisplayName().equals(DUMMY_NODE_DISPLAY_NAME)) { - // If it's not the dummy waiting node, we don't want - // to reload the table headers - return; - } - - // dummy node removed. Reset the table headers. - Node node = nme.getNode(); - setupTable(node); + } @Override From 7b839fb667d703642416123c66989f28218691b4 Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Sun, 22 Sep 2013 22:20:17 -0400 Subject: [PATCH 08/17] fixed wording of statement --- .../autopsy/casemodule/AddImageWizardAddingProgressPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java index 78380082b7..54e5728c4e 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java @@ -101,7 +101,7 @@ class AddImageWizardAddingProgressPanel implements WizardDescriptor.Panel Date: Sun, 22 Sep 2013 22:20:59 -0400 Subject: [PATCH 09/17] Added timezone to times in display --- .../autopsy/datamodel/ContentUtils.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ContentUtils.java b/Core/src/org/sleuthkit/autopsy/datamodel/ContentUtils.java index a873af4676..6a70800c49 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ContentUtils.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ContentUtils.java @@ -46,7 +46,7 @@ import org.sleuthkit.datamodel.VirtualDirectory; public final class ContentUtils { private final static Logger logger = Logger.getLogger(ContentUtils.class.getName()); - private static final SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + private static final SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z"); private static final SimpleDateFormat dateFormatterISO8601 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); // don't instantiate @@ -105,12 +105,17 @@ public final class ContentUtils { public static TimeZone getTimeZone(Content c) { try { - final Image image = c.getImage(); - if (image != null) { - return TimeZone.getTimeZone(image.getTimeZone()); - } else { - //case such as top level VirtualDirectory - return TimeZone.getDefault(); + if (false) { + return TimeZone.getTimeZone("GMT"); + } + else { + final Image image = c.getImage(); + if (image != null) { + return TimeZone.getTimeZone(image.getTimeZone()); + } else { + //case such as top level VirtualDirectory + return TimeZone.getDefault(); + } } } catch (TskException ex) { return TimeZone.getDefault(); From 33f1fa2783041fbf78bd4627347c0fefe01711c7 Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Mon, 23 Sep 2013 09:56:30 -0400 Subject: [PATCH 10/17] Removed color from FX video controls. --- .../autopsy/corecomponents/FXVideoPanel.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.java index 447eab4491..1ba879364c 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.java @@ -343,15 +343,6 @@ public class FXVideoPanel extends MediaViewVideoPanel { private static final String STOP_TEXT = "X"; - /** CSS-formatted skin for pauseButton when showing PLAY_TEXT. **/ - private static final String PLAY_STYLE = "-fx-text-fill: green;"; - - /** CSS-formatted skin for pauseButton when showing PAUSE_TEXT. **/ - private static final String PAUSE_STYLE = "-fx-font-weight: bolder;"; - - /** CSS-formatted skin for stopButton. **/ - private static final String STOP_STYLE = "-fx-text-fill: red; -fx-font-weight: bold;"; - public MediaPane() { // Video Display mediaViewPane = new HBox(); @@ -368,9 +359,7 @@ public class FXVideoPanel extends MediaViewVideoPanel { mediaTools.setPadding(new Insets(5, 10, 5, 10)); pauseButton = new Button(PLAY_TEXT); - pauseButton.setStyle(PLAY_STYLE); stopButton = new Button(STOP_TEXT); - stopButton.setStyle(STOP_STYLE); mediaTools.getChildren().add(pauseButton); mediaTools.getChildren().add(new Label(" ")); mediaTools.getChildren().add(stopButton); @@ -670,7 +659,6 @@ public class FXVideoPanel extends MediaViewVideoPanel { @Override public void run() { pauseButton.setText(PLAY_TEXT); - pauseButton.setStyle(PLAY_STYLE); } } @@ -681,7 +669,6 @@ public class FXVideoPanel extends MediaViewVideoPanel { @Override public void run() { pauseButton.setText(PAUSE_TEXT); - pauseButton.setStyle(PAUSE_STYLE); } } } From d393493a7885b96dccb66ed38e6b9acea2a231cf Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Mon, 23 Sep 2013 16:36:02 -0400 Subject: [PATCH 11/17] Updated based on TSK API change --- .../ExplorerNodeActionVisitor.java | 764 +++++++++--------- 1 file changed, 382 insertions(+), 382 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/ExplorerNodeActionVisitor.java b/Core/src/org/sleuthkit/autopsy/directorytree/ExplorerNodeActionVisitor.java index 90c1eded2e..72601900a9 100755 --- a/Core/src/org/sleuthkit/autopsy/directorytree/ExplorerNodeActionVisitor.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/ExplorerNodeActionVisitor.java @@ -1,383 +1,383 @@ -/* - * Autopsy Forensic Browser - * - * Copyright 2011 Basis Technology Corp. - * Contact: carrier sleuthkit org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.sleuthkit.autopsy.directorytree; - -import java.awt.Toolkit; -import java.awt.Dimension; -import java.awt.Font; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.logging.Level; -import javax.swing.AbstractAction; -import javax.swing.Action; -import javax.swing.JDialog; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JTable; -import javax.swing.table.DefaultTableModel; -import org.sleuthkit.autopsy.coreutils.Logger; -import org.sleuthkit.datamodel.Content; -import org.sleuthkit.datamodel.ContentVisitor; -import org.sleuthkit.datamodel.DerivedFile; -import org.sleuthkit.datamodel.Directory; -import org.sleuthkit.datamodel.FileSystem; -import org.sleuthkit.datamodel.Image; -import org.sleuthkit.datamodel.LocalFile; -import org.sleuthkit.datamodel.VirtualDirectory; -import org.sleuthkit.datamodel.Volume; - -public class ExplorerNodeActionVisitor extends ContentVisitor.Default> { - - private static ExplorerNodeActionVisitor instance = new ExplorerNodeActionVisitor(); - - public static List getActions(Content c) { - List actions = new ArrayList(); - - actions.addAll(c.accept(instance)); - //TODO: fix this - /* - while (c.isOnto()) { - try { - List children = c.getChildren(); - if (!children.isEmpty()) { - c = c.getChildren().get(0); - } else { - return actions; - } - } catch (TskException ex) { - Log.get(ExplorerNodeActionVisitor.class).log(Level.WARNING, "Error getting show detail actions.", ex); - return actions; - } - actions.addAll(c.accept(instance)); - }*/ - return actions; - } - - ExplorerNodeActionVisitor() { - } - - @Override - public List visit(final Image img) { - List lst = new ArrayList(); - lst.add(new ImageDetails("Image Details", img)); - //TODO lst.add(new ExtractAction("Extract Image", img)); - lst.add(new ExtractUnallocAction("Extract Unallocated Space to Single Files", img)); - return lst; - } - - @Override - public List visit(final FileSystem fs) { - return Collections.singletonList(new FileSystemDetails("File System Details", fs)); - } - - @Override - public List visit(final Volume vol) { - List lst = new ArrayList(); - lst.add(new VolumeDetails("Volume Details", vol)); - lst.add(new ExtractUnallocAction("Extract Unallocated Space to Single File", vol)); - return lst; - } - - @Override - public List visit(final Directory d) { - List actions = new ArrayList(); - actions.add(TagAbstractFileAction.getInstance()); - return actions; - } - - @Override - public List visit(final VirtualDirectory d) { - List actions = new ArrayList(); - actions.add(ExtractAction.getInstance()); - actions.add(TagAbstractFileAction.getInstance()); - return actions; - } - - @Override - public List visit(final DerivedFile d) { - List actions = new ArrayList(); - actions.add(ExtractAction.getInstance()); - actions.add(TagAbstractFileAction.getInstance()); - return actions; - } - - @Override - public List visit(final LocalFile d) { - List actions = new ArrayList(); - actions.add(ExtractAction.getInstance()); - actions.add(TagAbstractFileAction.getInstance()); - return actions; - } - - @Override - public List visit(final org.sleuthkit.datamodel.File d) { - List actions = new ArrayList(); - actions.add(ExtractAction.getInstance()); - actions.add(TagAbstractFileAction.getInstance()); - return actions; - } - - @Override - protected List defaultVisit(Content di) { - return Collections.emptyList(); - } - - //Below here are classes regarding node-specific actions - /** - * VolumeDetails class - */ - private class VolumeDetails extends AbstractAction { - - private final String title; - private final Volume vol; - - VolumeDetails(String title, Volume vol) { - super(title); - this.title = title; - this.vol = vol; - } - - @Override - public void actionPerformed(ActionEvent e) { - Logger.noteAction(ExplorerNodeActionVisitor.class); - - final JFrame frame = new JFrame(title); - final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal - - - Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize(); - - // set the popUp window / JFrame - popUpWindow.setSize(800, 400); - - int w = popUpWindow.getSize().width; - int h = popUpWindow.getSize().height; - - // set the location of the popUp Window on the center of the screen - popUpWindow.setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2); - - VolumeDetailsPanel volumeDetailPanel = new VolumeDetailsPanel(); - Boolean counter = false; - - volumeDetailPanel.setVolumeIDValue(Long.toString(vol.getAddr())); - volumeDetailPanel.setStartValue(Long.toString(vol.getStart())); - volumeDetailPanel.setLengthValue(Long.toString(vol.getLength())); - volumeDetailPanel.setDescValue(vol.getDescription()); - volumeDetailPanel.setFlagsValue(vol.getFlagsAsString()); - counter = true; - - if (counter) { - // add the volume detail panel to the popUp window - popUpWindow.add(volumeDetailPanel); - } else { - // error handler if no volume matches - JLabel error = new JLabel("Error: No Volume Matches."); - error.setFont(new Font("Arial", Font.BOLD, 24)); - popUpWindow.add(error); - } - - // add the command to close the window to the button on the Volume Detail Panel - volumeDetailPanel.setOKButtonActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - popUpWindow.dispose(); - } - }); - popUpWindow.pack(); - popUpWindow.setResizable(false); - popUpWindow.setVisible(true); - - } - } - - /** - * ImageDetails panel class - */ - private class ImageDetails extends AbstractAction { - - final String title; - final Image img; - - ImageDetails(String title, Image img) { - super(title); - this.title = title; - this.img = img; - } - - @Override - public void actionPerformed(ActionEvent e) { - Logger.noteAction(ExplorerNodeActionVisitor.class); - - final JFrame frame = new JFrame(title); - final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal - // if we select the Image Details menu - - Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize(); - - // set the popUp window / JFrame - popUpWindow.setSize(750, 400); - - int w = popUpWindow.getSize().width; - int h = popUpWindow.getSize().height; - - // set the location of the popUp Window on the center of the screen - popUpWindow.setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2); - - ImageDetailsPanel imgDetailPanel = new ImageDetailsPanel(); - Boolean counter = false; - - imgDetailPanel.setImgNameValue(img.getName()); - imgDetailPanel.setImgTypeValue(Image.imageTypeToString(img.getType())); - imgDetailPanel.setImgSectorSizeValue(Long.toString(img.getSsize())); - counter = true; - - if (counter) { - // add the volume detail panel to the popUp window - popUpWindow.add(imgDetailPanel); - } else { - // error handler if no volume matches - JLabel error = new JLabel("Error: No Volume Matches."); - error.setFont(new Font("Arial", Font.BOLD, 24)); - popUpWindow.add(error); - } - - // add the command to close the window to the button on the Volume Detail Panel - imgDetailPanel.setOKButtonActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - popUpWindow.dispose(); - } - }); - - - popUpWindow.pack(); - popUpWindow.setResizable(false); - popUpWindow.setVisible(true); - } - } - - /** - * FileSystemDetails class - */ - private class FileSystemDetails extends AbstractAction { - - private final FileSystem fs; - private final String title; - - FileSystemDetails(String title, FileSystem fs) { - super(title); - this.title = title; - this.fs = fs; - } - - @Override - public void actionPerformed(ActionEvent e) { - Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize(); - - Logger.noteAction(ExplorerNodeActionVisitor.class); - - final JFrame frame = new JFrame(title); - final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal - - // set the popUp window / JFrame - - popUpWindow.setSize(1000, 500); - - int w = popUpWindow.getSize().width; - int h = popUpWindow.getSize().height; - - // set the location of the popUp Window on the center of the screen - popUpWindow.setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2); - - String[] columnNames = new String[]{ - "fs_id", - "img_offset", - "par_id", - "fs_type", - "block_size", - "block_count", - "root_inum", - "first_inum", - "last_inum" - }; - - Object[][] rowValues = new Object[1][9]; - - Content parent = null; - try { - parent = fs.getParent(); - } catch (Exception ex) { - throw new RuntimeException("Problem getting parent from " + FileSystem.class.getName() + ": " + fs, ex); - } - long id = -1; - if (parent != null) { - id = parent.getId(); - } - - Arrays.fill(rowValues, 0, 1, new Object[]{ - fs.getId(), - fs.getImageOffset(), - id, - fs.getFsType(), - fs.getBlock_size(), - fs.getBlock_count(), - fs.getRoot_inum(), - fs.getFirst_inum(), - fs.getLastInum() - }); - - - JTable table = new JTable(new DefaultTableModel(rowValues, columnNames)); - - FileSystemDetailsPanel fsdPanel = new FileSystemDetailsPanel(); - - // add the command to close the window to the button on the Volume Detail Panel - fsdPanel.setOKButtonActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - popUpWindow.dispose(); - } - }); - - try { - fsdPanel.setFileSystemTypeValue(table.getValueAt(0, 3).toString()); - fsdPanel.setImageOffsetValue(table.getValueAt(0, 1).toString()); - fsdPanel.setVolumeIDValue(table.getValueAt(0, 2).toString()); //TODO: fix this to parent id, not vol id - fsdPanel.setBlockSizeValue(table.getValueAt(0, 4).toString()); - fsdPanel.setBlockCountValue(table.getValueAt(0, 5).toString()); - fsdPanel.setRootInumValue(table.getValueAt(0, 6).toString()); - fsdPanel.setFirstInumValue(table.getValueAt(0, 7).toString()); - fsdPanel.setLastInumValue(table.getValueAt(0, 8).toString()); - - popUpWindow.add(fsdPanel); - } catch (Exception ex) { - Logger.getLogger(ExplorerNodeActionVisitor.class.getName()).log(Level.WARNING, "Error setting up File System Details panel.", ex); - } - - popUpWindow.pack(); - popUpWindow.setResizable(false); - popUpWindow.setVisible(true); - - } - } +/* + * Autopsy Forensic Browser + * + * Copyright 2011 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.directorytree; + +import java.awt.Toolkit; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.logging.Level; +import javax.swing.AbstractAction; +import javax.swing.Action; +import javax.swing.JDialog; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JTable; +import javax.swing.table.DefaultTableModel; +import org.sleuthkit.autopsy.coreutils.Logger; +import org.sleuthkit.datamodel.Content; +import org.sleuthkit.datamodel.ContentVisitor; +import org.sleuthkit.datamodel.DerivedFile; +import org.sleuthkit.datamodel.Directory; +import org.sleuthkit.datamodel.FileSystem; +import org.sleuthkit.datamodel.Image; +import org.sleuthkit.datamodel.LocalFile; +import org.sleuthkit.datamodel.VirtualDirectory; +import org.sleuthkit.datamodel.Volume; + +public class ExplorerNodeActionVisitor extends ContentVisitor.Default> { + + private static ExplorerNodeActionVisitor instance = new ExplorerNodeActionVisitor(); + + public static List getActions(Content c) { + List actions = new ArrayList(); + + actions.addAll(c.accept(instance)); + //TODO: fix this + /* + while (c.isOnto()) { + try { + List children = c.getChildren(); + if (!children.isEmpty()) { + c = c.getChildren().get(0); + } else { + return actions; + } + } catch (TskException ex) { + Log.get(ExplorerNodeActionVisitor.class).log(Level.WARNING, "Error getting show detail actions.", ex); + return actions; + } + actions.addAll(c.accept(instance)); + }*/ + return actions; + } + + ExplorerNodeActionVisitor() { + } + + @Override + public List visit(final Image img) { + List lst = new ArrayList(); + lst.add(new ImageDetails("Image Details", img)); + //TODO lst.add(new ExtractAction("Extract Image", img)); + lst.add(new ExtractUnallocAction("Extract Unallocated Space to Single Files", img)); + return lst; + } + + @Override + public List visit(final FileSystem fs) { + return Collections.singletonList(new FileSystemDetails("File System Details", fs)); + } + + @Override + public List visit(final Volume vol) { + List lst = new ArrayList(); + lst.add(new VolumeDetails("Volume Details", vol)); + lst.add(new ExtractUnallocAction("Extract Unallocated Space to Single File", vol)); + return lst; + } + + @Override + public List visit(final Directory d) { + List actions = new ArrayList(); + actions.add(TagAbstractFileAction.getInstance()); + return actions; + } + + @Override + public List visit(final VirtualDirectory d) { + List actions = new ArrayList(); + actions.add(ExtractAction.getInstance()); + actions.add(TagAbstractFileAction.getInstance()); + return actions; + } + + @Override + public List visit(final DerivedFile d) { + List actions = new ArrayList(); + actions.add(ExtractAction.getInstance()); + actions.add(TagAbstractFileAction.getInstance()); + return actions; + } + + @Override + public List visit(final LocalFile d) { + List actions = new ArrayList(); + actions.add(ExtractAction.getInstance()); + actions.add(TagAbstractFileAction.getInstance()); + return actions; + } + + @Override + public List visit(final org.sleuthkit.datamodel.File d) { + List actions = new ArrayList(); + actions.add(ExtractAction.getInstance()); + actions.add(TagAbstractFileAction.getInstance()); + return actions; + } + + @Override + protected List defaultVisit(Content di) { + return Collections.emptyList(); + } + + //Below here are classes regarding node-specific actions + /** + * VolumeDetails class + */ + private class VolumeDetails extends AbstractAction { + + private final String title; + private final Volume vol; + + VolumeDetails(String title, Volume vol) { + super(title); + this.title = title; + this.vol = vol; + } + + @Override + public void actionPerformed(ActionEvent e) { + Logger.noteAction(ExplorerNodeActionVisitor.class); + + final JFrame frame = new JFrame(title); + final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal + + + Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize(); + + // set the popUp window / JFrame + popUpWindow.setSize(800, 400); + + int w = popUpWindow.getSize().width; + int h = popUpWindow.getSize().height; + + // set the location of the popUp Window on the center of the screen + popUpWindow.setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2); + + VolumeDetailsPanel volumeDetailPanel = new VolumeDetailsPanel(); + Boolean counter = false; + + volumeDetailPanel.setVolumeIDValue(Long.toString(vol.getAddr())); + volumeDetailPanel.setStartValue(Long.toString(vol.getStart())); + volumeDetailPanel.setLengthValue(Long.toString(vol.getLength())); + volumeDetailPanel.setDescValue(vol.getDescription()); + volumeDetailPanel.setFlagsValue(vol.getFlagsAsString()); + counter = true; + + if (counter) { + // add the volume detail panel to the popUp window + popUpWindow.add(volumeDetailPanel); + } else { + // error handler if no volume matches + JLabel error = new JLabel("Error: No Volume Matches."); + error.setFont(new Font("Arial", Font.BOLD, 24)); + popUpWindow.add(error); + } + + // add the command to close the window to the button on the Volume Detail Panel + volumeDetailPanel.setOKButtonActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + popUpWindow.dispose(); + } + }); + popUpWindow.pack(); + popUpWindow.setResizable(false); + popUpWindow.setVisible(true); + + } + } + + /** + * ImageDetails panel class + */ + private class ImageDetails extends AbstractAction { + + final String title; + final Image img; + + ImageDetails(String title, Image img) { + super(title); + this.title = title; + this.img = img; + } + + @Override + public void actionPerformed(ActionEvent e) { + Logger.noteAction(ExplorerNodeActionVisitor.class); + + final JFrame frame = new JFrame(title); + final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal + // if we select the Image Details menu + + Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize(); + + // set the popUp window / JFrame + popUpWindow.setSize(750, 400); + + int w = popUpWindow.getSize().width; + int h = popUpWindow.getSize().height; + + // set the location of the popUp Window on the center of the screen + popUpWindow.setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2); + + ImageDetailsPanel imgDetailPanel = new ImageDetailsPanel(); + Boolean counter = false; + + imgDetailPanel.setImgNameValue(img.getName()); + imgDetailPanel.setImgTypeValue(img.getType().getName()); + imgDetailPanel.setImgSectorSizeValue(Long.toString(img.getSsize())); + counter = true; + + if (counter) { + // add the volume detail panel to the popUp window + popUpWindow.add(imgDetailPanel); + } else { + // error handler if no volume matches + JLabel error = new JLabel("Error: No Volume Matches."); + error.setFont(new Font("Arial", Font.BOLD, 24)); + popUpWindow.add(error); + } + + // add the command to close the window to the button on the Volume Detail Panel + imgDetailPanel.setOKButtonActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + popUpWindow.dispose(); + } + }); + + + popUpWindow.pack(); + popUpWindow.setResizable(false); + popUpWindow.setVisible(true); + } + } + + /** + * FileSystemDetails class + */ + private class FileSystemDetails extends AbstractAction { + + private final FileSystem fs; + private final String title; + + FileSystemDetails(String title, FileSystem fs) { + super(title); + this.title = title; + this.fs = fs; + } + + @Override + public void actionPerformed(ActionEvent e) { + Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize(); + + Logger.noteAction(ExplorerNodeActionVisitor.class); + + final JFrame frame = new JFrame(title); + final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal + + // set the popUp window / JFrame + + popUpWindow.setSize(1000, 500); + + int w = popUpWindow.getSize().width; + int h = popUpWindow.getSize().height; + + // set the location of the popUp Window on the center of the screen + popUpWindow.setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2); + + String[] columnNames = new String[]{ + "fs_id", + "img_offset", + "par_id", + "fs_type", + "block_size", + "block_count", + "root_inum", + "first_inum", + "last_inum" + }; + + Object[][] rowValues = new Object[1][9]; + + Content parent = null; + try { + parent = fs.getParent(); + } catch (Exception ex) { + throw new RuntimeException("Problem getting parent from " + FileSystem.class.getName() + ": " + fs, ex); + } + long id = -1; + if (parent != null) { + id = parent.getId(); + } + + Arrays.fill(rowValues, 0, 1, new Object[]{ + fs.getId(), + fs.getImageOffset(), + id, + fs.getFsType(), + fs.getBlock_size(), + fs.getBlock_count(), + fs.getRoot_inum(), + fs.getFirst_inum(), + fs.getLastInum() + }); + + + JTable table = new JTable(new DefaultTableModel(rowValues, columnNames)); + + FileSystemDetailsPanel fsdPanel = new FileSystemDetailsPanel(); + + // add the command to close the window to the button on the Volume Detail Panel + fsdPanel.setOKButtonActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + popUpWindow.dispose(); + } + }); + + try { + fsdPanel.setFileSystemTypeValue(table.getValueAt(0, 3).toString()); + fsdPanel.setImageOffsetValue(table.getValueAt(0, 1).toString()); + fsdPanel.setVolumeIDValue(table.getValueAt(0, 2).toString()); //TODO: fix this to parent id, not vol id + fsdPanel.setBlockSizeValue(table.getValueAt(0, 4).toString()); + fsdPanel.setBlockCountValue(table.getValueAt(0, 5).toString()); + fsdPanel.setRootInumValue(table.getValueAt(0, 6).toString()); + fsdPanel.setFirstInumValue(table.getValueAt(0, 7).toString()); + fsdPanel.setLastInumValue(table.getValueAt(0, 8).toString()); + + popUpWindow.add(fsdPanel); + } catch (Exception ex) { + Logger.getLogger(ExplorerNodeActionVisitor.class.getName()).log(Level.WARNING, "Error setting up File System Details panel.", ex); + } + + popUpWindow.pack(); + popUpWindow.setResizable(false); + popUpWindow.setVisible(true); + + } + } } \ No newline at end of file From 7a7f72b9d500251d57565ba9b477b6bcefbb61e5 Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Mon, 23 Sep 2013 21:56:47 -0400 Subject: [PATCH 12/17] minor update to message --- .../autopsy/corecomponents/DataContentViewerArtifact.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java index 978c8dc079..919d6a85be 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java @@ -49,7 +49,7 @@ import org.sleuthkit.datamodel.TskException; public class DataContentViewerArtifact extends javax.swing.JPanel implements DataContentViewer{ private final static Logger logger = Logger.getLogger(DataContentViewerArtifact.class.getName()); - private final static String WAIT_TEXT = "Preparing display, please wait..."; + private final static String WAIT_TEXT = "Retrieving and preparing data, please wait..."; private final static String ERROR_TEXT = "Error retrieving result"; private Node currentNode; // @@@ Remove this when the redundant setNode() calls problem is fixed. private int currentPage = 1; From 93b1efd14003ec994a1f56d019f0577f8f5e81ee Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Wed, 18 Sep 2013 16:13:02 -0400 Subject: [PATCH 13/17] Moved adding of jdkhome property to the windows installer targets. --- build-windows.xml | 11 +++++++++++ build.xml | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build-windows.xml b/build-windows.xml index 330321f372..f048ee98b2 100644 --- a/build-windows.xml +++ b/build-windows.xml @@ -27,6 +27,17 @@ + + + + + + + + + + + diff --git a/build.xml b/build.xml index 11f80417cb..417487251e 100644 --- a/build.xml +++ b/build.xml @@ -78,7 +78,6 @@ - From 7eb0bb56ba045ea815b15fbbc46b7903e1b2e6e5 Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Fri, 20 Sep 2013 09:29:03 -0400 Subject: [PATCH 14/17] Updated default heap size to be 2GB. Config file gets updated for 32 bit build during installer creation. --- build-windows.xml | 30 +++++++++++++++++++----------- nbproject/project.properties | 2 +- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/build-windows.xml b/build-windows.xml index f048ee98b2..1341d80ff6 100644 --- a/build-windows.xml +++ b/build-windows.xml @@ -28,16 +28,7 @@ - - - - - - - - - - + @@ -83,6 +74,7 @@ + @@ -97,6 +89,7 @@ + @@ -129,7 +122,22 @@ replace="ProductVersion" Value="${app.version}" /> - + + + + + + + + + + + + + + + + diff --git a/nbproject/project.properties b/nbproject/project.properties index e671be54f8..d477d9c856 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -12,7 +12,7 @@ build.type=DEVELOPMENT update_versions=false #custom JVM options #Note: can be higher on 64 bit systems, should be in sync with build.xml -run.args.extra=-J-Xms24m -J-Xmx512m -J-XX:MaxPermSize=128M -J-Xverify:none +run.args.extra=-J-Xms24m -J-Xmx2048m -J-XX:MaxPermSize=128M -J-Xverify:none auxiliary.org-netbeans-modules-apisupport-installer.license-type=apache.v2 auxiliary.org-netbeans-modules-apisupport-installer.os-linux=false auxiliary.org-netbeans-modules-apisupport-installer.os-macosx=false From 5472a0924addc33d974f2170ccd67a425d37b305 Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Tue, 24 Sep 2013 10:47:22 -0400 Subject: [PATCH 15/17] Disabled ok button when there are no recent cases. --- .../org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java index 082d094948..1e9d01d4cd 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java @@ -62,6 +62,8 @@ class OpenRecentCasePanel extends javax.swing.JPanel { // If there are any images, let's select the first one if (imagesTable.getRowCount() > 0) { imagesTable.setRowSelectionInterval(0, 0); + } else { + openButton.setEnabled(false); } } From eab134636622d3883b580e9dd19e9ad06c23bd20 Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Tue, 24 Sep 2013 10:51:43 -0400 Subject: [PATCH 16/17] Disable ok button when there are no recent cases. --- .../org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java index 1e9d01d4cd..e7d5fc2b11 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java @@ -62,6 +62,7 @@ class OpenRecentCasePanel extends javax.swing.JPanel { // If there are any images, let's select the first one if (imagesTable.getRowCount() > 0) { imagesTable.setRowSelectionInterval(0, 0); + openButton.setEnabled(true); } else { openButton.setEnabled(false); } From 088e1ed90bb1b7367492d64c796335c4d1406533 Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Tue, 24 Sep 2013 10:55:49 -0400 Subject: [PATCH 17/17] Updated installer script to update max heap size for 64 bit, fixed installation path for 64 bit. --- build-windows.xml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/build-windows.xml b/build-windows.xml index 1341d80ff6..cb9f2faec8 100644 --- a/build-windows.xml +++ b/build-windows.xml @@ -27,8 +27,6 @@ - - @@ -75,6 +73,9 @@ + + + @@ -91,6 +92,9 @@ + + + @@ -125,15 +129,15 @@ - - + + - + @@ -155,7 +159,6 @@ -