|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.jface.dialogs.TrayDialog
org.eclipse.ui.dialogs.SelectionDialog
org.eclipse.ui.dialogs.SelectionStatusDialog
org.eclipse.ui.dialogs.FilteredItemsSelectionDialog
org.eclipse.ui.dialogs.FilteredResourcesSelectionDialog
Shows a list of resources to the user with a text entry field for a string pattern used to filter the list of resources.
| Nested Class Summary | |
|---|---|
protected class |
FilteredResourcesSelectionDialog.ResourceFilter
Filters resources using pattern and showDerived flag. |
| Nested classes inherited from class org.eclipse.ui.dialogs.FilteredItemsSelectionDialog |
|---|
FilteredItemsSelectionDialog.AbstractContentProvider, FilteredItemsSelectionDialog.ItemsFilter, FilteredItemsSelectionDialog.SelectionHistory |
| Nested classes inherited from class org.eclipse.jface.window.Window |
|---|
Window.IExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class org.eclipse.ui.dialogs.FilteredItemsSelectionDialog |
|---|
CARET_BEGINNING, FULL_SELECTION, NONE |
| Fields inherited from class org.eclipse.jface.dialogs.Dialog |
|---|
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS |
| Fields inherited from class org.eclipse.jface.window.Window |
|---|
CANCEL, OK |
| Constructor Summary | |
|---|---|
FilteredResourcesSelectionDialog(Shell shell,
boolean multi,
IContainer container,
int typesMask)
Creates a new instance of the class |
|
| Method Summary | |
|---|---|
protected void |
applyFilter()
Applies the filter created by createFilter() method to the
items list. |
protected Control |
createExtendedContentArea(Composite parent)
Creates an extra content area, which will be located above the details. |
protected FilteredItemsSelectionDialog.ItemsFilter |
createFilter()
Creates an instance of a filter. |
protected void |
fillContentProvider(FilteredItemsSelectionDialog.AbstractContentProvider contentProvider,
FilteredItemsSelectionDialog.ItemsFilter itemsFilter,
IProgressMonitor progressMonitor)
Fills the content provider with matching items. |
protected void |
fillViewMenu(IMenuManager menuManager)
Fills the menu of the dialog. |
protected IDialogSettings |
getDialogSettings()
Returns the dialog settings. |
String |
getElementName(Object item)
Returns name for then given object. |
protected Comparator |
getItemsComparator()
Returns comparator to sort items inside content provider. |
Object[] |
getResult()
Returns the list of selections made by the user, or null
if the selection was canceled. |
int |
open()
Opens this window, creating it first if it has not yet been created. |
protected void |
restoreDialog(IDialogSettings settings)
Restores dialog using persisted settings. |
void |
setTitle(String title)
Sets the title for this dialog. |
protected void |
storeDialog(IDialogSettings settings)
Stores dialog settings. |
protected IStatus |
validateItem(Object item)
Validates the item. |
| Methods inherited from class org.eclipse.ui.dialogs.SelectionStatusDialog |
|---|
configureShell, createButtonBar, getFirstResult, setImage, setResult, setStatusLineAboveButtons, updateButtonsEnableState |
| Methods inherited from class org.eclipse.ui.dialogs.SelectionDialog |
|---|
createButtonsForButtonBar, createMessageArea, getDialogBoundsStrategy, getInitialElementSelections, getInitialSelections, getMessage, getOkButton, setDialogBoundsSettings, setInitialElementSelections, setInitialSelections, setMessage, setResult, setSelectionResult |
| Methods inherited from class org.eclipse.jface.dialogs.TrayDialog |
|---|
closeTray, createHelpControl, getLayout, getTray, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FilteredResourcesSelectionDialog(Shell shell,
boolean multi,
IContainer container,
int typesMask)
shell - the parent shellmulti - the multi selection flagcontainer - the containertypesMask - the types mask| Method Detail |
public void setTitle(String title)
SelectionDialog
setTitle in class SelectionDialogtitle - the titleprotected IDialogSettings getDialogSettings()
FilteredItemsSelectionDialog
getDialogSettings in class FilteredItemsSelectionDialogprotected void storeDialog(IDialogSettings settings)
FilteredItemsSelectionDialog
storeDialog in class FilteredItemsSelectionDialogsettings - settings used to store dialogprotected void restoreDialog(IDialogSettings settings)
FilteredItemsSelectionDialog
restoreDialog in class FilteredItemsSelectionDialogsettings - settings used to restore dialogprotected void fillViewMenu(IMenuManager menuManager)
FilteredItemsSelectionDialog
fillViewMenu in class FilteredItemsSelectionDialogmenuManager - the menu managerprotected Control createExtendedContentArea(Composite parent)
FilteredItemsSelectionDialog
createExtendedContentArea in class FilteredItemsSelectionDialogparent - parent to create the dialog widgets in
public Object[] getResult()
SelectionDialognull
if the selection was canceled.
getResult in class SelectionDialognull if Cancel
was pressedpublic int open()
Window
If this window has been configured to block on open (
setBlockOnOpen), this method waits until the window is
closed by the end user, and then it returns the window's return code;
otherwise, this method returns immediately. A window's return codes are
window-specific, although two standard return codes are predefined:
OK and CANCEL.
open in class WindowWindow.create()public String getElementName(Object item)
FilteredItemsSelectionDialog
getElementName in class FilteredItemsSelectionDialogitem - an object from the content provider. Subclasses should pay
attention to the passed argument. They should either only pass
objects of a known type (one used in content provider) or make
sure that passed parameter is the expected one (by type
checking like instanceof inside the method).
protected IStatus validateItem(Object item)
FilteredItemsSelectionDialog
validateItem in class FilteredItemsSelectionDialogitem - an item to be checked
protected FilteredItemsSelectionDialog.ItemsFilter createFilter()
FilteredItemsSelectionDialog
createFilter in class FilteredItemsSelectionDialognull,
no filtering will be applied then, causing no item to be shown in
the list.protected void applyFilter()
FilteredItemsSelectionDialogcreateFilter() method to the
items list. When new filter is different than previous one it will cause
refiltering.
applyFilter in class FilteredItemsSelectionDialogprotected Comparator getItemsComparator()
FilteredItemsSelectionDialogcompare(java.lang.Object, java.lang.Object) are going to
be the same type as the one used in the content provider.
getItemsComparator in class FilteredItemsSelectionDialog
protected void fillContentProvider(FilteredItemsSelectionDialog.AbstractContentProvider contentProvider,
FilteredItemsSelectionDialog.ItemsFilter itemsFilter,
IProgressMonitor progressMonitor)
throws CoreException
FilteredItemsSelectionDialog
fillContentProvider in class FilteredItemsSelectionDialogcontentProvider - collector to add items to.
FilteredItemsSelectionDialog.AbstractContentProvider.add(Object, FilteredItemsSelectionDialog.ItemsFilter)
only adds items that pass the given itemsFilter.itemsFilter - the items filterprogressMonitor - must be used to report search progress. The state of this
progress monitor reflects the state of the filtering process.
CoreException
|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.