public final class BrowseHandler
extends java.lang.Object
BrowseHandler is responsible for displaying
a popup list for the text field, or displaying the results
in the supplied list box.This class is a nearly intact copy of
oracle.jdevimpl.java.browse.BrowsePopupList| Modifier and Type | Method and Description |
|---|---|
static BrowseHandler |
createClassBrowserList(JavaManager javaManager,
javax.swing.JTextField textField,
javax.swing.JList list)
Creates a
BrowseHandler that finds matching classes
based on the search text in the supplied text field. |
static BrowseHandler |
createClassBrowserList(JavaManager javaManager,
javax.swing.JTextField textField,
javax.swing.JList list,
ClassNameFilter classFilter)
Creates a
BrowseHandler that finds matching classes
based on the search text in the supplied text field. |
static BrowseHandler |
createClassBrowserPopup(JavaManager javaManager,
javax.swing.JTextField textField,
java.awt.event.ActionListener actionListener)
Constructs a new
BrowseHandler for classes only
which displays a popup list attached to the supplied text field. |
static BrowseHandler |
createClassPackageBrowserList(JavaManager javaManager,
javax.swing.JTextField textField,
javax.swing.JList list)
Creates a
BrowseHandler that finds matching classes
and packages based on the search text in the supplied text field. |
static BrowseHandler |
createClassPackageBrowserList(JavaManager javaManager,
javax.swing.JTextField textField,
javax.swing.JList list,
ClassNameFilter classFilter,
PackageNameFilter packageFilter)
Creates a
BrowseHandler that finds matching classes
and packages based on the search text in the supplied text field. |
static BrowseHandler |
createClassPackageBrowserPopup(JavaManager javaManager,
javax.swing.JTextField textField,
java.awt.event.ActionListener actionListener)
Constructs a new
BrowseHandler for classes and packages
which displays a popup list attached to the supplied text field. |
static BrowseHandler |
createPackageBrowserList(JavaManager javaManager,
javax.swing.JTextField textField,
javax.swing.JList list)
Creates a
BrowseHandler that finds matching packages
based on the search text in the supplied text field. |
static BrowseHandler |
createPackageBrowserList(JavaManager javaManager,
javax.swing.JTextField textField,
javax.swing.JList list,
PackageNameFilter packageFilter)
Creates a
BrowseHandler that finds matching packages
based on the search text in the supplied text field. |
static BrowseHandler |
createPackageBrowserPopup(JavaManager javaManager,
javax.swing.JTextField textField,
java.awt.event.ActionListener actionListener)
Constructs a new
BrowseHandler for packages only
that displays a popup list attached to the supplied text field. |
void |
dispose()
Utility routine to detach from the text field and clean up.
|
java.lang.String |
getSelectedItem()
Fetch the current selected item in the popup list.
|
boolean |
isCopyQualifiedClassNameToField() |
boolean |
isPopupVisible() |
void |
setCopyQualifiedClassNameToField(boolean copyQualifiedClassNameToField) |
public static BrowseHandler createClassBrowserPopup(JavaManager javaManager, javax.swing.JTextField textField, java.awt.event.ActionListener actionListener)
BrowseHandler for classes only
which displays a popup list attached to the supplied text field.javaManager - the JavaManager to usetextField - the text field the popup list is associated withactionListener - the dialog to dismiss (if any) when the user
double-clicks in the listBrowseHandlerpublic static BrowseHandler createPackageBrowserPopup(JavaManager javaManager, javax.swing.JTextField textField, java.awt.event.ActionListener actionListener)
BrowseHandler for packages only
that displays a popup list attached to the supplied text field.javaManager - the JavaManager to usetextField - the text field the popup list is associated withactionListener - the dialog to dismiss (if any) when the user
double-clicks in the listBrowseHandlerpublic static BrowseHandler createClassPackageBrowserPopup(JavaManager javaManager, javax.swing.JTextField textField, java.awt.event.ActionListener actionListener)
BrowseHandler for classes and packages
which displays a popup list attached to the supplied text field.javaManager - the JavaManager to usetextField - the text field the popup list is associated withactionListener - the dialog to dismiss (if any) when the user
double-clicks in the listBrowseHandlerpublic static BrowseHandler createClassBrowserList(JavaManager javaManager, javax.swing.JTextField textField, javax.swing.JList list)
BrowseHandler that finds matching classes
based on the search text in the supplied text field. Results are
shown in the supplied list.javaManager - the JavaManager to usetextField - the text field the popup list is associated withlist - the list where the results are displayedBrowseHandlerpublic static BrowseHandler createClassBrowserList(JavaManager javaManager, javax.swing.JTextField textField, javax.swing.JList list, ClassNameFilter classFilter)
BrowseHandler that finds matching classes
based on the search text in the supplied text field. Results are
shown in the supplied list.javaManager - the JavaManager to usetextField - the text field the popup list is associated withlist - the list where the results are displayedclassFilter - the ClassNameFilter to use for filtering classes,
or null to use the default filter,
ClassPackageNamePrefixFilterBrowseHandlerClassNameFilter,
ClassPackageNamePrefixFilterpublic static BrowseHandler createPackageBrowserList(JavaManager javaManager, javax.swing.JTextField textField, javax.swing.JList list)
BrowseHandler that finds matching packages
based on the search text in the supplied text field. Results are
shown in the supplied list.javaManager - the JavaManager to usetextField - the text field the popup list is associated withlist - the list where the results are displayedBrowseHandlerpublic static BrowseHandler createPackageBrowserList(JavaManager javaManager, javax.swing.JTextField textField, javax.swing.JList list, PackageNameFilter packageFilter)
BrowseHandler that finds matching packages
based on the search text in the supplied text field. Results are
shown in the supplied list.javaManager - the JavaManager to usetextField - the text field the popup list is associated withlist - the list where the results are displayedpackageFilter - the PackageNameFilter to use for filtering packages,
or null to use the default filter,
ClassPackageNamePrefixFilterBrowseHandlerClassPackageNamePrefixFilter,
PackageNameFilterpublic static BrowseHandler createClassPackageBrowserList(JavaManager javaManager, javax.swing.JTextField textField, javax.swing.JList list)
BrowseHandler that finds matching classes
and packages based on the search text in the supplied text field.
Results are shown in the supplied list.javaManager - the JavaManager to usetextField - the text field the popup list is associated withlist - the list where the results are displayedBrowseHandlerpublic static BrowseHandler createClassPackageBrowserList(JavaManager javaManager, javax.swing.JTextField textField, javax.swing.JList list, ClassNameFilter classFilter, PackageNameFilter packageFilter)
BrowseHandler that finds matching classes
and packages based on the search text in the supplied text field.
Results are shown in the supplied list.javaManager - the JavaManager to usetextField - the text field the popup list is associated withlist - the list where the results are displayedclassFilter - the ClassNameFilter to use for filtering classes,
or null to use the default filterpackageFilter - the PackageNameFilter to use for filtering packages,
or null to use the default filter,
ClassPackageNamePrefixFilterBrowseHandlerClassNameFilter,
ClassPackageNamePrefixFilter,
PackageNameFilterpublic void dispose()
public java.lang.String getSelectedItem()
public boolean isPopupVisible()
public boolean isCopyQualifiedClassNameToField()
public void setCopyQualifiedClassNameToField(boolean copyQualifiedClassNameToField)