Merge remote-tracking branch 'upstream/TL-list-view' into 788-lazy-context-menus

This commit is contained in:
jmillman 2016-05-26 14:21:09 -04:00
commit 0301793d31
7 changed files with 1061 additions and 264 deletions

View File

@ -22,6 +22,7 @@ import java.awt.Dimension;
import java.awt.Toolkit;
import java.io.File;
import java.io.IOException;
import java.nio.file.Paths;
import java.util.logging.Level;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
@ -31,6 +32,7 @@ import org.apache.commons.io.FilenameUtils;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb;
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb.KnownFilesType;
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDbManagerException;
@ -249,9 +251,16 @@ final class HashDbImportDatabaseDialog extends javax.swing.JDialog {
}// </editor-fold>//GEN-END:initComponents
private void openButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openButtonActionPerformed
String lastBaseDirectory = Paths.get(PlatformUtil.getUserConfigDirectory(), "HashDatabases").toString();
if (ModuleSettings.settingExists(ModuleSettings.MAIN_SETTINGS, LAST_FILE_PATH_KEY)) {
fileChooser.setCurrentDirectory(new File(ModuleSettings.getConfigSetting(ModuleSettings.MAIN_SETTINGS, LAST_FILE_PATH_KEY)));
lastBaseDirectory = ModuleSettings.getConfigSetting(ModuleSettings.MAIN_SETTINGS, LAST_FILE_PATH_KEY);
}
File hashDbFolder = new File(lastBaseDirectory);
// create the folder if it doesn't exist
if (!hashDbFolder.exists()) {
hashDbFolder.mkdir();
}
fileChooser.setCurrentDirectory(hashDbFolder);
if (fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
File databaseFile = fileChooser.getSelectedFile();
try {

View File

@ -225,7 +225,8 @@ ReportHTML.writeSum.noCaseNum=<i>No case number</i>
ReportBodyFile.generateReport.srcModuleName.text=TSK Body File
ReportExcel.endReport.srcModuleName.text=Excel Report
ReportHTML.writeIndex.srcModuleName.text=HTML Report
ReportKML.genReport.srcModuleName.text=KML Report
ReportKML.genReport.srcModuleName.text=Geospatial Data
ReportKML.genReport.reportName=KML Report
ReportGenerator.artTableColHdr.extension.text=Extension
ReportGenerator.artTableColHdr.mimeType.text=MIME Type
ReportGenerator.artTableColHdr.processorArchitecture.text=Processor Architecture

View File

@ -188,7 +188,7 @@ ReportExcel.endReport.srcModuleName.text=Excel\u30ec\u30dd\u30fc\u30c8
ReportGenerator.artTableColHdr.extension.text=\u62e1\u5f35\u5b50
ReportGenerator.artTableColHdr.mimeType.text=MIME\u30bf\u30a4\u30d7
ReportHTML.writeIndex.srcModuleName.text=HTML\u30ec\u30dd\u30fc\u30c8
ReportKML.genReport.srcModuleName.text=KML\u30ec\u30dd\u30fc\u30c8
ReportKML.genReport.reportName=KML\u30ec\u30dd\u30fc\u30c8
ReportGenerator.artTableColHdr.associatedArtifact=\u95a2\u4fc2\u3059\u308b\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8
ReportGenerator.artTableColHdr.count=\u30ab\u30a6\u30f3\u30c8
ReportGenerator.artTableColHdr.devMake=\u6a5f\u5668\u578b\u540d

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,299 @@
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2">
<Document>
<StyleMap id="yellowFeature">
<Pair>
<key>normal</key>
<styleUrl>#n_YellowPushpin</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#h_YellowPushpin</styleUrl>
</Pair>
</StyleMap>
<Style id="n_YellowPushpin">
<IconStyle>
<scale>1.0</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels" />
</IconStyle>
<LabelStyle>
<scale>0</scale>
</LabelStyle>
<LineStyle>
<color>FF00FFFF</color>
<width>5.0</width>
</LineStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
<Style id="h_YellowPushpin">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels" />
</IconStyle>
<LabelStyle>
<scale>1</scale>
</LabelStyle>
<LineStyle>
<color>FF00FFFF</color>
<width>10.0</width>
</LineStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
<StyleMap id="blueFeature">
<Pair>
<key>normal</key>
<styleUrl>#n_bluePushpin</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#h_bluePushpin</styleUrl>
</Pair>
</StyleMap>
<Style id="n_bluePushpin">
<IconStyle>
<scale>1.0</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/blue-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels" />
</IconStyle>
<LabelStyle>
<scale>0</scale>
</LabelStyle>
<LineStyle>
<color>FFE63900</color>
<width>5.0</width>
</LineStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
<Style id="h_bluePushpin">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/blue-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels" />
</IconStyle>
<LabelStyle>
<scale>1</scale>
</LabelStyle>
<LineStyle>
<color>FFE63900</color>
<width>10.0</width>
</LineStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
<StyleMap id="redFeature">
<Pair>
<key>normal</key>
<styleUrl>#n_redPushpin</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#h_redPushpin</styleUrl>
</Pair>
</StyleMap>
<Style id="n_redPushpin">
<IconStyle>
<scale>1.0</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/red-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels" />
</IconStyle>
<LabelStyle>
<scale>0</scale>
</LabelStyle>
<LineStyle>
<color>FF0000FF</color>
<width>5.0</width>
</LineStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
<Style id="h_redPushpin">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/red-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels" />
</IconStyle>
<LabelStyle>
<scale>1</scale>
</LabelStyle>
<LineStyle>
<color>FF0000FF</color>
<width>10.0</width>
</LineStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
<StyleMap id="greenFeature">
<Pair>
<key>normal</key>
<styleUrl>#n_greenPushpin</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#h_greenPushpin</styleUrl>
</Pair>
</StyleMap>
<Style id="n_greenPushpin">
<IconStyle>
<scale>1.0</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/grn-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels" />
</IconStyle>
<LabelStyle>
<scale>1</scale>
</LabelStyle>
<LineStyle>
<color>FF00CC00</color>
<width>5.0</width>
</LineStyle>
<BalloonStyle>
<text>
A route was planned between these two points. The green line connecting the points is not the actual route, but it indicates which Start and End points are associated with each other.
$[description]
</text>
</BalloonStyle>
</Style>
<Style id="h_greenPushpin">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/grn-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels" />
</IconStyle>
<LabelStyle>
<scale>1</scale>
</LabelStyle>
<LineStyle>
<color>FF00CC00</color>
<width>10.0</width>
</LineStyle>
<BalloonStyle>
<text>
A route was planned between these two points. The green line connecting the points is not the actual route, but it indicates which Start and End points are associated with each other.
$[description]
</text>
</BalloonStyle>
</Style>
<StyleMap id="purpleFeature">
<Pair>
<key>normal</key>
<styleUrl>#n_purplePushpin</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#h_purplePushpin</styleUrl>
</Pair>
</StyleMap>
<Style id="n_purplePushpin">
<IconStyle>
<scale>1.0</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/purple-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels" />
</IconStyle>
<LabelStyle>
<scale>1</scale>
</LabelStyle>
<LineStyle>
<color>FFCC0066</color>
<width>5.0</width>
</LineStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
<Style id="h_purplePushpin">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/purple-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels" />
</IconStyle>
<LabelStyle>
<scale>1</scale>
</LabelStyle>
<LineStyle>
<color>FFCC0066</color>
<width>10.0</width>
</LineStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
<StyleMap id="whiteFeature">
<Pair>
<key>normal</key>
<styleUrl>#n_whitePushpin</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#h_whitePushpin</styleUrl>
</Pair>
</StyleMap>
<Style id="n_whitePushpin">
<IconStyle>
<scale>1.0</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/wht-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels" />
</IconStyle>
<LabelStyle>
<scale>0</scale>
</LabelStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
<LineStyle>
<color>FFFFFFFF</color>
<width>5.0</width>
</LineStyle>
</Style>
<Style id="h_whitePushpin">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/wht-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels" />
</IconStyle>
<LabelStyle>
<scale>1</scale>
</LabelStyle>
<LineStyle>
<color>FFFFFFFF</color>
<width>10.0</width>
</LineStyle>
<BalloonStyle>
<text>$[description]</text>
</BalloonStyle>
</Style>
</Document>
</kml>

View File

@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011-2015 Basis Technology Corp.
* Copyright 2011-2016 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -45,6 +45,13 @@ import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.corecomponents.OptionsPanel;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.ingest.IngestManager;
import java.awt.Component;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import static javax.swing.SwingConstants.CENTER;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;
import org.openide.util.NbBundle.Messages;
/**
* GlobalEditListPanel widget to manage keywords in lists
@ -52,7 +59,8 @@ import org.sleuthkit.autopsy.ingest.IngestManager;
class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionListener, OptionsPanel {
private static final Logger logger = Logger.getLogger(GlobalEditListPanel.class.getName());
private KeywordTableModel tableModel;
private static final long serialVersionUID = 1L;
private final KeywordTableModel tableModel;
private KeywordList currentKeywordList;
private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
@ -85,7 +93,8 @@ class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionLis
column.setPreferredWidth(((int) (width * 0.90)));
} else {
column.setPreferredWidth(((int) (width * 0.10)));
//column.setCellRenderer(new CheckBoxRenderer());
column.setCellRenderer(new CheckBoxRenderer());
column.setHeaderRenderer(new HeaderRenderer(keywordTable));
}
}
keywordTable.setCellSelectionEnabled(false);
@ -686,4 +695,55 @@ class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionLis
resync();
}
}
/**
* A cell renderer for boolean cells that shows a center-aligned green check
* mark if true, nothing if false.
*/
private class CheckBoxRenderer extends DefaultTableCellRenderer {
private static final long serialVersionUID = 1L;
final ImageIcon theCheck = new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/checkmark.png")); // NON-NLS
CheckBoxRenderer() {
setHorizontalAlignment(CENTER);
}
@Override
@Messages("IsRegularExpression=Keyword is a regular expression")
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
if ((value instanceof Boolean)) {
if ((Boolean) value) {
setIcon(theCheck);
setToolTipText(Bundle.IsRegularExpression());
} else {
setIcon(null);
setToolTipText(null);
}
}
return this;
}
}
/**
* A cell renderer for header cells that center-aligns the header text.
*/
private static class HeaderRenderer implements TableCellRenderer {
private DefaultTableCellRenderer renderer;
public HeaderRenderer(JTable table) {
renderer = (DefaultTableCellRenderer) table.getTableHeader().getDefaultRenderer();
renderer.setHorizontalAlignment(JLabel.CENTER);
}
@Override
public Component getTableCellRendererComponent(
JTable table, Object value, boolean isSelected,
boolean hasFocus, int row, int col) {
return renderer.getTableCellRendererComponent(
table, value, isSelected, hasFocus, row, col);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B