mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-06 02:24:30 +00:00
Corecomponents - Added NON-NLS tag to hardcoded strings not needing National Language Support
This commit is contained in:
@@ -93,7 +93,7 @@ public class AboutWindowPanel extends JPanel implements HyperlinkListener {
|
||||
jScrollPane3.setBorder(null);
|
||||
|
||||
copyright.setBorder(null);
|
||||
copyright.setContentType("text/html"); // NOI18N
|
||||
copyright.setContentType("text/html"); // NOI18N NON-NLS
|
||||
copyright.setEditable(false);
|
||||
copyright.setText(org.openide.util.NbBundle.getBundle(AboutWindowPanel.class).getString("LBL_Copyright")); // NOI18N
|
||||
copyright.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
@@ -103,7 +103,7 @@ public class AboutWindowPanel extends JPanel implements HyperlinkListener {
|
||||
});
|
||||
jScrollPane3.setViewportView(copyright);
|
||||
|
||||
description.setContentType("text/html"); // NOI18N
|
||||
description.setContentType("text/html"); // NOI18N NON-NLS
|
||||
description.setEditable(false);
|
||||
jScrollPane2.setViewportView(description);
|
||||
|
||||
@@ -208,7 +208,7 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
|
||||
private void showUrl() {
|
||||
if (url != null) {
|
||||
org.openide.awt.StatusDisplayer.getDefault().setStatusText(
|
||||
NbBundle.getBundle(HTMLViewAction.class).getString("CTL_OpeningBrowser"));
|
||||
NbBundle.getBundle(HTMLViewAction.class).getString("CTL_OpeningBrowser")); //NON-NLS
|
||||
HtmlBrowser.URLDisplayer.getDefault().showURL(url);
|
||||
}
|
||||
}
|
||||
@@ -219,25 +219,25 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
|
||||
|
||||
private static String getProductVersionValue() {
|
||||
return MessageFormat.format(
|
||||
NbBundle.getBundle("org.netbeans.core.startup.Bundle").getString("currentVersion"),
|
||||
NbBundle.getBundle("org.netbeans.core.startup.Bundle").getString("currentVersion"), //NON-NLS
|
||||
new Object[]{System.getProperty("netbeans.buildnumber")});
|
||||
}
|
||||
|
||||
private static String getOperatingSystemValue() {
|
||||
return NbBundle.getMessage(AboutWindowPanel.class, "Format_OperatingSystem_Value",
|
||||
System.getProperty("os.name",
|
||||
System.getProperty("os.name", //NON-NLS
|
||||
NbBundle.getMessage(AboutWindowPanel.class,
|
||||
"ProductInformationPanel.propertyUnknown.text")),
|
||||
System.getProperty("os.version",
|
||||
System.getProperty("os.version", //NON-NLS
|
||||
NbBundle.getMessage(AboutWindowPanel.class,
|
||||
"ProductInformationPanel.propertyUnknown.text")),
|
||||
System.getProperty("os.arch",
|
||||
System.getProperty("os.arch", //NON-NLS
|
||||
NbBundle.getMessage(AboutWindowPanel.class,
|
||||
"ProductInformationPanel.propertyUnknown.text")));
|
||||
}
|
||||
|
||||
private static String getJavaValue() {
|
||||
return System.getProperty("java.version",
|
||||
return System.getProperty("java.version", //NON-NLS
|
||||
NbBundle.getMessage(AboutWindowPanel.class,
|
||||
"ProductInformationPanel.propertyUnknown.text"));
|
||||
}
|
||||
@@ -245,10 +245,10 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
|
||||
private static String getVMValue() {
|
||||
return NbBundle.getMessage(AboutWindowPanel.class,
|
||||
"ProductInformationPanel.getVMValue.text",
|
||||
System.getProperty("java.vm.name",
|
||||
System.getProperty("java.vm.name", //NON-NLS
|
||||
NbBundle.getMessage(AboutWindowPanel.class,
|
||||
"ProductInformationPanel.propertyUnknown.text")),
|
||||
System.getProperty("java.vm.version", ""));
|
||||
System.getProperty("java.vm.version", "")); //NON-NLS
|
||||
}
|
||||
|
||||
private static String getSystemLocaleValue() {
|
||||
@@ -261,7 +261,7 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
|
||||
}
|
||||
|
||||
private static String getEncodingValue() {
|
||||
return System.getProperty("file.encoding",
|
||||
return System.getProperty("file.encoding", //NON-NLS
|
||||
NbBundle.getMessage(AboutWindowPanel.class, "ProductInformationPanel.propertyUnknown.text"));
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
|
||||
*/
|
||||
public void startVerboseLogging() {
|
||||
verboseLogging = true;
|
||||
String logPath = PlatformUtil.getUserDirectory() + File.separator + "sleuthkit.txt";
|
||||
String logPath = PlatformUtil.getUserDirectory() + File.separator + "sleuthkit.txt"; //NON-NLS
|
||||
|
||||
SleuthkitJNI.startVerboseLogging(logPath);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
try {
|
||||
this.em.setSelectedNodes(selected);
|
||||
} catch (PropertyVetoException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't set selected nodes.", ex);
|
||||
logger.log(Level.WARNING, "Couldn't set selected nodes.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
try {
|
||||
path = content.getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() for {0}", content);
|
||||
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() for {0}", content); //NON-NLS
|
||||
}
|
||||
setName(path);
|
||||
} else {
|
||||
@@ -164,7 +164,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
// get the preference for the preferred viewer
|
||||
Preferences pref = NbPreferences.forModule(GeneralPanel.class);
|
||||
boolean keepCurrentViewer = pref.getBoolean("keepPreferredViewer", false);
|
||||
boolean keepCurrentViewer = pref.getBoolean("keepPreferredViewer", false); //NON-NLS
|
||||
|
||||
int currTabIndex = jTabbedPane1.getSelectedIndex();
|
||||
int totalTabs = jTabbedPane1.getTabCount();
|
||||
|
||||
@@ -52,7 +52,7 @@ public final class DataContentTopComponent extends TopComponent implements DataC
|
||||
|
||||
// contains a list of the undocked TCs
|
||||
private static ArrayList<DataContentTopComponent> newWindowList = new ArrayList<DataContentTopComponent>();
|
||||
private static final String PREFERRED_ID = "DataContentTopComponent";
|
||||
private static final String PREFERRED_ID = "DataContentTopComponent"; //NON-NLS
|
||||
private static final String DEFAULT_NAME = NbBundle.getMessage(DataContentTopComponent.class, "CTL_DataContentTopComponent");
|
||||
private static final String TOOLTIP_TEXT = NbBundle.getMessage(DataContentTopComponent.class, "HINT_DataContentTopComponent");
|
||||
|
||||
@@ -67,7 +67,7 @@ public final class DataContentTopComponent extends TopComponent implements DataC
|
||||
add(dataContentPanel);
|
||||
|
||||
putClientProperty(TopComponent.PROP_CLOSING_DISABLED, Boolean.valueOf(isDefault)); // prevent option to close compoment in GUI
|
||||
logger.log(Level.INFO, "Created DataContentTopComponent instance: " + this);
|
||||
logger.log(Level.INFO, "Created DataContentTopComponent instance: " + this); //NON-NLS
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,15 +119,15 @@ public final class DataContentTopComponent extends TopComponent implements DataC
|
||||
public static synchronized DataContentTopComponent findInstance() {
|
||||
TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID);
|
||||
if (win == null) {
|
||||
logger.warning("Cannot find " + PREFERRED_ID + " component. It will not be located properly in the window system.");
|
||||
logger.warning("Cannot find " + PREFERRED_ID + " component. It will not be located properly in the window system."); //NON-NLS
|
||||
return getDefault();
|
||||
}
|
||||
if (win instanceof DataContentTopComponent) {
|
||||
return (DataContentTopComponent) win;
|
||||
}
|
||||
logger.warning(
|
||||
"There seem to be multiple components with the '" + PREFERRED_ID
|
||||
+ "' ID. That is a potential source of errors and unexpected behavior.");
|
||||
"There seem to be multiple components with the '" + PREFERRED_ID //NON-NLS
|
||||
+ "' ID. That is a potential source of errors and unexpected behavior."); //NON-NLS
|
||||
return getDefault();
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
jPanel1.setPreferredSize(new java.awt.Dimension(622, 424));
|
||||
|
||||
outputViewPane.setEditable(false);
|
||||
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N
|
||||
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N NON-NLS
|
||||
outputViewPane.setPreferredSize(new java.awt.Dimension(700, 400));
|
||||
jScrollPane1.setViewportView(outputViewPane);
|
||||
|
||||
@@ -124,14 +124,14 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
pageLabel.setMinimumSize(new java.awt.Dimension(33, 14));
|
||||
pageLabel.setPreferredSize(new java.awt.Dimension(33, 14));
|
||||
|
||||
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
|
||||
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.nextPageButton.text")); // NOI18N
|
||||
nextPageButton.setBorderPainted(false);
|
||||
nextPageButton.setContentAreaFilled(false);
|
||||
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
|
||||
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
nextPageButton.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N
|
||||
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
nextPageButtonActionPerformed(evt);
|
||||
@@ -143,14 +143,14 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
pageLabel2.setMinimumSize(new java.awt.Dimension(29, 14));
|
||||
pageLabel2.setPreferredSize(new java.awt.Dimension(29, 14));
|
||||
|
||||
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
|
||||
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.prevPageButton.text")); // NOI18N
|
||||
prevPageButton.setBorderPainted(false);
|
||||
prevPageButton.setContentAreaFilled(false);
|
||||
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
|
||||
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
prevPageButton.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N
|
||||
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
prevPageButtonActionPerformed(evt);
|
||||
@@ -325,7 +325,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
return content.getAllArtifactsCount() > 0;
|
||||
}
|
||||
catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't get count of BlackboardArtifacts for content", ex);
|
||||
logger.log(Level.WARNING, "Couldn't get count of BlackboardArtifacts for content", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -450,7 +450,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
artifacts = content.getAllArtifacts();
|
||||
}
|
||||
catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't get artifacts", ex);
|
||||
logger.log(Level.WARNING, "Couldn't get artifacts", ex); //NON-NLS
|
||||
return new ViewUpdate(getArtifactContentStrings().size(), currentPage, ERROR_TEXT);
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
}
|
||||
}
|
||||
catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't get associated artifact to display in Content Viewer.", ex);
|
||||
logger.log(Level.WARNING, "Couldn't get associated artifact to display in Content Viewer.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
@@ -530,7 +530,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
}
|
||||
}
|
||||
catch (InterruptedException | ExecutionException ex) {
|
||||
logger.log(Level.WARNING, "Artifact display task unexpectedly interrupted or failed", ex);
|
||||
logger.log(Level.WARNING, "Artifact display task unexpectedly interrupted or failed", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -577,7 +577,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
|
||||
}
|
||||
}
|
||||
catch (InterruptedException | ExecutionException ex) {
|
||||
logger.log(Level.WARNING, "Artifact display task unexpectedly interrupted or failed", ex);
|
||||
logger.log(Level.WARNING, "Artifact display task unexpectedly interrupted or failed", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
this.resetComponent();
|
||||
logger.log(Level.INFO, "Created HexView instance: " + this);
|
||||
logger.log(Level.INFO, "Created HexView instance: " + this); //NON-NLS
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
@@ -114,7 +114,7 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
||||
jScrollPane1.setBackground(new java.awt.Color(255, 255, 255));
|
||||
|
||||
outputViewPane.setEditable(false);
|
||||
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N
|
||||
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N NON-NLS
|
||||
outputViewPane.setMinimumSize(new java.awt.Dimension(700, 20));
|
||||
outputViewPane.setPreferredSize(new java.awt.Dimension(700, 400));
|
||||
jScrollPane1.setViewportView(outputViewPane);
|
||||
@@ -133,28 +133,28 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
||||
pageLabel.setMinimumSize(new java.awt.Dimension(33, 14));
|
||||
pageLabel.setPreferredSize(new java.awt.Dimension(33, 14));
|
||||
|
||||
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
|
||||
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerHex.class, "DataContentViewerHex.prevPageButton.text")); // NOI18N
|
||||
prevPageButton.setBorderPainted(false);
|
||||
prevPageButton.setContentAreaFilled(false);
|
||||
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
|
||||
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
prevPageButton.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N
|
||||
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
prevPageButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
|
||||
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerHex.class, "DataContentViewerHex.nextPageButton.text")); // NOI18N
|
||||
nextPageButton.setBorderPainted(false);
|
||||
nextPageButton.setContentAreaFilled(false);
|
||||
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
|
||||
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
nextPageButton.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N
|
||||
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
nextPageButtonActionPerformed(evt);
|
||||
@@ -318,7 +318,7 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
||||
} catch (TskException ex) {
|
||||
errorText = NbBundle.getMessage(this.getClass(), "DataContentViewerHex.setDataView.errorText", offset,
|
||||
offset + pageLength);
|
||||
logger.log(Level.WARNING, "Error while trying to show the hex content.", ex);
|
||||
logger.log(Level.WARNING, "Error while trying to show the hex content.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM;
|
||||
})
|
||||
public class DataContentViewerMedia extends javax.swing.JPanel implements DataContentViewer {
|
||||
|
||||
private static final String[] AUDIO_EXTENSIONS = new String[]{".mp3", ".wav", ".wma"};
|
||||
private static final String[] AUDIO_EXTENSIONS = new String[]{".mp3", ".wav", ".wma"}; //NON-NLS
|
||||
private static final Logger logger = Logger.getLogger(DataContentViewerMedia.class.getName());
|
||||
private AbstractFile lastFile;
|
||||
//UI
|
||||
@@ -53,8 +53,8 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
private final MediaViewImagePanel imagePanel;
|
||||
private boolean videoPanelInited;
|
||||
private boolean imagePanelInited;
|
||||
private static final String IMAGE_VIEWER_LAYER = "IMAGE";
|
||||
private static final String VIDEO_VIEWER_LAYER = "VIDEO";
|
||||
private static final String IMAGE_VIEWER_LAYER = "IMAGE"; //NON-NLS
|
||||
private static final String VIDEO_VIEWER_LAYER = "VIDEO"; //NON-NLS
|
||||
|
||||
/**
|
||||
* Creates new form DataContentViewerVideo
|
||||
@@ -73,7 +73,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
videoExtensions = videoPanel.getExtensions();
|
||||
|
||||
customizeComponents();
|
||||
logger.log(Level.INFO, "Created MediaView instance: " + this);
|
||||
logger.log(Level.INFO, "Created MediaView instance: " + this); //NON-NLS
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
@@ -131,7 +131,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
lastFile = file;
|
||||
|
||||
final Dimension dims = DataContentViewerMedia.this.getSize();
|
||||
logger.info("setting node on media viewer");
|
||||
logger.info("setting node on media viewer"); //NON-NLS
|
||||
if (imagePanelInited && containsExt(file.getName(), imageExtensions)) {
|
||||
imagePanel.showImageFx(file, dims);
|
||||
this.switchPanels(false);
|
||||
@@ -146,7 +146,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
|
||||
switchPanels(true);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Exception while setting node", e);
|
||||
logger.log(Level.SEVERE, "Exception while setting node", e); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
this.resetComponent();
|
||||
logger.log(Level.INFO, "Created StringView instance: " + this);
|
||||
logger.log(Level.INFO, "Created StringView instance: " + this); //NON-NLS
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
@@ -130,7 +130,7 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
||||
jPanel1.setPreferredSize(new java.awt.Dimension(502, 424));
|
||||
|
||||
outputViewPane.setEditable(false);
|
||||
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N
|
||||
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N NON-NLS NON-NLS
|
||||
outputViewPane.setPreferredSize(new java.awt.Dimension(700, 400));
|
||||
jScrollPane1.setViewportView(outputViewPane);
|
||||
|
||||
@@ -148,14 +148,14 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
||||
pageLabel.setMinimumSize(new java.awt.Dimension(33, 14));
|
||||
pageLabel.setPreferredSize(new java.awt.Dimension(33, 14));
|
||||
|
||||
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
|
||||
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.nextPageButton.text")); // NOI18N
|
||||
nextPageButton.setBorderPainted(false);
|
||||
nextPageButton.setContentAreaFilled(false);
|
||||
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
|
||||
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
nextPageButton.setPreferredSize(new java.awt.Dimension(55, 23));
|
||||
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N
|
||||
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N NON-NLS
|
||||
nextPageButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
nextPageButtonActionPerformed(evt);
|
||||
@@ -167,14 +167,14 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
||||
pageLabel2.setMinimumSize(new java.awt.Dimension(29, 14));
|
||||
pageLabel2.setPreferredSize(new java.awt.Dimension(29, 14));
|
||||
|
||||
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
|
||||
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.prevPageButton.text")); // NOI18N
|
||||
prevPageButton.setBorderPainted(false);
|
||||
prevPageButton.setContentAreaFilled(false);
|
||||
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
|
||||
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
prevPageButton.setPreferredSize(new java.awt.Dimension(55, 23));
|
||||
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N
|
||||
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N NON-NLS
|
||||
prevPageButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
prevPageButtonActionPerformed(evt);
|
||||
@@ -356,7 +356,7 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
||||
text = NbBundle.getMessage(this.getClass(),
|
||||
"DataContentViewerString.setDataView.errorText", currentOffset,
|
||||
currentOffset + pageLength);
|
||||
logger.log(Level.WARNING, "Error while trying to show the String content.", ex);
|
||||
logger.log(Level.WARNING, "Error while trying to show the String content.", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -348,8 +348,8 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
|
||||
@Override
|
||||
public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
|
||||
if (pcs == null) {
|
||||
logger.log(Level.WARNING, "Could not add listener to DataResultPanel, "
|
||||
+ "listener support not fully initialized yet, listener: " + listener.toString() );
|
||||
logger.log(Level.WARNING, "Could not add listener to DataResultPanel, " //NON-NLS
|
||||
+ "listener support not fully initialized yet, listener: " + listener.toString() ); //NON-NLS
|
||||
}
|
||||
else {
|
||||
this.pcs.addPropertyChangeListener(listener);
|
||||
|
||||
@@ -239,15 +239,15 @@ public class DataResultTopComponent extends TopComponent implements DataResult,
|
||||
//putClientProperty("TopComponentAllowDockAnywhere", Boolean.TRUE);
|
||||
Mode mode = WindowManager.getDefault().findMode(customModeName);
|
||||
if (mode != null) {
|
||||
StringBuilder message = new StringBuilder("Found custom mode, setting: ");
|
||||
StringBuilder message = new StringBuilder("Found custom mode, setting: "); //NON-NLS
|
||||
message.append(customModeName);
|
||||
logger.log(Level.INFO, message.toString());
|
||||
mode.dockInto(this);
|
||||
|
||||
} else {
|
||||
StringBuilder message = new StringBuilder("Could not find mode: ");
|
||||
StringBuilder message = new StringBuilder("Could not find mode: "); //NON-NLS
|
||||
message.append(customModeName);
|
||||
message.append(", will dock into the default one");
|
||||
message.append(", will dock into the default one"); //NON-NLS
|
||||
logger.log(Level.WARNING, message.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,15 +320,15 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
//First property column is sortable, but also sorted initially, so
|
||||
//initially this one will have the arrow icon:
|
||||
if (props.size() > 0) {
|
||||
props.get(0).setValue("TreeColumnTTV", Boolean.TRUE); // Identifies special property representing first (tree) column.
|
||||
props.get(0).setValue("SortingColumnTTV", Boolean.TRUE); // TreeTableView should be initially sorted by this property column.
|
||||
props.get(0).setValue("TreeColumnTTV", Boolean.TRUE); // Identifies special property representing first (tree) column. NON-NLS
|
||||
props.get(0).setValue("SortingColumnTTV", Boolean.TRUE); // TreeTableView should be initially sorted by this property column. NON-NLS
|
||||
}
|
||||
|
||||
// The rest of the columns are sortable, but not initially sorted,
|
||||
// so initially will have no arrow icon:
|
||||
String[] propStrings = new String[props.size() * 2];
|
||||
for (int i = 0; i < props.size(); i++) {
|
||||
props.get(i).setValue("ComparableColumnTTV", Boolean.TRUE);
|
||||
props.get(i).setValue("ComparableColumnTTV", Boolean.TRUE); //NON-NLS
|
||||
propStrings[2 * i] = props.get(i).getName();
|
||||
propStrings[2 * i + 1] = props.get(i).getDisplayName();
|
||||
}
|
||||
@@ -414,7 +414,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
try {
|
||||
rowValues[rowCount][j] = properties[j].getValue();
|
||||
} catch (IllegalAccessException | InvocationTargetException ignore) {
|
||||
rowValues[rowCount][j] = "n/a";
|
||||
rowValues[rowCount][j] = "n/a"; //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,25 +129,25 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
pagesLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pagesLabel.text")); // NOI18N
|
||||
|
||||
pagePrevButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
|
||||
pagePrevButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N NON-NLS
|
||||
pagePrevButton.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pagePrevButton.text")); // NOI18N
|
||||
pagePrevButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
|
||||
pagePrevButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N NON-NLS
|
||||
pagePrevButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
pagePrevButton.setPreferredSize(new java.awt.Dimension(55, 23));
|
||||
pagePrevButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N
|
||||
pagePrevButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N NON-NLS
|
||||
pagePrevButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
pagePrevButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
|
||||
pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N NON-NLS
|
||||
pageNextButton.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pageNextButton.text")); // NOI18N
|
||||
pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
|
||||
pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
|
||||
pageNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
|
||||
pageNextButton.setMaximumSize(new java.awt.Dimension(27, 23));
|
||||
pageNextButton.setMinimumSize(new java.awt.Dimension(27, 23));
|
||||
pageNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N
|
||||
pageNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N NON-NLS
|
||||
pageNextButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
pageNextButtonActionPerformed(evt);
|
||||
@@ -446,7 +446,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
ex.getMessage()),
|
||||
NotifyDescriptor.ERROR_MESSAGE);
|
||||
DialogDisplayer.getDefault().notify(d);
|
||||
logger.log(Level.SEVERE, "Error making thumbnails: " + ex.getMessage());
|
||||
logger.log(Level.SEVERE, "Error making thumbnails: " + ex.getMessage()); //NON-NLS
|
||||
} // catch and ignore if we were cancelled
|
||||
catch (java.util.concurrent.CancellationException ex) {
|
||||
}
|
||||
@@ -581,7 +581,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
filePathLabel.setToolTipText(uPath);
|
||||
}
|
||||
catch (TskCoreException e){
|
||||
logger.log(Level.WARNING, "Could not get unique path for content: {0}", af.getName());
|
||||
logger.log(Level.WARNING, "Could not get unique path for content: {0}", af.getName()); //NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ import org.sleuthkit.autopsy.core.Installer;
|
||||
})
|
||||
public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
private static final String[] EXTENSIONS = new String[]{".mov", ".m4v", ".flv", ".mp4", ".mpg", ".mpeg"};
|
||||
private static final String[] EXTENSIONS = new String[]{".mov", ".m4v", ".flv", ".mp4", ".mpg", ".mpeg"}; //NON-NLS
|
||||
private static final Logger logger = Logger.getLogger(MediaViewVideoPanel.class.getName());
|
||||
private boolean fxInited = false;
|
||||
// FX Components
|
||||
@@ -149,7 +149,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
path = file.getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Cannot get unique path of video file");
|
||||
logger.log(Level.SEVERE, "Cannot get unique path of video file"); //NON-NLS
|
||||
}
|
||||
mediaPane.setInfoLabelText(path);
|
||||
mediaPane.setInfoLabelToolTipText(path);
|
||||
@@ -257,9 +257,9 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
extractedBytes = ContentUtils.writeToFile(sFile, jFile, progress, this, true);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "Error buffering file", ex);
|
||||
logger.log(Level.WARNING, "Error buffering file", ex); //NON-NLS
|
||||
}
|
||||
logger.log(Level.INFO, "Done buffering: " + jFile.getName());
|
||||
logger.log(Level.INFO, "Done buffering: " + jFile.getName()); //NON-NLS
|
||||
success = true;
|
||||
return null;
|
||||
}
|
||||
@@ -270,15 +270,15 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
super.get(); //block and get all exceptions thrown while doInBackground()
|
||||
} catch (CancellationException ex) {
|
||||
logger.log(Level.INFO, "Media buffering was canceled.");
|
||||
logger.log(Level.INFO, "Media buffering was canceled."); //NON-NLS
|
||||
} catch (InterruptedException ex) {
|
||||
logger.log(Level.INFO, "Media buffering was interrupted.");
|
||||
logger.log(Level.INFO, "Media buffering was interrupted."); //NON-NLS
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.SEVERE, "Fatal error during media buffering.", ex);
|
||||
logger.log(Level.SEVERE, "Fatal error during media buffering.", ex); //NON-NLS
|
||||
} finally {
|
||||
progress.finish();
|
||||
if (!this.isCancelled()) {
|
||||
logger.log(Level.INFO, "ExtractMedia in done: " + jFile.getName());
|
||||
logger.log(Level.INFO, "ExtractMedia in done: " + jFile.getName()); //NON-NLS
|
||||
try {
|
||||
Platform.runLater(new Runnable() {
|
||||
@Override
|
||||
@@ -287,7 +287,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
}
|
||||
});
|
||||
} catch(MediaException e) {
|
||||
logger.log(Level.WARNING, "something went wrong with javafx", e);
|
||||
logger.log(Level.WARNING, "something went wrong with javafx", e); //NON-NLS
|
||||
reset();
|
||||
mediaPane.setInfoLabelText(e.getMessage());
|
||||
return;
|
||||
@@ -323,7 +323,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
private int totalHours;
|
||||
private int totalMinutes;
|
||||
private int totalSeconds;
|
||||
private String durationFormat = "%02d:%02d:%02d/%02d:%02d:%02d ";
|
||||
private String durationFormat = "%02d:%02d:%02d/%02d:%02d:%02d "; //NON-NLS
|
||||
|
||||
/** The EventHandler for MediaPlayer.onReady(). **/
|
||||
private final ReadyListener READY_LISTENER = new ReadyListener();
|
||||
@@ -344,12 +344,12 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
private static final String PAUSE_TEXT = "||";
|
||||
|
||||
private static final String STOP_TEXT = "X";
|
||||
private static final String STOP_TEXT = "X"; //NON-NLS
|
||||
|
||||
public MediaPane() {
|
||||
// Video Display
|
||||
mediaViewPane = new HBox();
|
||||
mediaViewPane.setStyle("-fx-background-color: black");
|
||||
mediaViewPane.setStyle("-fx-background-color: black"); //NON-NLS
|
||||
mediaViewPane.setAlignment(Pos.CENTER);
|
||||
mediaView = new MediaView();
|
||||
mediaViewPane.getChildren().add(mediaView);
|
||||
@@ -378,7 +378,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
mediaTools.getChildren().add(progressLabel);
|
||||
|
||||
controlPanel.getChildren().add(mediaTools);
|
||||
controlPanel.setStyle("-fx-background-color: white");
|
||||
controlPanel.setStyle("-fx-background-color: white"); //NON-NLS
|
||||
infoLabel = new Label("");
|
||||
controlPanel.getChildren().add(infoLabel);
|
||||
setBottom(controlPanel);
|
||||
@@ -423,7 +423,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
* @param text
|
||||
*/
|
||||
public void setInfoLabelText(final String text) {
|
||||
logger.log(Level.INFO, "Setting Info Label Text: " + text);
|
||||
logger.log(Level.INFO, "Setting Info Label Text: " + text); //NON-NLS
|
||||
Platform.runLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -470,7 +470,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
|
||||
mediaPlayer.play();
|
||||
break;
|
||||
default:
|
||||
logger.log(Level.INFO, "MediaPlayer in unexpected state: " + status.toString());
|
||||
logger.log(Level.INFO, "MediaPlayer in unexpected state: " + status.toString()); //NON-NLS
|
||||
// If the MediaPlayer is in an unexpected state, stop playback.
|
||||
mediaPlayer.stop();
|
||||
setInfoLabelText(NbBundle.getMessage(this.getClass(),
|
||||
|
||||
@@ -101,7 +101,7 @@ public final class GeneralOptionsPanelController extends OptionsPanelController
|
||||
try {
|
||||
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "GeneralOptionsPanelController listener threw exception", e);
|
||||
logger.log(Level.SEVERE, "GeneralOptionsPanelController listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(
|
||||
NbBundle.getMessage(this.getClass(), "GeneralOptionsPanelController.moduleErr"),
|
||||
NbBundle.getMessage(this.getClass(), "GeneralOptionsPanelController.moduleErr.msg"),
|
||||
@@ -112,7 +112,7 @@ public final class GeneralOptionsPanelController extends OptionsPanelController
|
||||
try {
|
||||
pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "GeneralOptionsPanelController listener threw exception", e);
|
||||
logger.log(Level.SEVERE, "GeneralOptionsPanelController listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(
|
||||
NbBundle.getMessage(this.getClass(), "GeneralOptionsPanelController.moduleErr"),
|
||||
NbBundle.getMessage(this.getClass(), "GeneralOptionsPanelController.moduleErr.msg"),
|
||||
|
||||
@@ -25,10 +25,10 @@ import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
|
||||
final class GeneralPanel extends javax.swing.JPanel {
|
||||
|
||||
private static final String KEEP_PREFERRED_VIEWER = "keepPreferredViewer";
|
||||
private static final String USE_LOCAL_TIME = "useLocalTime";
|
||||
private static final String DS_HIDE_KNOWN = "dataSourcesHideKnown"; // Default false
|
||||
private static final String VIEWS_HIDE_KNOWN = "viewsHideKnown"; // Default true
|
||||
private static final String KEEP_PREFERRED_VIEWER = "keepPreferredViewer"; //NON-NLS
|
||||
private static final String USE_LOCAL_TIME = "useLocalTime"; //NON-NLS
|
||||
private static final String DS_HIDE_KNOWN = "dataSourcesHideKnown"; // Default false NON-NLS
|
||||
private static final String VIEWS_HIDE_KNOWN = "viewsHideKnown"; // Default true NON-NLS
|
||||
private final Preferences prefs = NbPreferences.forModule(this.getClass());
|
||||
|
||||
GeneralPanel(GeneralOptionsPanelController controller) {
|
||||
|
||||
@@ -71,7 +71,7 @@ import org.sleuthkit.datamodel.TskData;
|
||||
})
|
||||
public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
private static final String[] EXTENSIONS = new String[]{".mov", ".m4v", ".flv", ".mp4", ".3gp", ".avi", ".mpg", ".mpeg", ".wmv"};
|
||||
private static final String[] EXTENSIONS = new String[]{".mov", ".m4v", ".flv", ".mp4", ".3gp", ".avi", ".mpg", ".mpeg", ".wmv"}; //NON-NLS
|
||||
|
||||
private static final Logger logger = Logger.getLogger(GstVideoPanel.class.getName());
|
||||
private boolean gstInited;
|
||||
@@ -143,12 +143,12 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
if (gstPlaybin2 != null && !autoTracking) {
|
||||
State orig = gstPlaybin2.getState();
|
||||
if (gstPlaybin2.pause() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
if (gstPlaybin2.seek(ClockTime.fromMillis(time)) == false) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.seek() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.seek() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
@@ -161,19 +161,19 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
private boolean initGst() {
|
||||
try {
|
||||
logger.log(Level.INFO, "Initializing gstreamer for video/audio viewing");
|
||||
logger.log(Level.INFO, "Initializing gstreamer for video/audio viewing"); //NON-NLS
|
||||
Gst.init();
|
||||
gstInited = true;
|
||||
} catch (GstException e) {
|
||||
gstInited = false;
|
||||
logger.log(Level.SEVERE, "Error initializing gstreamer for audio/video viewing and frame extraction capabilities", e);
|
||||
logger.log(Level.SEVERE, "Error initializing gstreamer for audio/video viewing and frame extraction capabilities", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.error(
|
||||
NbBundle.getMessage(this.getClass(), "GstVideoPanel.initGst.gstException.msg"),
|
||||
e.getMessage());
|
||||
return false;
|
||||
} catch (UnsatisfiedLinkError | NoClassDefFoundError | Exception e) {
|
||||
gstInited = false;
|
||||
logger.log(Level.SEVERE, "Error initializing gstreamer for audio/video viewing and extraction capabilities", e);
|
||||
logger.log(Level.SEVERE, "Error initializing gstreamer for audio/video viewing and extraction capabilities", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.error(
|
||||
NbBundle.getMessage(this.getClass(), "GstVideoPanel.initGst.otherException.msg"),
|
||||
e.getMessage());
|
||||
@@ -201,7 +201,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
path = file.getUniquePath();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Cannot get unique path of video file");
|
||||
logger.log(Level.SEVERE, "Cannot get unique path of video file"); //NON-NLS
|
||||
}
|
||||
infoLabel.setText(path);
|
||||
infoLabel.setToolTipText(path);
|
||||
@@ -215,7 +215,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
if (gstPlaybin2 != null) {
|
||||
gstPlaybin2.dispose();
|
||||
}
|
||||
gstPlaybin2 = new PlayBin2("VideoPlayer");
|
||||
gstPlaybin2 = new PlayBin2("VideoPlayer"); //NON-NLS
|
||||
gstPlaybin2.setVideoSink(gstVideoComponent.getElement());
|
||||
|
||||
videoPanel.removeAll();
|
||||
@@ -229,7 +229,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
gstPlaybin2.setInputFile(ioFile);
|
||||
|
||||
if (gstPlaybin2.setState(State.READY) == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.READY) failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.READY) failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
}
|
||||
}
|
||||
@@ -255,13 +255,13 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
if (gstPlaybin2 != null) {
|
||||
if (gstPlaybin2.isPlaying()) {
|
||||
if (gstPlaybin2.stop() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.stop() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.stop() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (gstPlaybin2.setState(State.NULL) == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.NULL) failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.NULL) failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
@@ -324,8 +324,8 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
}
|
||||
|
||||
// set up a PlayBin2 object
|
||||
RGBDataSink videoSink = new RGBDataSink("rgb", rgbListener);
|
||||
PlayBin2 playbin = new PlayBin2("VideoFrameCapture");
|
||||
RGBDataSink videoSink = new RGBDataSink("rgb", rgbListener); //NON-NLS
|
||||
PlayBin2 playbin = new PlayBin2("VideoFrameCapture"); //NON-NLS
|
||||
playbin.setInputFile(file);
|
||||
playbin.setVideoSink(videoSink);
|
||||
|
||||
@@ -373,7 +373,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
//System.out.println("Seeking to " + timeStamp + "milliseconds.");
|
||||
if (!playbin.seek(timeStamp, unit)) {
|
||||
logger.log(Level.INFO, "There was a problem seeking to " + timeStamp + " " + unit.name().toLowerCase());
|
||||
logger.log(Level.INFO, "There was a problem seeking to " + timeStamp + " " + unit.name().toLowerCase()); //NON-NLS
|
||||
}
|
||||
|
||||
ret = playbin.play();
|
||||
@@ -389,7 +389,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
lock.wait(FRAME_CAPTURE_TIMEOUT_MILLIS);
|
||||
} catch (InterruptedException e) {
|
||||
logger.log(Level.INFO, "InterruptedException occurred while waiting for frame capture.", e);
|
||||
logger.log(Level.INFO, "InterruptedException occurred while waiting for frame capture.", e); //NON-NLS
|
||||
}
|
||||
}
|
||||
Image image = rgbListener.getImage();
|
||||
@@ -403,7 +403,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
}
|
||||
|
||||
if (image == null) {
|
||||
logger.log(Level.WARNING, "There was a problem while trying to capture a frame from file " + file.getName());
|
||||
logger.log(Level.WARNING, "There was a problem while trying to capture a frame from file " + file.getName()); //NON-NLS
|
||||
badVideoFiles.add(file.getName());
|
||||
break;
|
||||
}
|
||||
@@ -533,27 +533,27 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
State state = gstPlaybin2.getState();
|
||||
if (state.equals(State.PLAYING)) {
|
||||
if (gstPlaybin2.pause() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
pauseButton.setText("►");
|
||||
// Is this call necessary considering we just called gstPlaybin2.pause()?
|
||||
if (gstPlaybin2.setState(State.PAUSED) == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.PAUSED) failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.PAUSED) failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
} else if (state.equals(State.PAUSED)) {
|
||||
if (gstPlaybin2.play() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
pauseButton.setText("||");
|
||||
// Is this call necessary considering we just called gstPlaybin2.play()?
|
||||
if (gstPlaybin2.setState(State.PLAYING) == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.PLAYING) failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.PLAYING) failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
@@ -576,7 +576,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
private class VideoProgressWorker extends SwingWorker<Object, Object> {
|
||||
|
||||
private String durationFormat = "%02d:%02d:%02d/%02d:%02d:%02d ";
|
||||
private String durationFormat = "%02d:%02d:%02d/%02d:%02d:%02d "; //NON-NLS
|
||||
private long millisElapsed = 0;
|
||||
private final long INTER_FRAME_PERIOD_MS = 20;
|
||||
private final long END_TIME_MARGIN_MS = 50;
|
||||
@@ -592,12 +592,12 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
synchronized (playbinLock) {
|
||||
if (gstPlaybin2 != null) {
|
||||
if (gstPlaybin2.stop() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.stop() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.stop() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
}
|
||||
// ready to be played again
|
||||
if (gstPlaybin2.setState(State.READY) == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.READY) failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.READY) failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
}
|
||||
gstPlaybin2.getState(); //NEW
|
||||
@@ -675,7 +675,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
get();
|
||||
} catch (InterruptedException | ExecutionException ex) {
|
||||
logger.log(Level.WARNING, "Error updating video progress: " + ex.getMessage());
|
||||
logger.log(Level.WARNING, "Error updating video progress: " + ex.getMessage()); //NON-NLS
|
||||
infoLabel.setText(NbBundle.getMessage(this.getClass(), "GstVideoPanel.progress.infoLabel.updateErr",
|
||||
ex.getMessage()));
|
||||
}
|
||||
@@ -721,7 +721,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
extractedBytes = ContentUtils.writeToFile(sFile, jFile, progress, this, true);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "Error buffering file", ex);
|
||||
logger.log(Level.WARNING, "Error buffering file", ex); //NON-NLS
|
||||
}
|
||||
success = true;
|
||||
return null;
|
||||
@@ -733,11 +733,11 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
try {
|
||||
super.get(); //block and get all exceptions thrown while doInBackground()
|
||||
} catch (CancellationException ex) {
|
||||
logger.log(Level.INFO, "Media buffering was canceled.");
|
||||
logger.log(Level.INFO, "Media buffering was canceled."); //NON-NLS
|
||||
} catch (InterruptedException ex) {
|
||||
logger.log(Level.INFO, "Media buffering was interrupted.");
|
||||
logger.log(Level.INFO, "Media buffering was interrupted."); //NON-NLS
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.SEVERE, "Fatal error during media buffering.", ex);
|
||||
logger.log(Level.SEVERE, "Fatal error during media buffering.", ex); //NON-NLS
|
||||
} finally {
|
||||
progress.finish();
|
||||
if (!this.isCancelled()) {
|
||||
@@ -755,12 +755,12 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
synchronized (playbinLock) {
|
||||
// must play, then pause and get state to get duration.
|
||||
if (gstPlaybin2.play() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
if (gstPlaybin2.pause() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
return;
|
||||
}
|
||||
@@ -786,7 +786,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
|
||||
|
||||
synchronized (playbinLock) {
|
||||
if (gstPlaybin2.play() == StateChangeReturn.FAILURE) {
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed.");
|
||||
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed."); //NON-NLS
|
||||
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public class Installer extends ModuleInstall {
|
||||
//UIManager.put("nimbusBlueGrey", new Color());
|
||||
//UIManager.put("control", new Color());
|
||||
|
||||
if (System.getProperty("os.name").toLowerCase().contains("mac")) {
|
||||
if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS
|
||||
setupMacOsXLAF();
|
||||
}
|
||||
|
||||
@@ -101,10 +101,10 @@ public class Installer extends ModuleInstall {
|
||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||
} catch (ClassNotFoundException | InstantiationException
|
||||
| IllegalAccessException | UnsupportedLookAndFeelException ex) {
|
||||
logger.log(Level.WARNING, "Unable to set theme. ", ex);
|
||||
logger.log(Level.WARNING, "Unable to set theme. ", ex); //NON-NLS
|
||||
}
|
||||
|
||||
final String[] UI_MENU_ITEM_KEYS = new String[]{"MenuBarUI",
|
||||
final String[] UI_MENU_ITEM_KEYS = new String[]{"MenuBarUI", //NON-NLS
|
||||
};
|
||||
|
||||
Map<Object, Object> uiEntries = new TreeMap<>();
|
||||
@@ -117,12 +117,12 @@ public class Installer extends ModuleInstall {
|
||||
|
||||
//use Metal if available
|
||||
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
|
||||
if ("Nimbus".equals(info.getName())) {
|
||||
if ("Nimbus".equals(info.getName())) { //NON-NLS
|
||||
try {
|
||||
UIManager.setLookAndFeel(info.getClassName());
|
||||
} catch (ClassNotFoundException | InstantiationException |
|
||||
IllegalAccessException | UnsupportedLookAndFeelException ex) {
|
||||
logger.log(Level.WARNING, "Unable to set theme. ", ex);
|
||||
logger.log(Level.WARNING, "Unable to set theme. ", ex); //NON-NLS
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
|
||||
//original input stream
|
||||
BufferedImage bi = ImageIO.read(inputStream);
|
||||
if (bi == null) {
|
||||
logger.log(Level.WARNING, "Could image reader not found for file: " + fileName);
|
||||
logger.log(Level.WARNING, "Could image reader not found for file: " + fileName); //NON-NLS
|
||||
return;
|
||||
}
|
||||
//scale image using Scalr
|
||||
@@ -158,10 +158,10 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
|
||||
//convert from awt imageto fx image
|
||||
fxImage = SwingFXUtils.toFXImage(biScaled, null);
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "Could not load image file into media view: " + fileName, ex);
|
||||
logger.log(Level.WARNING, "Could not load image file into media view: " + fileName, ex); //NON-NLS
|
||||
return;
|
||||
} catch (OutOfMemoryError ex) {
|
||||
logger.log(Level.WARNING, "Could not load image file into media view (too large): " + fileName, ex);
|
||||
logger.log(Level.WARNING, "Could not load image file into media view (too large): " + fileName, ex); //NON-NLS
|
||||
MessageNotifyUtil.Notify.warn(
|
||||
NbBundle.getMessage(this.getClass(), "MediaViewImagePanel.imgFileTooLarge.msg", file.getName()),
|
||||
ex.getMessage());
|
||||
@@ -170,12 +170,12 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.WARNING, "Could not close input stream after loading image in media view: " + fileName, ex);
|
||||
logger.log(Level.WARNING, "Could not close input stream after loading image in media view: " + fileName, ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
if (fxImage == null || fxImage.isError()) {
|
||||
logger.log(Level.WARNING, "Could not load image file into media view: " + fileName);
|
||||
logger.log(Level.WARNING, "Could not load image file into media view: " + fileName); //NON-NLS
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@ public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture
|
||||
private static final Logger logger = Logger.getLogger(MediaViewVideoPanel.class.getName());
|
||||
|
||||
// 64 bit architectures
|
||||
private static final String[] ARCH64 = new String[]{"amd64", "x86_64"};
|
||||
private static final String[] ARCH64 = new String[]{"amd64", "x86_64"}; //NON-NLS NON-NLS
|
||||
|
||||
// 32 bit architectures
|
||||
private static final String[] ARCH32 = new String[]{"x86"};
|
||||
private static final String[] ARCH32 = new String[]{"x86"}; //NON-NLS
|
||||
|
||||
/**
|
||||
* Factory Method to create a MediaViewVideoPanel.
|
||||
@@ -48,10 +48,10 @@ public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture
|
||||
*/
|
||||
public static MediaViewVideoPanel createVideoPanel() {
|
||||
if (is64BitJVM()) {
|
||||
logger.log(Level.INFO, "64 bit JVM detected. Creating JavaFX Video Player.");
|
||||
logger.log(Level.INFO, "64 bit JVM detected. Creating JavaFX Video Player."); //NON-NLS
|
||||
return getFXImpl();
|
||||
} else {
|
||||
logger.log(Level.INFO, "32 bit JVM detected. Creating GStreamer Video Player.");
|
||||
logger.log(Level.INFO, "32 bit JVM detected. Creating GStreamer Video Player."); //NON-NLS
|
||||
return getGstImpl();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ class ThumbnailViewChildren extends Children.Keys<Integer> {
|
||||
int to = from + showImages - 1;
|
||||
setDisplayName(from + "-" + to);
|
||||
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); //NON-NLS
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user