mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Make the KeywordSearch toolbar be singleton and initialized once.
This commit is contained in:
parent
e8d16d5588
commit
97bfac96dc
@ -31,6 +31,6 @@ public final class KeywordSearchAction extends AbstractAction implements Present
|
||||
|
||||
@Override
|
||||
public Component getToolbarPresenter() {
|
||||
return new KeywordSearchPanel();
|
||||
return KeywordSearchPanel.getDefault();
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.1" encoding="UTF-8" ?>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<NonVisualComponents>
|
||||
@ -88,10 +88,7 @@
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="listsButton" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
<Component id="listsButton" alignment="1" max="32767" attributes="1"/>
|
||||
<Component id="searchBoxPanel" alignment="0" pref="27" max="32767" attributes="2"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -125,9 +122,9 @@
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="searchBox" alignment="0" pref="25" max="32767" attributes="3"/>
|
||||
<Component id="settingsLabel" alignment="0" pref="25" max="32767" attributes="1"/>
|
||||
<Component id="searchButton" alignment="0" pref="25" max="32767" attributes="1"/>
|
||||
<Component id="searchBox" alignment="0" max="32767" attributes="3"/>
|
||||
<Component id="settingsLabel" alignment="0" max="32767" attributes="1"/>
|
||||
<Component id="searchButton" alignment="0" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
|
@ -52,13 +52,24 @@ public class KeywordSearchPanel extends AbstractKeywordSearchPerformer {
|
||||
private KeywordPropertyChangeListener listener;
|
||||
private boolean active = false;
|
||||
private boolean entered = false;
|
||||
private static KeywordSearchPanel instance;
|
||||
|
||||
/** Creates new form KeywordSearchPanel */
|
||||
public KeywordSearchPanel() {
|
||||
private KeywordSearchPanel() {
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the default instance KeywordSearchPanel
|
||||
*/
|
||||
public static KeywordSearchPanel getDefault() {
|
||||
if (instance == null) {
|
||||
instance = new KeywordSearchPanel();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
|
||||
listener = new KeywordPropertyChangeListener();
|
||||
|
Loading…
x
Reference in New Issue
Block a user