diff --git a/openide.awt/apichanges.xml b/openide.awt/apichanges.xml
--- a/openide.awt/apichanges.xml
+++ b/openide.awt/apichanges.xml
@@ -50,6 +50,20 @@
AWT API
+
+
+ QuickSearch allows to customize of whether the quick search field should always be shown, or not.
+
+
+
+
+
+ QuickSearch.isAlwaysShown() and QuickSearch.setAlwaysShown(boolean) methods are added.
+ They can be used to change the default behavior of not showing the quick search field until something is typed.
+
+
+
+
Support for Check for Updates feature
diff --git a/openide.awt/manifest.mf b/openide.awt/manifest.mf
--- a/openide.awt/manifest.mf
+++ b/openide.awt/manifest.mf
@@ -2,5 +2,5 @@
OpenIDE-Module: org.openide.awt
OpenIDE-Module-Localizing-Bundle: org/openide/awt/Bundle.properties
AutoUpdate-Essential-Module: true
-OpenIDE-Module-Specification-Version: 7.47
+OpenIDE-Module-Specification-Version: 7.49
diff --git a/openide.awt/src/org/openide/awt/QuickSearch.java b/openide.awt/src/org/openide/awt/QuickSearch.java
--- a/openide.awt/src/org/openide/awt/QuickSearch.java
+++ b/openide.awt/src/org/openide/awt/QuickSearch.java
@@ -84,6 +84,7 @@
private final RequestProcessor rp;
private static enum QS_FIRE { UPDATE, NEXT, MAX }
private AnimationTimer animationTimer;
+ private boolean alwaysShown = false;
private QuickSearch(JComponent component, Object constraints,
Callback callback, boolean asynchronous, JMenu popupMenu) {
@@ -202,6 +203,30 @@
}
/**
+ * Test whether the quick search field is always shown.
+ * This is false
by default.
+ * @return true
when the search field is always shown,
+ * false
otherwise.
+ * @since 7.49
+ */
+ public boolean isAlwaysShown() {
+ return alwaysShown;
+ }
+
+ /**
+ * Set whether the quick search field should always be shown.
+ * @param alwaysShown true
to always show the search field,
+ * false
otherwise.
+ * @since 7.49
+ */
+ public void setAlwaysShown(boolean alwaysShown) {
+ this.alwaysShown = alwaysShown;
+ if(alwaysShown) {
+ displaySearchField();
+ }
+ }
+
+ /**
* Test whether the quick search is enabled. This is true
* by default.
* @return true
when the quick search is enabled,
@@ -322,7 +347,9 @@
searchTextField.addKeyListener(searchFieldListener);
searchTextField.addFocusListener(searchFieldListener);
searchTextField.getDocument().addDocumentListener(searchFieldListener);
-
+ if(isAlwaysShown()) {
+ displaySearchField();
+ }
}
private void displaySearchField() {
@@ -373,6 +400,10 @@
}
private void removeSearchField() {
+ if (isAlwaysShown()) {
+ searchTextField.setText("");
+ return;
+ }
if (searchPanel == null) {
return;
}