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
|
@Override
|
||||||
public Component getToolbarPresenter() {
|
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">
|
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||||
<NonVisualComponents>
|
<NonVisualComponents>
|
||||||
@ -88,10 +88,7 @@
|
|||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Component id="listsButton" alignment="1" max="32767" attributes="1"/>
|
||||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
|
||||||
<Component id="listsButton" max="32767" attributes="1"/>
|
|
||||||
</Group>
|
|
||||||
<Component id="searchBoxPanel" alignment="0" pref="27" max="32767" attributes="2"/>
|
<Component id="searchBoxPanel" alignment="0" pref="27" max="32767" attributes="2"/>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
@ -125,9 +122,9 @@
|
|||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="searchBox" alignment="0" pref="25" max="32767" attributes="3"/>
|
<Component id="searchBox" alignment="0" max="32767" attributes="3"/>
|
||||||
<Component id="settingsLabel" alignment="0" pref="25" max="32767" attributes="1"/>
|
<Component id="settingsLabel" alignment="0" max="32767" attributes="1"/>
|
||||||
<Component id="searchButton" alignment="0" pref="25" max="32767" attributes="1"/>
|
<Component id="searchButton" alignment="0" max="32767" attributes="1"/>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
@ -52,13 +52,24 @@ public class KeywordSearchPanel extends AbstractKeywordSearchPerformer {
|
|||||||
private KeywordPropertyChangeListener listener;
|
private KeywordPropertyChangeListener listener;
|
||||||
private boolean active = false;
|
private boolean active = false;
|
||||||
private boolean entered = false;
|
private boolean entered = false;
|
||||||
|
private static KeywordSearchPanel instance;
|
||||||
|
|
||||||
/** Creates new form KeywordSearchPanel */
|
/** Creates new form KeywordSearchPanel */
|
||||||
public KeywordSearchPanel() {
|
private KeywordSearchPanel() {
|
||||||
initComponents();
|
initComponents();
|
||||||
customizeComponents();
|
customizeComponents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the default instance KeywordSearchPanel
|
||||||
|
*/
|
||||||
|
public static KeywordSearchPanel getDefault() {
|
||||||
|
if (instance == null) {
|
||||||
|
instance = new KeywordSearchPanel();
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
private void customizeComponents() {
|
private void customizeComponents() {
|
||||||
|
|
||||||
listener = new KeywordPropertyChangeListener();
|
listener = new KeywordPropertyChangeListener();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user