public class BrowseHandler2
extends java.lang.Object
BrowseHandler2
is responsible for displaying
a popup list for the text field, or displaying the results
in the supplied list box.This class is based on
oracle.jdeveloper.dialogs.BrowseHandler
but it does not change the contents of the passed in text field
during its operation, and does not work with a JList.BrowseHandler
Modifier and Type | Method and Description |
---|---|
static BrowseHandler2 |
createClassBrowserList(JavaManager javaManager,
javax.swing.JTextField textField)
Creates a
BrowseHandler2 that finds matching classes
based on the search text in the supplied text field. |
static BrowseHandler2 |
createClassBrowserList(JavaManager javaManager,
javax.swing.JTextField textField,
ClassNameFilter classFilter)
Creates a
BrowseHandler2 that finds matching classes
based on the search text in the supplied text field. |
static BrowseHandler2 |
createClassBrowserPopup(JavaManager javaManager,
javax.swing.JTextField textField,
java.awt.event.ActionListener actionListener)
Constructs a new
BrowseHandler2 for classes only
which displays a popup list attached to the supplied text field. |
static BrowseHandler2 |
createClassPackageBrowserList(JavaManager javaManager,
javax.swing.JTextField textField)
Creates a
BrowseHandler2 that finds matching classes
and packages based on the search text in the supplied text field. |
static BrowseHandler2 |
createClassPackageBrowserList(JavaManager javaManager,
javax.swing.JTextField textField,
ClassNameFilter classFilter,
PackageNameFilter packageFilter)
Creates a
BrowseHandler2 that finds matching classes
and packages based on the search text in the supplied text field. |
static BrowseHandler2 |
createClassPackageBrowserPopup(JavaManager javaManager,
javax.swing.JTextField textField,
java.awt.event.ActionListener actionListener)
Constructs a new
BrowseHandler2 for classes and packages
which displays a popup list attached to the supplied text field. |
static BrowseHandler2 |
createPackageBrowserList(JavaManager javaManager,
javax.swing.JTextField textField)
Creates a
BrowseHandler2 that finds matching packages
based on the search text in the supplied text field. |
static BrowseHandler2 |
createPackageBrowserList(JavaManager javaManager,
javax.swing.JTextField textField,
PackageNameFilter packageFilter)
Creates a
BrowseHandler2 that finds matching packages
based on the search text in the supplied text field. |
static BrowseHandler2 |
createPackageBrowserPopup(JavaManager javaManager,
javax.swing.JTextField textField,
java.awt.event.ActionListener actionListener)
Constructs a new
BrowseHandler2 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 |
isShowPopupOnFocus()
If true the popup will be attempted to be displayed when the text field
gains focus.
|
void |
setCopyQualifiedClassNameToField(boolean copyQualifiedClassNameToField) |
void |
setShowPopupOnFocus(boolean showPopupOnFocus)
If true the popup will be attempted to be displayed when the text field
gains focus.
|
public static BrowseHandler2 createClassBrowserPopup(JavaManager javaManager, javax.swing.JTextField textField, java.awt.event.ActionListener actionListener)
BrowseHandler2
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 listBrowseHandler2
public static BrowseHandler2 createPackageBrowserPopup(JavaManager javaManager, javax.swing.JTextField textField, java.awt.event.ActionListener actionListener)
BrowseHandler2
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 listBrowseHandler2
public static BrowseHandler2 createClassPackageBrowserPopup(JavaManager javaManager, javax.swing.JTextField textField, java.awt.event.ActionListener actionListener)
BrowseHandler2
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 listBrowseHandler2
public static BrowseHandler2 createClassBrowserList(JavaManager javaManager, javax.swing.JTextField textField)
BrowseHandler2
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 withBrowseHandler2
public static BrowseHandler2 createClassBrowserList(JavaManager javaManager, javax.swing.JTextField textField, ClassNameFilter classFilter)
BrowseHandler2
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 withclassFilter
- the ClassNameFilter to use for filtering classes,
or null
to use the default filter,
ClassPackageNamePrefixFilter
BrowseHandler2
ClassNameFilter
,
ClassPackageNamePrefixFilter
public static BrowseHandler2 createPackageBrowserList(JavaManager javaManager, javax.swing.JTextField textField)
BrowseHandler2
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 withBrowseHandler2
public static BrowseHandler2 createPackageBrowserList(JavaManager javaManager, javax.swing.JTextField textField, PackageNameFilter packageFilter)
BrowseHandler2
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 withpackageFilter
- the PackageNameFilter to use for filtering packages,
or null
to use the default filter,
ClassPackageNamePrefixFilter
BrowseHandler2
ClassPackageNamePrefixFilter
,
PackageNameFilter
public static BrowseHandler2 createClassPackageBrowserList(JavaManager javaManager, javax.swing.JTextField textField)
BrowseHandler2
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 withBrowseHandler2
public static BrowseHandler2 createClassPackageBrowserList(JavaManager javaManager, javax.swing.JTextField textField, ClassNameFilter classFilter, PackageNameFilter packageFilter)
BrowseHandler2
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 withclassFilter
- 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,
ClassPackageNamePrefixFilter
BrowseHandler2
ClassNameFilter
,
ClassPackageNamePrefixFilter
,
PackageNameFilter
public void dispose()
public java.lang.String getSelectedItem()
public boolean isCopyQualifiedClassNameToField()
public void setCopyQualifiedClassNameToField(boolean copyQualifiedClassNameToField)
public void setShowPopupOnFocus(boolean showPopupOnFocus)
showPopupOnFocus
- public boolean isShowPopupOnFocus()