mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 09:17:42 +00:00
Sundry cleanup.
This commit is contained in:
parent
09fb5edba5
commit
26fcd4b49e
@ -53,20 +53,7 @@ final class AddImageWizardChooseDataSourceVisual extends JPanel {
|
||||
|
||||
UPDATE_UI, FOCUS_NEXT
|
||||
};
|
||||
static final List<String> rawExt = Arrays.asList(new String[]{".img", ".dd", ".001", ".aa", ".raw"});
|
||||
static final String rawDesc = "Raw Images (*.img, *.dd, *.001, *.aa, *.raw)";
|
||||
static GeneralFilter rawFilter = new GeneralFilter(rawExt, rawDesc);
|
||||
static final List<String> encaseExt = Arrays.asList(new String[]{".e01"});
|
||||
static final String encaseDesc = "Encase Images (*.e01)";
|
||||
static GeneralFilter encaseFilter = new GeneralFilter(encaseExt, encaseDesc);
|
||||
static final List<String> allExt = new ArrayList<String>();
|
||||
|
||||
static {
|
||||
allExt.addAll(rawExt);
|
||||
allExt.addAll(encaseExt);
|
||||
}
|
||||
static final String allDesc = "All Supported Types";
|
||||
static GeneralFilter allFilter = new GeneralFilter(allExt, allDesc);
|
||||
|
||||
private AddImageWizardChooseDataSourcePanel wizPanel;
|
||||
private JPanel currentPanel;
|
||||
|
||||
@ -123,6 +110,8 @@ final class AddImageWizardChooseDataSourceVisual extends JPanel {
|
||||
|
||||
if (!datasourceProcessorsMap.containsKey(dsProcessor.getType()) ) {
|
||||
if (!datasourceProcessorsMap.containsKey(dsProcessor.getType()) ) {
|
||||
|
||||
dsProcessor.reset();
|
||||
datasourceProcessorsMap.put(dsProcessor.getType(), dsProcessor);
|
||||
}
|
||||
else {
|
||||
|
@ -273,6 +273,17 @@ class AddImageWizardIngestConfigPanel implements WizardDescriptor.Panel<WizardDe
|
||||
// disable the cleanup task
|
||||
cleanupTask.disable();
|
||||
|
||||
|
||||
// Get attention for the process finish
|
||||
java.awt.Toolkit.getDefaultToolkit().beep(); //BEEP!
|
||||
AddImageWizardAddingProgressVisual panel = progressPanel.getComponent();
|
||||
if (panel != null) {
|
||||
Window w = SwingUtilities.getWindowAncestor(panel);
|
||||
if (w != null) {
|
||||
w.toFront();
|
||||
}
|
||||
}
|
||||
|
||||
//check the result and display to user
|
||||
if (result == DSPCallback.DSP_Result.NO_ERRORS)
|
||||
progressPanel.getComponent().setProgressBarTextAndColor("*Data Source added.", 100, Color.black);
|
||||
|
@ -54,7 +54,7 @@ public class ImageDSProcessor implements DataSourceProcessor {
|
||||
|
||||
|
||||
public ImageDSProcessor() {
|
||||
logger.log(Level.INFO, "RAMAN ImageDSHandler()...");
|
||||
logger.log(Level.INFO, "RAMAN ImageDSProcessor()...");
|
||||
|
||||
// Create the config panel
|
||||
imageFilePanel = ImageFilePanel.getDefault();
|
||||
@ -381,24 +381,6 @@ public class ImageDSProcessor implements DataSourceProcessor {
|
||||
try {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// RAMAN TBD: this should not be happening in here - caller should do this
|
||||
|
||||
// Get attention for the process finish
|
||||
/******
|
||||
java.awt.Toolkit.getDefaultToolkit().beep(); //BEEP!
|
||||
AddImageWizardAddingProgressVisual panel = progressPanel.getComponent();
|
||||
if (panel != null) {
|
||||
Window w = SwingUtilities.getWindowAncestor(panel);
|
||||
if (w != null) {
|
||||
w.toFront();
|
||||
}
|
||||
}
|
||||
* *******/
|
||||
|
||||
// Tell the panel we're done
|
||||
progressMonitor.setProgress(100);
|
||||
|
||||
|
@ -60,13 +60,13 @@
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="timeZoneLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="timeZoneComboBox" alignment="3" min="-2" pref="14" max="-2" attributes="0"/>
|
||||
<Component id="timeZoneComboBox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="noFatOrphansCheckbox" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="descLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="19" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="13" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
@ -22,6 +22,7 @@ import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.SimpleTimeZone;
|
||||
@ -35,6 +36,24 @@ import javax.swing.JPanel;
|
||||
* ImageTypePanel for adding an image file such as .img, .E0x, .00x, etc.
|
||||
*/
|
||||
public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
|
||||
static final List<String> rawExt = Arrays.asList(new String[]{".img", ".dd", ".001", ".aa", ".raw"});
|
||||
static final String rawDesc = "Raw Images (*.img, *.dd, *.001, *.aa, *.raw)";
|
||||
static GeneralFilter rawFilter = new GeneralFilter(rawExt, rawDesc);
|
||||
static final List<String> encaseExt = Arrays.asList(new String[]{".e01"});
|
||||
static final String encaseDesc = "Encase Images (*.e01)";
|
||||
static GeneralFilter encaseFilter = new GeneralFilter(encaseExt, encaseDesc);
|
||||
static final List<String> allExt = new ArrayList<String>();
|
||||
|
||||
static {
|
||||
allExt.addAll(rawExt);
|
||||
allExt.addAll(encaseExt);
|
||||
}
|
||||
static final String allDesc = "All Supported Types";
|
||||
static GeneralFilter allFilter = new GeneralFilter(allExt, allDesc);
|
||||
|
||||
|
||||
|
||||
private static ImageFilePanel instance = null;
|
||||
private PropertyChangeSupport pcs = null;
|
||||
private JFileChooser fc = new JFileChooser();
|
||||
@ -47,13 +66,11 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
fc.setDragEnabled(false);
|
||||
fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
||||
fc.setMultiSelectionEnabled(false);
|
||||
fc.addChoosableFileFilter(AddImageWizardChooseDataSourceVisual.rawFilter);
|
||||
fc.addChoosableFileFilter(AddImageWizardChooseDataSourceVisual.encaseFilter);
|
||||
fc.setFileFilter(AddImageWizardChooseDataSourceVisual.allFilter);
|
||||
fc.addChoosableFileFilter(rawFilter);
|
||||
fc.addChoosableFileFilter(encaseFilter);
|
||||
fc.setFileFilter(allFilter);
|
||||
|
||||
createTimeZoneList();
|
||||
noFatOrphansCheckbox.setEnabled(true);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -148,12 +165,12 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(timeZoneLabel)
|
||||
.addComponent(timeZoneComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(timeZoneComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(noFatOrphansCheckbox)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(descLabel)
|
||||
.addContainerGap(19, Short.MAX_VALUE))
|
||||
.addContainerGap(13, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@ -213,7 +230,11 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
//nothing to reset
|
||||
//reset the UI elements to default
|
||||
|
||||
pathTextField.setText(null);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user