mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge pull request #3284 from zhhl/3294-enterKeyForFileSearchAttribute
3294: Enter Key works for file search by attributes
This commit is contained in:
commit
91c48b7e72
@ -37,10 +37,7 @@
|
|||||||
<Component id="filterPanel" pref="266" max="32767" attributes="0"/>
|
<Component id="filterPanel" pref="266" max="32767" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="1" attributes="0">
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
<Component id="searchButton" min="-2" max="-2" attributes="0"/>
|
<Component id="searchButton" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="102" attributes="0">
|
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="errorLabel" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
@ -70,9 +67,6 @@
|
|||||||
<ResourceString bundle="org/sleuthkit/autopsy/filesearch/Bundle.properties" key="FileSearchPanel.searchButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="org/sleuthkit/autopsy/filesearch/Bundle.properties" key="FileSearchPanel.searchButton.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="searchButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="errorLabel">
|
<Component class="javax.swing.JLabel" name="errorLabel">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
@ -27,6 +27,7 @@ package org.sleuthkit.autopsy.filesearch;
|
|||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Cursor;
|
import java.awt.Cursor;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
@ -110,7 +111,12 @@ class FileSearchPanel extends javax.swing.JPanel {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
addListenerToAll(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
search();
|
||||||
|
}
|
||||||
|
});
|
||||||
searchButton.setEnabled(isValidSearch());
|
searchButton.setEnabled(isValidSearch());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,11 +290,6 @@ class FileSearchPanel extends javax.swing.JPanel {
|
|||||||
filterPanel.setLayout(new javax.swing.BoxLayout(filterPanel, javax.swing.BoxLayout.Y_AXIS));
|
filterPanel.setLayout(new javax.swing.BoxLayout(filterPanel, javax.swing.BoxLayout.Y_AXIS));
|
||||||
|
|
||||||
searchButton.setText(org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.searchButton.text")); // NOI18N
|
searchButton.setText(org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.searchButton.text")); // NOI18N
|
||||||
searchButton.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
searchButtonActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
errorLabel.setForeground(new java.awt.Color(255, 51, 51));
|
errorLabel.setForeground(new java.awt.Color(255, 51, 51));
|
||||||
errorLabel.setText(org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.errorLabel.text")); // NOI18N
|
errorLabel.setText(org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.errorLabel.text")); // NOI18N
|
||||||
@ -311,17 +312,11 @@ class FileSearchPanel extends javax.swing.JPanel {
|
|||||||
.addComponent(filterPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 266, Short.MAX_VALUE)
|
.addComponent(filterPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 266, Short.MAX_VALUE)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
.addComponent(searchButton)
|
.addComponent(searchButton)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addComponent(errorLabel))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(errorLabel)))
|
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed
|
|
||||||
search();
|
|
||||||
}//GEN-LAST:event_searchButtonActionPerformed
|
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JLabel errorLabel;
|
private javax.swing.JLabel errorLabel;
|
||||||
private javax.swing.JPanel filterPanel;
|
private javax.swing.JPanel filterPanel;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user