2451-Title of Data Source choosing panel updated and spacer added

This commit is contained in:
William Schaefer 2017-03-21 16:06:31 -04:00
parent e2528937c3
commit 9ef1a9a06a
2 changed files with 20 additions and 11 deletions

View File

@ -38,12 +38,12 @@ import org.sleuthkit.autopsy.ingest.runIngestModuleWizard.ShortcutWizardDescript
*/ */
final class AddImageWizardSelectDspPanel extends ShortcutWizardDescriptorPanel implements PropertyChangeListener { final class AddImageWizardSelectDspPanel extends ShortcutWizardDescriptorPanel implements PropertyChangeListener {
@NbBundle.Messages("SelectDataSourceProcessorPanel.name.text=Select Type of Data") @NbBundle.Messages("SelectDataSourceProcessorPanel.name.text=Select Type of Data Source To Add")
private AddImageWizardSelectDspVisual component; private AddImageWizardSelectDspVisual component;
private static final String LAST_DSP_PROPERTIES_FILE = "LastDspUsed"; //NON-NLS private static final String LAST_DSP_PROPERTIES_FILE = "LastDspUsed"; //NON-NLS
private static final String LAST_DSP_USED_KEY = "Last_Dsp_Used"; //NON-NLS private static final String LAST_DSP_USED_KEY = "Last_Dsp_Used"; //NON-NLS
private static final Logger logger = Logger.getLogger(AddImageWizardSelectDspVisual.class.getName()); private static final Logger logger = Logger.getLogger(AddImageWizardSelectDspVisual.class.getName());
@Override @Override
public Component getComponent() { public Component getComponent() {
if (component == null) { if (component == null) {

View File

@ -42,7 +42,8 @@ import org.sleuthkit.autopsy.datasourceprocessors.RawDSProcessor;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
/** /**
* Panel which displays the available DataSourceProcessors and allows selection of one * Panel which displays the available DataSourceProcessors and allows selection
* of one
*/ */
final class AddImageWizardSelectDspVisual extends JPanel { final class AddImageWizardSelectDspVisual extends JPanel {
@ -61,7 +62,7 @@ final class AddImageWizardSelectDspVisual extends JPanel {
} }
/** /**
* Find the DSP which is currently selected and save it as the selected * Find the DSP which is currently selected and save it as the selected
* DataSourceProcessor. * DataSourceProcessor.
* *
*/ */
@ -79,14 +80,16 @@ final class AddImageWizardSelectDspVisual extends JPanel {
/** /**
* Get the DataSourceProcessor which is currently selected in this panel * Get the DataSourceProcessor which is currently selected in this panel
* *
* @return selectedDsp the DataSourceProcessor which is selected in this panel * @return selectedDsp the DataSourceProcessor which is selected in this
* panel
*/ */
String getSelectedDsp() { String getSelectedDsp() {
return selectedDsp; return selectedDsp;
} }
/** /**
* Create the a button for each DataSourceProcessor that should exist as an option. * Create the a button for each DataSourceProcessor that should exist as an
* option.
*/ */
private void createDataSourceProcessorButtons() { private void createDataSourceProcessorButtons() {
//Listener for button selection //Listener for button selection
@ -121,6 +124,11 @@ final class AddImageWizardSelectDspVisual extends JPanel {
buttonGroup1.add(dspButton); buttonGroup1.add(dspButton);
gridBagLayout.setConstraints(dspButton, constraints); gridBagLayout.setConstraints(dspButton, constraints);
constraints.gridx++; constraints.gridx++;
//Add space between the button and text
Filler buttonTextSpacer = new Filler(spacerBlockDimension, spacerBlockDimension, spacerBlockDimension);
gridBagLayout.setConstraints(buttonTextSpacer, constraints);
jPanel1.add(buttonTextSpacer);
constraints.gridx++;
//Add the text area serving as a label to the right of the button //Add the text area serving as a label to the right of the button
JTextArea myLabel = new JTextArea(dspType); JTextArea myLabel = new JTextArea(dspType);
myLabel.setBackground(new Color(240, 240, 240));//matches background of panel myLabel.setBackground(new Color(240, 240, 240));//matches background of panel
@ -143,11 +151,12 @@ final class AddImageWizardSelectDspVisual extends JPanel {
} }
/** /**
* Create a list of the DataSourceProcessors which should exist as options on this panel. * Create a list of the DataSourceProcessors which should exist as options
* The default Autopsy DataSourceProcessors will appear * on this panel. The default Autopsy DataSourceProcessors will appear at
* at the beggining of the list in the same order. * the beggining of the list in the same order.
* *
* @return dspList a list of DataSourceProcessors which can be chose in this panel * @return dspList a list of DataSourceProcessors which can be chose in this
* panel
*/ */
private List<String> getListOfDsps() { private List<String> getListOfDsps() {
List<String> dspList = new ArrayList<>(); List<String> dspList = new ArrayList<>();