mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
5723 fix bugs with file discovery UI
This commit is contained in:
parent
eba9e795ec
commit
f8f4515145
@ -122,6 +122,9 @@
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/filequery/Bundle.properties" key="DiscoveryTopComponent.imagesButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/images/pictures-icon.png"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
@ -146,6 +149,12 @@
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/filequery/Bundle.properties" key="DiscoveryTopComponent.videosButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="disabledIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/images/video-icon.png"/>
|
||||
</Property>
|
||||
<Property name="disabledSelectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/org/sleuthkit/autopsy/images/video-icon.png"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
|
@ -129,8 +129,10 @@ public final class DiscoveryTopComponent extends TopComponent {
|
||||
private void updateSearchSettings() {
|
||||
fileSearchPanel.resetPanel();
|
||||
imagesButton.setSelected(true);
|
||||
imagesButton.setEnabled(false);
|
||||
imagesButton.setBackground(SELECTED_COLOR);
|
||||
videosButton.setSelected(false);
|
||||
videosButton.setEnabled(true);
|
||||
videosButton.setBackground(UNSELECTED_COLOR);
|
||||
fileSearchPanel.setSelectedType(FileSearchData.FileType.IMAGE);
|
||||
}
|
||||
@ -196,6 +198,7 @@ public final class DiscoveryTopComponent extends TopComponent {
|
||||
|
||||
imagesButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/pictures-icon.png"))); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(imagesButton, org.openide.util.NbBundle.getMessage(DiscoveryTopComponent.class, "DiscoveryTopComponent.imagesButton.text")); // NOI18N
|
||||
imagesButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/pictures-icon.png"))); // NOI18N
|
||||
imagesButton.setFocusable(false);
|
||||
imagesButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
imagesButton.setMaximumSize(new java.awt.Dimension(90, 43));
|
||||
@ -210,6 +213,8 @@ public final class DiscoveryTopComponent extends TopComponent {
|
||||
|
||||
videosButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(videosButton, org.openide.util.NbBundle.getMessage(DiscoveryTopComponent.class, "DiscoveryTopComponent.videosButton.text")); // NOI18N
|
||||
videosButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N
|
||||
videosButton.setDisabledSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N
|
||||
videosButton.setFocusable(false);
|
||||
videosButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
videosButton.setMaximumSize(new java.awt.Dimension(90, 43));
|
||||
@ -244,8 +249,10 @@ public final class DiscoveryTopComponent extends TopComponent {
|
||||
private void imagesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_imagesButtonActionPerformed
|
||||
resetTopComponent();
|
||||
imagesButton.setSelected(true);
|
||||
imagesButton.setEnabled(false);
|
||||
imagesButton.setBackground(SELECTED_COLOR);
|
||||
videosButton.setSelected(false);
|
||||
videosButton.setEnabled(true);
|
||||
videosButton.setBackground(UNSELECTED_COLOR);
|
||||
fileSearchPanel.setSelectedType(FileSearchData.FileType.IMAGE);
|
||||
}//GEN-LAST:event_imagesButtonActionPerformed
|
||||
@ -253,8 +260,10 @@ public final class DiscoveryTopComponent extends TopComponent {
|
||||
private void videosButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_videosButtonActionPerformed
|
||||
resetTopComponent();
|
||||
imagesButton.setSelected(false);
|
||||
imagesButton.setEnabled(true);
|
||||
imagesButton.setBackground(UNSELECTED_COLOR);
|
||||
videosButton.setSelected(true);
|
||||
videosButton.setEnabled(false);
|
||||
videosButton.setBackground(SELECTED_COLOR);
|
||||
fileSearchPanel.setSelectedType(FileSearchData.FileType.VIDEO);
|
||||
}//GEN-LAST:event_videosButtonActionPerformed
|
||||
|
@ -509,11 +509,8 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
* @param type The type of File to be found by the search.
|
||||
*/
|
||||
void setSelectedType(FileType type) {
|
||||
if (type.equals(fileType)) {
|
||||
//change the size filter if the type changed
|
||||
setUpSizeFilter();
|
||||
}
|
||||
fileType = type;
|
||||
setUpSizeFilter();
|
||||
if (fileType == FileType.IMAGE) {
|
||||
imagesSelected(true, true);
|
||||
} else if (fileType == FileType.VIDEO) {
|
||||
@ -567,10 +564,10 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener
|
||||
* @param list
|
||||
*/
|
||||
private void addListeners(JCheckBox checkBox, JList<?> list) {
|
||||
if (checkBox != null && checkBox.getActionListeners().length == 0) {
|
||||
if (checkBox != null) {
|
||||
checkBox.addActionListener(this);
|
||||
}
|
||||
if (list != null && list.getListSelectionListeners().length == 0) {
|
||||
if (list != null) {
|
||||
list.addListSelectionListener(new ListSelectionListener() {
|
||||
@Override
|
||||
public void valueChanged(ListSelectionEvent evt) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user