mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 01:07:42 +00:00
Formatting clean up
This commit is contained in:
parent
85c2ccfd19
commit
c1ca1a0924
@ -1,3 +1,4 @@
|
|||||||
|
StringContentPanel_Loading_String=Loading text...
|
||||||
StringsTextViewer.goToPageTextField.msgDlg=Please enter a valid page number between 1 and {0}
|
StringsTextViewer.goToPageTextField.msgDlg=Please enter a valid page number between 1 and {0}
|
||||||
StringsTextViewer.goToPageTextField.err=Invalid page number
|
StringsTextViewer.goToPageTextField.err=Invalid page number
|
||||||
StringsTextViewer.setDataView.errorText=(offset {0}-{1} could not be read)
|
StringsTextViewer.setDataView.errorText=(offset {0}-{1} could not be read)
|
||||||
|
@ -31,6 +31,7 @@ import javax.swing.JMenuItem;
|
|||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import javax.swing.SwingWorker;
|
import javax.swing.SwingWorker;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.openide.util.NbBundle.Messages;
|
||||||
import org.sleuthkit.autopsy.coreutils.StringExtract;
|
import org.sleuthkit.autopsy.coreutils.StringExtract;
|
||||||
import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractResult;
|
import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractResult;
|
||||||
import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT;
|
import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT;
|
||||||
@ -365,6 +366,10 @@ public class StringsContentPanel extends javax.swing.JPanel {
|
|||||||
private javax.swing.JLabel totalPageLabel;
|
private javax.swing.JLabel totalPageLabel;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
||||||
|
@Messages({
|
||||||
|
"StringContentPanel_Loading_String=Loading text..."
|
||||||
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DataView (The tabbed panel)
|
* Sets the DataView (The tabbed panel)
|
||||||
*
|
*
|
||||||
@ -383,7 +388,7 @@ public class StringsContentPanel extends javax.swing.JPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
worker = new ContentWorker(dataSource, offset);
|
worker = new ContentWorker(dataSource, offset);
|
||||||
|
outputViewPane.setText(Bundle.StringContentPanel_Loading_String());
|
||||||
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||||
worker.execute();
|
worker.execute();
|
||||||
}
|
}
|
||||||
@ -399,7 +404,7 @@ public class StringsContentPanel extends javax.swing.JPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
worker = new StringContentWorker(dataSource);
|
worker = new StringContentWorker(dataSource);
|
||||||
|
outputViewPane.setText(Bundle.StringContentPanel_Loading_String());
|
||||||
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||||
worker.execute();
|
worker.execute();
|
||||||
}
|
}
|
||||||
@ -423,12 +428,20 @@ public class StringsContentPanel extends javax.swing.JPanel {
|
|||||||
languageLabel.setVisible(isVisible);
|
languageLabel.setVisible(isVisible);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Swingworker for getting the text from a content object.
|
/**
|
||||||
|
* Swingworker for getting the text from a content object.
|
||||||
|
*/
|
||||||
private final class ContentWorker extends SwingWorker<String, Void> {
|
private final class ContentWorker extends SwingWorker<String, Void> {
|
||||||
|
|
||||||
private final Content content;
|
private final Content content;
|
||||||
private final long offset;
|
private final long offset;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ContentWorker constructor
|
||||||
|
*
|
||||||
|
* @param content Content to get text from.
|
||||||
|
* @param offset The starting offset.
|
||||||
|
*/
|
||||||
ContentWorker(Content content, long offset) {
|
ContentWorker(Content content, long offset) {
|
||||||
this.content = content;
|
this.content = content;
|
||||||
this.offset = offset;
|
this.offset = offset;
|
||||||
@ -478,7 +491,6 @@ public class StringsContentPanel extends javax.swing.JPanel {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String text = get();
|
String text = get();
|
||||||
|
|
||||||
dataSource = content;
|
dataSource = content;
|
||||||
|
|
||||||
// disable or enable the next button
|
// disable or enable the next button
|
||||||
@ -517,6 +529,11 @@ public class StringsContentPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
private final StringContent content;
|
private final StringContent content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor to pulling the text out of a string content object.
|
||||||
|
*
|
||||||
|
* @param content
|
||||||
|
*/
|
||||||
StringContentWorker(StringContent content) {
|
StringContentWorker(StringContent content) {
|
||||||
this.content = content;
|
this.content = content;
|
||||||
}
|
}
|
||||||
@ -551,7 +568,5 @@ public class StringsContentPanel extends javax.swing.JPanel {
|
|||||||
logger.log(Level.SEVERE, String.format("Failed to get text from StringContent"), ex);
|
logger.log(Level.SEVERE, String.format("Failed to get text from StringContent"), ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user