public class ResourceListSelectionDialog extends SelectionDialog
Window.IExceptionHandler
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
CANCEL, OK, resizeHasOccurred
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
getAllowUserToToggleDerived()
Returns whether to include a "Show derived resources" checkbox in the dialog.
|
protected IDialogSettings |
getDialogBoundsSettings()
Gets the dialog settings that should be used for remembering the bounds
of the dialog, according to the dialog bounds strategy.
|
protected boolean |
getShowDerived()
Returns whether derived resources should be shown in the list.
|
protected void |
okPressed()
The user has selected a resource and the dialog is closing.
|
protected void |
refresh(boolean force)
Refreshes the filtered list of resources.
|
protected boolean |
select(IResource resource)
Use this method to further filter resources.
|
void |
setAllowUserToToggleDerived(boolean allow)
Sets whether to include a "Show derived resources" checkbox in the dialog.
|
protected void |
setShowDerived(boolean show)
Sets whether derived resources should be shown in the list.
|
protected void |
updateOKState(boolean state)
Update the enabled state of the OK button.
|
configureShell, createButtonsForButtonBar, createMessageArea, getDialogBoundsStrategy, getInitialElementSelections, getInitialSelections, getMessage, getOkButton, getResult, isResizable, setDialogBoundsSettings, setInitialElementSelections, setInitialSelections, setMessage, setResult, setSelectionResult, setTitle
closeTray, createButtonBar, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
applyDialogFont, buttonPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, createButton, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
public ResourceListSelectionDialog(Shell parentShell, IResource[] resources)
parentShell
- shell to parent the dialog onresources
- resources to display in the dialogpublic ResourceListSelectionDialog(Shell parentShell, IContainer container, int typeMask)
parentShell
- shell to parent the dialog oncontainer
- container to get resources fromtypeMask
- mask containing IResource types to be consideredselect(IResource)
protected String adjustPattern()
protected void cancelPressed()
Dialog
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.
cancelPressed
in class Dialog
Dialog.cancelPressed()
public boolean close()
Window
This framework method may be extended (super.close
must
be called).
Note that in order to prevent recursive calls to this method
it does not call Shell#close()
. As a result ShellListener
s
will not receive a shellClosed
event.
close
in class Dialog
true
if the window is (or was already) closed, and
false
if it is still openWindow.close()
public void create()
Window
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
).
create
in class Dialog
Window.create()
protected Control createDialogArea(Composite parent)
createDialogArea
in class Dialog
parent
- parent to create the dialog widgets inpublic boolean getAllowUserToToggleDerived()
false
.true
to include the checkbox, false
to omitpublic void setAllowUserToToggleDerived(boolean allow)
allow
- true
to include the checkbox, false
to omitprotected boolean getShowDerived()
false
.true
to show derived resources, false
to hide themprotected void setShowDerived(boolean show)
show
- true
to show derived resources, false
to hide themprotected void okPressed()
protected boolean select(IResource resource)
protected void refresh(boolean force)
force
- if true
a refresh is forced, if false
a refresh only
occurs if the pattern has changedprotected void updateOKState(boolean state)
state
- the new enabled state of the buttonprotected IDialogSettings getDialogBoundsSettings()
SelectionDialog
SelectionDialog.setDialogBoundsSettings(IDialogSettings, int)
.getDialogBoundsSettings
in class SelectionDialog
null
if the dialog's bounds should not be
stored.Dialog.getDialogBoundsStrategy()
,
SelectionDialog.setDialogBoundsSettings(IDialogSettings, int)
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.