mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-09 06:39:33 +00:00
Implemented the removal functions in Mismatch Options.
This commit is contained in:
parent
3c38a6e308
commit
a18974d5cc
@ -12,3 +12,5 @@ FileExtMismatchConfigPanel.addTypeButton.text=Add Type
|
|||||||
FileExtMismatchConfigPanel.userTypeTextField.text=
|
FileExtMismatchConfigPanel.userTypeTextField.text=
|
||||||
FileExtMismatchConfigPanel.extErrorLabel.text=\
|
FileExtMismatchConfigPanel.extErrorLabel.text=\
|
||||||
FileExtMismatchConfigPanel.mimeErrLabel.text=\
|
FileExtMismatchConfigPanel.mimeErrLabel.text=\
|
||||||
|
FileExtMismatchConfigPanel.mimeRemoveErrLabel.text=\
|
||||||
|
FileExtMismatchConfigPanel.extRemoveErrLabel.text=\
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="jSplitPane1" max="32767" attributes="0"/>
|
<Component id="jSplitPane1" max="32767" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="1" attributes="0">
|
||||||
<Component id="saveButton" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||||
|
<Component id="saveButton" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
@ -44,6 +44,9 @@
|
|||||||
<SubComponents>
|
<SubComponents>
|
||||||
<Component class="javax.swing.JButton" name="saveButton">
|
<Component class="javax.swing.JButton" name="saveButton">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
|
<Image iconType="3" name="/org/sleuthkit/autopsy/fileextmismatch/save16.png"/>
|
||||||
|
</Property>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/fileextmismatch/Bundle.properties" key="FileExtMismatchConfigPanel.saveButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="org/sleuthkit/autopsy/fileextmismatch/Bundle.properties" key="FileExtMismatchConfigPanel.saveButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
@ -84,6 +87,7 @@
|
|||||||
</Group>
|
</Group>
|
||||||
<Component id="removeTypeButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="removeTypeButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="mimeErrLabel" alignment="0" max="32767" attributes="0"/>
|
<Component id="mimeErrLabel" alignment="0" max="32767" attributes="0"/>
|
||||||
|
<Component id="mimeRemoveErrLabel" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace min="0" pref="66" max="32767" attributes="0"/>
|
<EmptySpace min="0" pref="66" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
@ -108,7 +112,9 @@
|
|||||||
<Component id="mimeErrLabel" min="-2" max="-2" attributes="0"/>
|
<Component id="mimeErrLabel" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="removeTypeButton" min="-2" max="-2" attributes="0"/>
|
<Component id="removeTypeButton" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="54" max="32767" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="mimeRemoveErrLabel" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace pref="73" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
@ -160,6 +166,9 @@
|
|||||||
<ResourceString bundle="org/sleuthkit/autopsy/fileextmismatch/Bundle.properties" key="FileExtMismatchConfigPanel.removeTypeButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="org/sleuthkit/autopsy/fileextmismatch/Bundle.properties" key="FileExtMismatchConfigPanel.removeTypeButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="removeTypeButtonActionPerformed"/>
|
||||||
|
</Events>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="mimeErrLabel">
|
<Component class="javax.swing.JLabel" name="mimeErrLabel">
|
||||||
<Properties>
|
<Properties>
|
||||||
@ -171,6 +180,13 @@
|
|||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="mimeRemoveErrLabel">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="org/sleuthkit/autopsy/fileextmismatch/Bundle.properties" key="FileExtMismatchConfigPanel.mimeRemoveErrLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
<Container class="javax.swing.JPanel" name="extensionPanel">
|
<Container class="javax.swing.JPanel" name="extensionPanel">
|
||||||
@ -197,6 +213,7 @@
|
|||||||
<Component id="addExtButton" max="32767" attributes="0"/>
|
<Component id="addExtButton" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Component id="extErrorLabel" max="32767" attributes="0"/>
|
<Component id="extErrorLabel" max="32767" attributes="0"/>
|
||||||
|
<Component id="extRemoveErrLabel" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace min="0" pref="31" max="32767" attributes="0"/>
|
<EmptySpace min="0" pref="31" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
@ -211,7 +228,7 @@
|
|||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="extHeaderLabel" min="-2" max="-2" attributes="0"/>
|
<Component id="extHeaderLabel" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jScrollPane3" pref="305" max="32767" attributes="0"/>
|
<Component id="jScrollPane3" min="-2" pref="313" max="-2" attributes="0"/>
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
<Component id="userExtTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="userExtTextField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
@ -221,6 +238,9 @@
|
|||||||
<Component id="extErrorLabel" min="-2" max="-2" attributes="0"/>
|
<Component id="extErrorLabel" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="removeExtButton" min="-2" max="-2" attributes="0"/>
|
<Component id="removeExtButton" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="extRemoveErrLabel" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
@ -265,6 +285,9 @@
|
|||||||
<ResourceString bundle="org/sleuthkit/autopsy/fileextmismatch/Bundle.properties" key="FileExtMismatchConfigPanel.removeExtButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="org/sleuthkit/autopsy/fileextmismatch/Bundle.properties" key="FileExtMismatchConfigPanel.removeExtButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="removeExtButtonActionPerformed"/>
|
||||||
|
</Events>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="extHeaderLabel">
|
<Component class="javax.swing.JLabel" name="extHeaderLabel">
|
||||||
<Properties>
|
<Properties>
|
||||||
@ -283,6 +306,13 @@
|
|||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="extRemoveErrLabel">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="org/sleuthkit/autopsy/fileextmismatch/Bundle.properties" key="FileExtMismatchConfigPanel.extRemoveErrLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
|
@ -43,7 +43,8 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
private MimeTableModel mimeTableModel;
|
private MimeTableModel mimeTableModel;
|
||||||
private ExtTableModel extTableModel;
|
private ExtTableModel extTableModel;
|
||||||
private final String EXT_HEADER_LABEL = "Allowed Extensions for ";
|
private final String EXT_HEADER_LABEL = "Allowed Extensions for ";
|
||||||
private String selectedMime;
|
private String selectedMime = "";
|
||||||
|
private String selectedExt = "";
|
||||||
ListSelectionModel lsm = null;
|
ListSelectionModel lsm = null;
|
||||||
|
|
||||||
public FileExtMismatchConfigPanel() {
|
public FileExtMismatchConfigPanel() {
|
||||||
@ -56,6 +57,8 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
|
|
||||||
private void customizeComponents() {
|
private void customizeComponents() {
|
||||||
setName("Advanced File Extension Mismatch Configuration");
|
setName("Advanced File Extension Mismatch Configuration");
|
||||||
|
|
||||||
|
// Handle selections on the left table
|
||||||
lsm = mimeTable.getSelectionModel();
|
lsm = mimeTable.getSelectionModel();
|
||||||
lsm.addListSelectionListener(new ListSelectionListener() {
|
lsm.addListSelectionListener(new ListSelectionListener() {
|
||||||
|
|
||||||
@ -73,7 +76,6 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
}
|
}
|
||||||
extHeaderLabel.setText(labelStr);
|
extHeaderLabel.setText(labelStr);
|
||||||
currentExtensions = editableMap.get(selectedMime);
|
currentExtensions = editableMap.get(selectedMime);
|
||||||
//listSelectionModel.setSelectionInterval(index, index);
|
|
||||||
|
|
||||||
extTableModel.resync();
|
extTableModel.resync();
|
||||||
//initButtons();
|
//initButtons();
|
||||||
@ -81,10 +83,36 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
selectedMime = "";
|
selectedMime = "";
|
||||||
currentExtensions = null;
|
currentExtensions = null;
|
||||||
extTableModel.resync();
|
extTableModel.resync();
|
||||||
//initButtons();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mimeErrLabel.setText(" ");
|
||||||
|
mimeRemoveErrLabel.setText(" ");
|
||||||
|
extRemoveErrLabel.setText(" ");
|
||||||
|
extErrorLabel.setText(" ");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Handle selections on the right table
|
||||||
|
ListSelectionModel extLsm = extTable.getSelectionModel();
|
||||||
|
extLsm.addListSelectionListener(new ListSelectionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void valueChanged(ListSelectionEvent e) {
|
||||||
|
ListSelectionModel listSelectionModel = (ListSelectionModel) e.getSource();
|
||||||
|
if (!listSelectionModel.isSelectionEmpty()) {
|
||||||
|
int index = listSelectionModel.getMinSelectionIndex();
|
||||||
|
listSelectionModel.setSelectionInterval(index, index);
|
||||||
|
|
||||||
|
selectedExt = currentExtensions[index];
|
||||||
|
} else {
|
||||||
|
selectedExt = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
extRemoveErrLabel.setText(" ");
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -105,6 +133,7 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
addTypeButton = new javax.swing.JButton();
|
addTypeButton = new javax.swing.JButton();
|
||||||
removeTypeButton = new javax.swing.JButton();
|
removeTypeButton = new javax.swing.JButton();
|
||||||
mimeErrLabel = new javax.swing.JLabel();
|
mimeErrLabel = new javax.swing.JLabel();
|
||||||
|
mimeRemoveErrLabel = new javax.swing.JLabel();
|
||||||
extensionPanel = new javax.swing.JPanel();
|
extensionPanel = new javax.swing.JPanel();
|
||||||
userExtTextField = new javax.swing.JTextField();
|
userExtTextField = new javax.swing.JTextField();
|
||||||
addExtButton = new javax.swing.JButton();
|
addExtButton = new javax.swing.JButton();
|
||||||
@ -113,7 +142,9 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
removeExtButton = new javax.swing.JButton();
|
removeExtButton = new javax.swing.JButton();
|
||||||
extHeaderLabel = new javax.swing.JLabel();
|
extHeaderLabel = new javax.swing.JLabel();
|
||||||
extErrorLabel = new javax.swing.JLabel();
|
extErrorLabel = new javax.swing.JLabel();
|
||||||
|
extRemoveErrLabel = new javax.swing.JLabel();
|
||||||
|
|
||||||
|
saveButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/fileextmismatch/save16.png"))); // NOI18N
|
||||||
saveButton.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.saveButton.text")); // NOI18N
|
saveButton.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.saveButton.text")); // NOI18N
|
||||||
saveButton.setEnabled(false);
|
saveButton.setEnabled(false);
|
||||||
saveButton.addActionListener(new java.awt.event.ActionListener() {
|
saveButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
@ -144,10 +175,17 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
});
|
});
|
||||||
|
|
||||||
removeTypeButton.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.removeTypeButton.text")); // NOI18N
|
removeTypeButton.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.removeTypeButton.text")); // NOI18N
|
||||||
|
removeTypeButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
removeTypeButtonActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
mimeErrLabel.setForeground(new java.awt.Color(255, 0, 0));
|
mimeErrLabel.setForeground(new java.awt.Color(255, 0, 0));
|
||||||
mimeErrLabel.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.mimeErrLabel.text")); // NOI18N
|
mimeErrLabel.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.mimeErrLabel.text")); // NOI18N
|
||||||
|
|
||||||
|
mimeRemoveErrLabel.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.mimeRemoveErrLabel.text")); // NOI18N
|
||||||
|
|
||||||
javax.swing.GroupLayout mimePanelLayout = new javax.swing.GroupLayout(mimePanel);
|
javax.swing.GroupLayout mimePanelLayout = new javax.swing.GroupLayout(mimePanel);
|
||||||
mimePanel.setLayout(mimePanelLayout);
|
mimePanel.setLayout(mimePanelLayout);
|
||||||
mimePanelLayout.setHorizontalGroup(
|
mimePanelLayout.setHorizontalGroup(
|
||||||
@ -164,7 +202,8 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(addTypeButton))
|
.addComponent(addTypeButton))
|
||||||
.addComponent(removeTypeButton)
|
.addComponent(removeTypeButton)
|
||||||
.addComponent(mimeErrLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.addComponent(mimeErrLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
|
.addComponent(mimeRemoveErrLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
.addGap(0, 66, Short.MAX_VALUE)))
|
.addGap(0, 66, Short.MAX_VALUE)))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
@ -183,7 +222,9 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
.addComponent(mimeErrLabel)
|
.addComponent(mimeErrLabel)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(removeTypeButton)
|
.addComponent(removeTypeButton)
|
||||||
.addContainerGap(54, Short.MAX_VALUE))
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(mimeRemoveErrLabel)
|
||||||
|
.addContainerGap(73, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
|
|
||||||
jSplitPane1.setLeftComponent(mimePanel);
|
jSplitPane1.setLeftComponent(mimePanel);
|
||||||
@ -206,12 +247,19 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
jScrollPane3.setViewportView(extTable);
|
jScrollPane3.setViewportView(extTable);
|
||||||
|
|
||||||
removeExtButton.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.removeExtButton.text")); // NOI18N
|
removeExtButton.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.removeExtButton.text")); // NOI18N
|
||||||
|
removeExtButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
removeExtButtonActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
extHeaderLabel.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.extHeaderLabel.text")); // NOI18N
|
extHeaderLabel.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.extHeaderLabel.text")); // NOI18N
|
||||||
|
|
||||||
extErrorLabel.setForeground(new java.awt.Color(255, 0, 0));
|
extErrorLabel.setForeground(new java.awt.Color(255, 0, 0));
|
||||||
extErrorLabel.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.extErrorLabel.text")); // NOI18N
|
extErrorLabel.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.extErrorLabel.text")); // NOI18N
|
||||||
|
|
||||||
|
extRemoveErrLabel.setText(org.openide.util.NbBundle.getMessage(FileExtMismatchConfigPanel.class, "FileExtMismatchConfigPanel.extRemoveErrLabel.text")); // NOI18N
|
||||||
|
|
||||||
javax.swing.GroupLayout extensionPanelLayout = new javax.swing.GroupLayout(extensionPanel);
|
javax.swing.GroupLayout extensionPanelLayout = new javax.swing.GroupLayout(extensionPanel);
|
||||||
extensionPanel.setLayout(extensionPanelLayout);
|
extensionPanel.setLayout(extensionPanelLayout);
|
||||||
extensionPanelLayout.setHorizontalGroup(
|
extensionPanelLayout.setHorizontalGroup(
|
||||||
@ -228,7 +276,8 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
.addComponent(userExtTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(userExtTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(addExtButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.addComponent(addExtButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
.addComponent(extErrorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.addComponent(extErrorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
|
.addComponent(extRemoveErrLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
.addGap(0, 31, Short.MAX_VALUE)))
|
.addGap(0, 31, Short.MAX_VALUE)))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
@ -238,7 +287,7 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addComponent(extHeaderLabel)
|
.addComponent(extHeaderLabel)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 305, Short.MAX_VALUE)
|
.addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 313, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
.addGroup(extensionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(extensionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(userExtTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(userExtTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
@ -246,7 +295,10 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
.addGap(2, 2, 2)
|
.addGap(2, 2, 2)
|
||||||
.addComponent(extErrorLabel)
|
.addComponent(extErrorLabel)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(removeExtButton))
|
.addComponent(removeExtButton)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(extRemoveErrLabel)
|
||||||
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
|
|
||||||
jSplitPane1.setRightComponent(extensionPanel);
|
jSplitPane1.setRightComponent(extensionPanel);
|
||||||
@ -259,9 +311,9 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(jSplitPane1)
|
.addComponent(jSplitPane1)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||||
.addComponent(saveButton)
|
.addGap(0, 0, Short.MAX_VALUE)
|
||||||
.addGap(0, 0, Short.MAX_VALUE)))
|
.addComponent(saveButton)))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
@ -284,6 +336,12 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (selectedMime.isEmpty()) {
|
||||||
|
extErrorLabel.setForeground(Color.red);
|
||||||
|
extErrorLabel.setText("No MIME type selected!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ArrayList<String> editedExtensions = new ArrayList<>(Arrays.asList(editableMap.get(selectedMime)));
|
ArrayList<String> editedExtensions = new ArrayList<>(Arrays.asList(editableMap.get(selectedMime)));
|
||||||
editedExtensions.add(newExt);
|
editedExtensions.add(newExt);
|
||||||
|
|
||||||
@ -296,7 +354,8 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
|
|
||||||
// user feedback for successful add
|
// user feedback for successful add
|
||||||
extErrorLabel.setForeground(Color.blue);
|
extErrorLabel.setForeground(Color.blue);
|
||||||
extErrorLabel.setText("Extension " + newExt + " added.");
|
extErrorLabel.setText("Extension " + newExt + " added.");
|
||||||
|
extRemoveErrLabel.setText(" ");
|
||||||
userExtTextField.setText("");
|
userExtTextField.setText("");
|
||||||
}//GEN-LAST:event_addExtButtonActionPerformed
|
}//GEN-LAST:event_addExtButtonActionPerformed
|
||||||
|
|
||||||
@ -322,6 +381,7 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
//selectByMimeString(newMime);
|
//selectByMimeString(newMime);
|
||||||
mimeErrLabel.setForeground(Color.blue);
|
mimeErrLabel.setForeground(Color.blue);
|
||||||
mimeErrLabel.setText("MIME type " + newMime + " added.");
|
mimeErrLabel.setText("MIME type " + newMime + " added.");
|
||||||
|
mimeRemoveErrLabel.setText(" ");
|
||||||
userTypeTextField.setText("");
|
userTypeTextField.setText("");
|
||||||
saveButton.setEnabled(true);
|
saveButton.setEnabled(true);
|
||||||
}//GEN-LAST:event_addTypeButtonActionPerformed
|
}//GEN-LAST:event_addTypeButtonActionPerformed
|
||||||
@ -334,6 +394,56 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
mimeErrLabel.setText(" "); //space so Swing doesn't mess up vertical spacing
|
mimeErrLabel.setText(" "); //space so Swing doesn't mess up vertical spacing
|
||||||
}//GEN-LAST:event_userTypeTextFieldFocusGained
|
}//GEN-LAST:event_userTypeTextFieldFocusGained
|
||||||
|
|
||||||
|
private void removeTypeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeTypeButtonActionPerformed
|
||||||
|
if (selectedMime.isEmpty()) {
|
||||||
|
mimeRemoveErrLabel.setForeground(Color.red);
|
||||||
|
mimeRemoveErrLabel.setText("No MIME type selected!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
editableMap.remove(selectedMime);
|
||||||
|
String deadMime = selectedMime;
|
||||||
|
|
||||||
|
// Refresh table
|
||||||
|
updateMimeList();
|
||||||
|
mimeTableModel.resync();
|
||||||
|
|
||||||
|
// user feedback for successful add
|
||||||
|
mimeRemoveErrLabel.setForeground(Color.blue);
|
||||||
|
mimeRemoveErrLabel.setText("MIME type " + deadMime + " deleted.");
|
||||||
|
saveButton.setEnabled(true);
|
||||||
|
}//GEN-LAST:event_removeTypeButtonActionPerformed
|
||||||
|
|
||||||
|
private void removeExtButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeExtButtonActionPerformed
|
||||||
|
if (selectedExt.isEmpty()) {
|
||||||
|
extRemoveErrLabel.setForeground(Color.red);
|
||||||
|
extRemoveErrLabel.setText("No extension selected!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selectedMime.isEmpty()) {
|
||||||
|
extErrorLabel.setForeground(Color.red);
|
||||||
|
extErrorLabel.setText("No MIME type selected!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayList<String> editedExtensions = new ArrayList<>(Arrays.asList(editableMap.get(selectedMime)));
|
||||||
|
editedExtensions.remove(selectedExt);
|
||||||
|
String deadExt = selectedExt;
|
||||||
|
|
||||||
|
// Old array will be replaced by new array for this key
|
||||||
|
editableMap.put(selectedMime, editedExtensions.toArray(new String[0]));
|
||||||
|
|
||||||
|
// Refresh tables
|
||||||
|
//mimeTableModel.resync();
|
||||||
|
extTableModel.resync();
|
||||||
|
|
||||||
|
// user feedback for successful add
|
||||||
|
extRemoveErrLabel.setForeground(Color.blue);
|
||||||
|
extRemoveErrLabel.setText("Extension " + deadExt + " deleted.");
|
||||||
|
saveButton.setEnabled(true);
|
||||||
|
}//GEN-LAST:event_removeExtButtonActionPerformed
|
||||||
|
|
||||||
private void updateMimeList() {
|
private void updateMimeList() {
|
||||||
mimeList = editableMap.keySet().toArray(new String[0]);
|
mimeList = editableMap.keySet().toArray(new String[0]);
|
||||||
}
|
}
|
||||||
@ -370,6 +480,7 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
private javax.swing.JButton addTypeButton;
|
private javax.swing.JButton addTypeButton;
|
||||||
private javax.swing.JLabel extErrorLabel;
|
private javax.swing.JLabel extErrorLabel;
|
||||||
private javax.swing.JLabel extHeaderLabel;
|
private javax.swing.JLabel extHeaderLabel;
|
||||||
|
private javax.swing.JLabel extRemoveErrLabel;
|
||||||
private javax.swing.JTable extTable;
|
private javax.swing.JTable extTable;
|
||||||
private javax.swing.JPanel extensionPanel;
|
private javax.swing.JPanel extensionPanel;
|
||||||
private javax.swing.JLabel jLabel1;
|
private javax.swing.JLabel jLabel1;
|
||||||
@ -378,6 +489,7 @@ public final class FileExtMismatchConfigPanel extends javax.swing.JPanel impleme
|
|||||||
private javax.swing.JSplitPane jSplitPane1;
|
private javax.swing.JSplitPane jSplitPane1;
|
||||||
private javax.swing.JLabel mimeErrLabel;
|
private javax.swing.JLabel mimeErrLabel;
|
||||||
private javax.swing.JPanel mimePanel;
|
private javax.swing.JPanel mimePanel;
|
||||||
|
private javax.swing.JLabel mimeRemoveErrLabel;
|
||||||
private javax.swing.JTable mimeTable;
|
private javax.swing.JTable mimeTable;
|
||||||
private javax.swing.JButton removeExtButton;
|
private javax.swing.JButton removeExtButton;
|
||||||
private javax.swing.JButton removeTypeButton;
|
private javax.swing.JButton removeTypeButton;
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 609 B |
@ -1,5 +1,5 @@
|
|||||||
#Updated by build script
|
#Updated by build script
|
||||||
#Fri, 08 Nov 2013 11:12:24 -0500
|
#Wed, 18 Dec 2013 16:55:09 -0500
|
||||||
LBL_splash_window_title=Starting Autopsy
|
LBL_splash_window_title=Starting Autopsy
|
||||||
SPLASH_HEIGHT=288
|
SPLASH_HEIGHT=288
|
||||||
SPLASH_WIDTH=538
|
SPLASH_WIDTH=538
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#Updated by build script
|
#Updated by build script
|
||||||
#Fri, 08 Nov 2013 11:12:24 -0500
|
#Wed, 18 Dec 2013 16:55:09 -0500
|
||||||
|
|
||||||
CTL_MainWindow_Title=Autopsy 3.0.8
|
CTL_MainWindow_Title=Autopsy 3.0.8
|
||||||
CTL_MainWindow_Title_No_Project=Autopsy 3.0.8
|
CTL_MainWindow_Title_No_Project=Autopsy 3.0.8
|
||||||
|
Loading…
x
Reference in New Issue
Block a user