Merge remote-tracking branch 'upstream/master' into e01_st_verification

This commit is contained in:
jmillman 2013-09-23 12:27:35 -04:00
commit 858d006b2b
6 changed files with 33 additions and 32 deletions

View File

@ -101,7 +101,7 @@ class AddImageWizardAddingProgressPanel implements WizardDescriptor.FinishablePa
*/
void setStateStarted() {
component.getProgressBar().setIndeterminate(true);
component.setProgressBarTextAndColor("*This process take some time for large data sources.", 0, Color.black);
component.setProgressBarTextAndColor("*This process may take some time for large data sources.", 0, Color.black);
}
/**

View File

@ -18,7 +18,6 @@ import org.openide.nodes.Node;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
import org.openide.util.NbPreferences;
import org.openide.windows.TopComponent;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContent;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer;
import org.sleuthkit.autopsy.coreutils.Logger;
@ -31,11 +30,11 @@ import org.sleuthkit.datamodel.TskCoreException;
public class DataContentPanel extends javax.swing.JPanel implements DataContent, ChangeListener {
private static Logger logger = Logger.getLogger(DataContentPanel.class.getName());
private final List<UpdateWrapper> viewers = new ArrayList<UpdateWrapper>();;
private final List<UpdateWrapper> viewers = new ArrayList<>();;
private Node currentNode;
private final boolean isMain;
private boolean listeningToTabbedPane = false;
/**
* Creates new DataContentPanel panel
* The main data content panel can only be created by the data content top component,
@ -69,8 +68,6 @@ public class DataContentPanel extends javax.swing.JPanel implements DataContent,
for (int tab = 0; tab < numTabs; ++tab) {
jTabbedPane1.setEnabledAt(tab, false);
}
jTabbedPane1.addChangeListener(this);
}
@ -135,7 +132,7 @@ public class DataContentPanel extends javax.swing.JPanel implements DataContent,
try {
path = content.getUniquePath();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() for " + content);
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() for {0}", content);
}
setName(path);
} else {
@ -158,7 +155,13 @@ public class DataContentPanel extends javax.swing.JPanel implements DataContent,
* @param selectedNode the selected content Node
*/
public void setupTabs(Node selectedNode) {
// Deferring becoming a listener to the tabbed pane until this point
// eliminates handling a superfluous stateChanged event during construction.
if (listeningToTabbedPane == false) {
jTabbedPane1.addChangeListener(this);
listeningToTabbedPane = true;
}
// get the preference for the preferred viewer
Preferences pref = NbPreferences.forModule(GeneralPanel.class);
boolean keepCurrentViewer = pref.getBoolean("keepPreferredViewer", false);

View File

@ -61,6 +61,7 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
private String title;
private static final Logger logger = Logger.getLogger(DataResultPanel.class.getName() );
private boolean listeningToTabbedPane = false;
/**
* Creates new DataResultPanel
@ -75,8 +76,6 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
setName(title);
this.title = "";
this.dataResultTabbedPanel.addChangeListener(this);
}
/**
@ -341,6 +340,13 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
@Override
public void setNode(Node selectedNode) {
// Deferring becoming a listener to the tabbed pane until this point
// eliminates handling a superfluous stateChanged event during construction.
if (listeningToTabbedPane == false) {
dataResultTabbedPanel.addChangeListener(this);
listeningToTabbedPane = true;
}
this.rootNode = selectedNode;
if (selectedNode != null) {
int childrenCount = selectedNode.getChildren().getNodesCount(true);

View File

@ -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);
}
}
}

View File

@ -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();

View File

@ -47,7 +47,7 @@ public class ExtractedContentChildren extends ChildFactory<BlackboardArtifact.AR
// these are shown in other parts of the UI tree
doNotShow = new ArrayList();
//doNotShow.add(BlackboardArtifact.ARTIFACT_TYPE.TSK_GEN_INFO);
doNotShow.add(BlackboardArtifact.ARTIFACT_TYPE.TSK_GEN_INFO);
doNotShow.add(BlackboardArtifact.ARTIFACT_TYPE.TSK_EMAIL_MSG);
doNotShow.add(BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT);
doNotShow.add(BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT);