Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.ui.dialogs
Class ResourceListSelectionDialog

    java.lang.Object
      org.eclipse.jface.window.Window
          org.eclipse.jface.dialogs.Dialog
              org.eclipse.ui.dialogs.SelectionDialog
                  org.eclipse.ui.dialogs.ResourceListSelectionDialog

public class ResourceListSelectionDialog
extends SelectionDialog

Shows a list of resources to the user with a text entry field for a string pattern used to filter the list of resources.

Since:
  2.1

Nested Class Summary

Nested classes inherited from class org.eclipse.jface.window.Window
`Window.IExceptionHandler`

Field Summary

Fields inherited from class org.eclipse.jface.dialogs.Dialog
`blockedHandler, buttonBar, dialogArea, DLG_IMG_ERROR, 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
`ResourceListSelectionDialog(Shell parentShell, IContainer container, int typeMask)` Creates a new instance of the class.
`ResourceListSelectionDialog(Shell parentShell, IResource[] resources)` Creates a new instance of the class.

Method Summary
`protected String` | `adjustPattern()` Adjust the pattern string for matching.
`protected void` | `cancelPressed()` Notifies that the cancel button of this dialog has been pressed.
`boolean` | `close()` Closes this window, disposes its shell, and removes this window from its window manager (if it has one).
`void` | `create()` Creates this window's widgetry in a new top-level shell.
`protected Control` | `createDialogArea(Composite parent)` Creates the contents of this dialog, initializes the listener and the update thread.
`protected void` | `okPressed()` The user has selected a resource and the dialog is closing.
`protected boolean` | `select(IResource resource)` Use this method to further filter resources.

Methods inherited from class org.eclipse.ui.dialogs.SelectionDialog
`configureShell, createButtonsForButtonBar, createMessageArea, getInitialElementSelections, getInitialSelections, getMessage, getOkButton, getResult, setInitialElementSelections, setInitialSelections, setMessage, setResult, setSelectionResult, setTitle`

Methods inherited from class org.eclipse.jface.dialogs.Dialog
`applyDialogFont, buttonPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, createButton, createButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getOKButton, initializeBounds, initializeDialogUnits, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText`

Methods inherited from class org.eclipse.jface.window.Window
`canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getInitialLocation, getInitialSize, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setExceptionHandler, setReturnCode, setShellStyle, setWindowManager`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ResourceListSelectionDialog

    public ResourceListSelectionDialog(Shell parentShell,
                                       IResource[] resources)

  Creates a new instance of the class.

Parameters:
  `parentShell` - shell to parent the dialog on
  `resources` - resources to display in the dialog

### ResourceListSelectionDialog

    public ResourceListSelectionDialog(Shell parentShell,
                                       IContainer container,
                                       int typeMask)

  Creates a new instance of the class. When this constructor is used to create the dialog, resources will be gathered dynamically as the pattern string is specified. Only resources of the given types that match the pattern string will be listed. To further filter the matching resources,

Parameters:
  `parentShell` - shell to parent the dialog on
  `container` - container to get resources from
  `typeMask` - mask containing IResource types to be considered
See Also:
  `select(IResource).`

Method Detail

### adjustPattern

    protected String adjustPattern()

  Adjust the pattern string for matching.

### cancelPressed

    protected void cancelPressed()

  Description copied from class: `Dialog`
  Notifies that the cancel button of this dialog has been pressed.

  The `Dialog` implementation of this framework method sets this dialog's return code to `Window.CANCEL` and closes the dialog. Subclasses may override if desired.

  Overrides:
    `cancelPressed` in class `Dialog`
  See Also:
    `Dialog.cancelPressed()`

### close

    public boolean close()

  Description copied from class: `Window`
  Closes this window, disposes its shell, and removes this window from its window manager (if it has one).

  This framework method may be extended (`super.close` must be called).

  Overrides:
    `close` in class `Dialog`
  See Also:
    `Window.close()`

### create

    public void create()

  Description copied from class: `Window`
  Creates this window's widgetry in a new top-level shell.

  The default implementation of this framework method creates this window's shell (by calling `createShell`), and its controls (by calling `createContents`), then initializes this window's shell bounds (by calling `initializeBounds`).

  Overrides:
    `create` in class `Dialog`
  See Also:
    `Window.create()`

### createDialogArea

    protected Control createDialogArea(Composite parent)

  Creates the contents of this dialog, initializes the listener and the update thread.

  Overrides:
    `createDialogArea` in class `Dialog`
  Parameters:
    `parent` - parent to create the dialog widgets in
  Returns:
    the dialog area control

### okPressed

    protected void okPressed()

  The user has selected a resource and the dialog is closing. Set the selected resource as the dialog result.

  Overrides:
    `okPressed` in class `Dialog`

### select

    protected boolean select(IResource resource)

  Use this method to further filter resources. As resources are gathered, if a resource matches the current pattern string, this method will be called. If this method answers false, the resource will not be included in the list of matches and the resource's children will NOT be considered for matching.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
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, 2004. All rights reserved.