From 796e4417654e87458fa0f685da2bf4b66edf813c Mon Sep 17 00:00:00 2001 From: momo Date: Wed, 28 Oct 2015 15:11:46 -0400 Subject: [PATCH] change variable names --- .../modules/filetypeid/Bundle.properties | 2 +- .../autopsy/modules/filetypeid/FileType.java | 17 +++++++----- .../FileTypeIdGlobalSettingsPanel.form | 10 +++---- .../FileTypeIdGlobalSettingsPanel.java | 26 +++++++++---------- 4 files changed, 29 insertions(+), 26 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties index 7ac6b9fc2c..bc99ea014f 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties @@ -46,4 +46,4 @@ FileTypeIdGlobalSettingsPanel.jLabel2.text=MIME Types: FileTypeIdGlobalSettingsPanel.jLabel3.text=Autopsy can automatically detect many file types. Add your custom file types here. FileTypeIdGlobalSettingsPanel.startUp.fileTypeDetectorInitializationException.msg=Error initializing the file type detector. FileTypeIdIngestModule.startUp.fileTypeDetectorInitializationException.msg=Error initializing the file type detector. -FileTypeIdGlobalSettingsPanel.isFooterCheckBox.text=This signature is a footer +FileTypeIdGlobalSettingsPanel.isTrailingCheckBox.text=This signature is a trailing diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileType.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileType.java index 451c1d773c..133c1c6f84 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileType.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileType.java @@ -203,13 +203,14 @@ class FileType { * @param signatureBytes The signature bytes. * @param offset The offset of the signature bytes. * @param type The type of data in the byte array. Impacts - * how it is displayed to the user in the UI. + * how it is displayed to the user in the UI. + * @param trailing Determines whether this signature is trailing. */ - Signature(final byte[] signatureBytes, long offset, Type type, boolean isFooter) { + Signature(final byte[] signatureBytes, long offset, Type type, boolean trailing) { this.signatureBytes = Arrays.copyOf(signatureBytes, signatureBytes.length); this.offset = offset; this.type = type; - this.trailing = isFooter; + this.trailing = trailing; } /** @@ -218,12 +219,13 @@ class FileType { * * @param signatureString The ASCII string * @param offset The offset of the signature bytes. + * @param trailing Determines whether this signature is trailing. */ - Signature(String signatureString, long offset, boolean isFooter) { + Signature(String signatureString, long offset, boolean trailing) { this.signatureBytes = signatureString.getBytes(StandardCharsets.US_ASCII); this.offset = offset; this.type = Type.ASCII; - this.trailing = isFooter; + this.trailing = trailing; } /** @@ -234,12 +236,13 @@ class FileType { * * @param signatureBytes The signature bytes. * @param offset The offset of the signature bytes. + * @param trailing Determines whether this signature is trailing. */ - Signature(final byte[] signatureBytes, long offset, boolean isFooter) { + Signature(final byte[] signatureBytes, long offset, boolean trailing) { this.signatureBytes = Arrays.copyOf(signatureBytes, signatureBytes.length); this.offset = offset; this.type = Type.RAW; - this.trailing = isFooter; + this.trailing = trailing; } /** diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.form index 030695446f..0e51a3c6bc 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.form @@ -83,7 +83,7 @@ - + @@ -140,7 +140,7 @@ - + @@ -353,14 +353,14 @@ - + - + - + diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.java index b721936057..690cef660a 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.java @@ -270,7 +270,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane } } signatureTextField.setText(signatureBytes); - isFooterCheckBox.setSelected(signature.isTrailing()); + isTrailingCheckBox.setSelected(signature.isTrailing()); offsetTextField.setText(Long.toString(signature.getOffset())); postHitCheckBox.setSelected(fileType.alertOnMatch()); filesSetNameTextField.setEnabled(postHitCheckBox.isSelected()); @@ -290,7 +290,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane signatureTypeComboBox.setSelectedItem(FileTypeIdGlobalSettingsPanel.RAW_SIGNATURE_TYPE_COMBO_BOX_ITEM); hexPrefixLabel.setVisible(true); signatureTextField.setText("0000"); //NON-NLS - isFooterCheckBox.setSelected(false); + isTrailingCheckBox.setSelected(false); offsetTextField.setText(""); //NON-NLS postHitCheckBox.setSelected(false); filesSetNameTextField.setText(""); //NON-NLS @@ -362,7 +362,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); - isFooterCheckBox = new javax.swing.JCheckBox(); + isTrailingCheckBox = new javax.swing.JCheckBox(); setMaximumSize(new java.awt.Dimension(500, 300)); setPreferredSize(new java.awt.Dimension(500, 300)); @@ -442,10 +442,10 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.jLabel3.text")); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(isFooterCheckBox, org.openide.util.NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.isFooterCheckBox.text")); // NOI18N - isFooterCheckBox.addActionListener(new java.awt.event.ActionListener() { + org.openide.awt.Mnemonics.setLocalizedText(isTrailingCheckBox, org.openide.util.NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.isTrailingCheckBox.text")); // NOI18N + isTrailingCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - isFooterCheckBoxActionPerformed(evt); + isTrailingCheckBoxActionPerformed(evt); } }); @@ -502,7 +502,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(saveTypeButton) .addGap(8, 8, 8)) - .addComponent(isFooterCheckBox))) + .addComponent(isTrailingCheckBox))) .addComponent(jLabel1) .addComponent(jLabel3)) .addContainerGap(50, Short.MAX_VALUE)))) @@ -544,7 +544,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane .addComponent(signatureTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(signatureLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(isFooterCheckBox) + .addComponent(isTrailingCheckBox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(offsetTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) @@ -653,8 +653,8 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane /** * Put it all together and reset the file types list component. */ - boolean isTrailing = isFooterCheckBox.isSelected(); - FileType.Signature signature = new FileType.Signature(signatureBytes, offset, sigType, isFooterCheckBox.isSelected()); + boolean isTrailing = isTrailingCheckBox.isSelected(); + FileType.Signature signature = new FileType.Signature(signatureBytes, offset, sigType, isTrailingCheckBox.isSelected()); FileType fileType = new FileType(typeName, signature, filesSetName, postHitCheckBox.isSelected()); FileType selected = typesList.getSelectedValue(); if (selected != null) { @@ -684,9 +684,9 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane // TODO add your handling code here: }//GEN-LAST:event_signatureTextFieldActionPerformed - private void isFooterCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_isFooterCheckBoxActionPerformed + private void isTrailingCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_isTrailingCheckBoxActionPerformed - }//GEN-LAST:event_isFooterCheckBoxActionPerformed + }//GEN-LAST:event_isTrailingCheckBoxActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton deleteTypeButton; @@ -694,7 +694,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane private javax.swing.JTextField filesSetNameTextField; private javax.swing.JLabel hexPrefixLabel; private javax.swing.JLabel ingestRunningWarningLabel; - private javax.swing.JCheckBox isFooterCheckBox; + private javax.swing.JCheckBox isTrailingCheckBox; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3;