i. Bugfix in readSettings()

ii Adjusted the size of the Image & Local disk so they are fully visible in design view.
This commit is contained in:
raman-bt 2013-10-29 09:24:21 -04:00
parent 0ce636ebf6
commit 657552661d
4 changed files with 13 additions and 11 deletions

View File

@ -66,7 +66,7 @@
<Component id="noFatOrphansCheckbox" min="-2" max="-2" attributes="0"/> <Component id="noFatOrphansCheckbox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="descLabel" min="-2" max="-2" attributes="0"/> <Component id="descLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="73" max="32767" attributes="0"/> <EmptySpace pref="33" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>

View File

@ -40,6 +40,7 @@ import org.sleuthkit.autopsy.coreutils.ModuleSettings;
*/ */
public class ImageFilePanel extends JPanel implements DocumentListener { public class ImageFilePanel extends JPanel implements DocumentListener {
private static final String PROP_LASTIMAGE_PATH = "LBL_LastImage_PATH"; private static final String PROP_LASTIMAGE_PATH = "LBL_LastImage_PATH";
static final List<String> rawExt = Arrays.asList(new String[]{".img", ".dd", ".001", ".aa", ".raw"}); static final List<String> rawExt = Arrays.asList(new String[]{".img", ".dd", ".001", ".aa", ".raw"});
@ -178,7 +179,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
.addComponent(noFatOrphansCheckbox) .addComponent(noFatOrphansCheckbox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(descLabel) .addComponent(descLabel)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(33, Short.MAX_VALUE))
); );
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
@ -259,18 +260,19 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
public void storeSettings() { public void storeSettings() {
String imagePathName = getContentPaths(); String imagePathName = getContentPaths();
String imagePath = imagePathName.substring(0, imagePathName.lastIndexOf(File.separator) + 1); if (null != imagePathName ) {
String imagePath = imagePathName.substring(0, imagePathName.lastIndexOf(File.separator) + 1);
ModuleSettings.setConfigSetting(ImageFilePanel.class.getName(), PROP_LASTIMAGE_PATH, imagePath); ModuleSettings.setConfigSetting(ImageFilePanel.class.getName(), PROP_LASTIMAGE_PATH, imagePath);
}
} }
public void readSettings() { public void readSettings() {
String lastImagePath = ModuleSettings.getConfigSetting(ImageFilePanel.class.getName(), PROP_LASTIMAGE_PATH); String lastImagePath = ModuleSettings.getConfigSetting(ImageFilePanel.class.getName(), PROP_LASTIMAGE_PATH);
if (!lastImagePath.isEmpty()) if (null != lastImagePath) {
pathTextField.setText(lastImagePath); if (!lastImagePath.isEmpty())
pathTextField.setText(lastImagePath);
}
} }
/** /**
* Creates the drop down list for the time zones and then makes the local * Creates the drop down list for the time zones and then makes the local

View File

@ -61,7 +61,7 @@
<Component id="noFatOrphansCheckbox" min="-2" max="-2" attributes="0"/> <Component id="noFatOrphansCheckbox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="descLabel" min="-2" max="-2" attributes="0"/> <Component id="descLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="27" max="32767" attributes="0"/> <EmptySpace max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>

View File

@ -157,7 +157,7 @@ public class LocalDiskPanel extends JPanel {
.addComponent(noFatOrphansCheckbox) .addComponent(noFatOrphansCheckbox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(descLabel) .addComponent(descLabel)
.addContainerGap(27, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
); );
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables