code review updates

This commit is contained in:
Karl Mortensen 2015-10-22 18:22:55 -04:00
parent cc92ac6bc5
commit 476f89d006
3 changed files with 16 additions and 20 deletions

View File

@ -261,7 +261,7 @@ NewCaseVisualPanel1.singleUserCaseRadioButton.text=Single-user
NewCaseVisualPanel1.multiUserSettingsWarningLabel.text=Multi-user settings warning label NewCaseVisualPanel1.multiUserSettingsWarningLabel.text=Multi-user settings warning label
Case.deleteReports.deleteFromDiskException.log.msg=Unable to delete the report from the disk. Case.deleteReports.deleteFromDiskException.log.msg=Unable to delete the report from the disk.
Case.deleteReports.deleteFromDiskException.msg=Unable to delete the report {0} from the disk.\nYou may manually delete it from {1} Case.deleteReports.deleteFromDiskException.msg=Unable to delete the report {0} from the disk.\nYou may manually delete it from {1}
CasePropertiesForm.lbDbType.text=Database Type: CasePropertiesForm.lbDbType.text=Case Type:
CasePropertiesForm.tbDbType.text= CasePropertiesForm.tbDbType.text=
CasePropertiesForm.lbDbName.text=Database Name: CasePropertiesForm.lbDbName.text=Database Name:
CasePropertiesForm.tbDbName.text= CasePropertiesForm.tbDbName.text=

View File

@ -49,9 +49,9 @@
</Group> </Group>
<EmptySpace type="separate" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="caseNameTextField" alignment="0" pref="244" max="32767" attributes="1"/> <Component id="caseNameTextField" alignment="0" pref="245" max="32767" attributes="1"/>
<Component id="caseNumberTextField" alignment="0" pref="244" max="32767" attributes="1"/> <Component id="caseNumberTextField" alignment="0" pref="245" max="32767" attributes="1"/>
<Component id="examinerTextField" alignment="0" pref="244" max="32767" attributes="1"/> <Component id="examinerTextField" alignment="0" pref="245" max="32767" attributes="1"/>
<Component id="crDateTextField" alignment="0" max="32767" attributes="1"/> <Component id="crDateTextField" alignment="0" max="32767" attributes="1"/>
<Component id="jScrollPane2" alignment="0" max="32767" attributes="0"/> <Component id="jScrollPane2" alignment="0" max="32767" attributes="0"/>
<Component id="tbDbType" alignment="0" max="32767" attributes="0"/> <Component id="tbDbType" alignment="0" max="32767" attributes="0"/>

View File

@ -79,7 +79,7 @@ class CasePropertiesForm extends javax.swing.JPanel {
/** /**
* Creates new form CasePropertiesForm * Creates new form CasePropertiesForm
*/ */
CasePropertiesForm(Case currentCase, String crDate, String caseDir, Map<Long, String> imgPaths) { CasePropertiesForm(Case currentCase, String crDate, String caseDir, Map<Long, String> imgPaths) throws CaseMetadata.CaseMetadataException {
initComponents(); initComponents();
caseNameTextField.setText(currentCase.getName()); caseNameTextField.setText(currentCase.getName());
caseNumberTextField.setText(currentCase.getNumber()); caseNumberTextField.setText(currentCase.getNumber());
@ -88,18 +88,14 @@ class CasePropertiesForm extends javax.swing.JPanel {
caseDirTextArea.setText(caseDir); caseDirTextArea.setText(caseDir);
current = currentCase; current = currentCase;
try { CaseMetadata caseMetadata = new CaseMetadata(Paths.get(currentCase.getConfigFilePath()));
CaseMetadata caseMetadata = new CaseMetadata(Paths.get(currentCase.getConfigFilePath())); tbDbName.setText(caseMetadata.getCaseDatabaseName());
tbDbName.setText(caseMetadata.getCaseDatabaseName()); Case.CaseType caseType = caseMetadata.getCaseType();
Case.CaseType caseType = caseMetadata.getCaseType(); tbDbType.setText(caseType.toString());
tbDbType.setText(caseType.toString()); if (caseType == Case.CaseType.SINGLE_USER_CASE) {
if (caseType == Case.CaseType.SINGLE_USER_CASE) { deleteCaseButton.setEnabled(true);
deleteCaseButton.setEnabled(true); } else {
} else { deleteCaseButton.setEnabled(false);
deleteCaseButton.setEnabled(false);
}
} catch (CaseMetadata.CaseMetadataException ex) {
Logger.getLogger(CasePropertiesForm.class.getName()).log(Level.WARNING, "Could not read case properties.", ex); //NON-NLS
} }
int totalImages = imgPaths.size(); int totalImages = imgPaths.size();
@ -314,9 +310,9 @@ class CasePropertiesForm extends javax.swing.JPanel {
.addComponent(lbDbType)) .addComponent(lbDbType))
.addGap(18, 18, 18) .addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(caseNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(caseNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE)
.addComponent(caseNumberTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(caseNumberTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE)
.addComponent(examinerTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(examinerTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE)
.addComponent(crDateTextField) .addComponent(crDateTextField)
.addComponent(jScrollPane2) .addComponent(jScrollPane2)
.addComponent(tbDbType) .addComponent(tbDbType)