public class ResourceSelectionDialog extends TitleAreaDialog
Window.IExceptionHandler
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGE
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 |
---|
ResourceSelectionDialog(Shell parentShell)
Instantiates a new dialog to select OSLC resources.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createBrowser(Composite parent)
Creates a browser within the dialog.
|
protected void |
createButtonsForButtonBar(Composite parent)
Creates just a Cancel button, as the OK response is expected to be sent from the OSLC delegated user interface displayed within the browser.
|
protected Control |
createDialogArea(Composite parent)
Creates and returns the contents of the upper part of this dialog (above
the button bar).
|
static ResourceSelectionDialog |
forConfiguration(Shell parentShell,
Dialog globalConfigurationDialog,
Dialog localConfigurationDialog)
Creates a dialog to select an OSLC Configuration based on the specified OSLC dialogs.
|
static ResourceSelectionDialog |
forDialog(Shell parentShell,
Dialog dialog)
Creates a dialog to select OSLC resources based on the specified OSLC dialog.
|
static ResourceSelectionDialog |
forDialogs(Shell parentShell,
Collection<Dialog> dialogs)
Creates a dialog to select OSLC resources based on one of the specified OSLC dialogs.
|
static ResourceSelectionDialog |
forService(Shell parentShell,
Service service)
Creates a dialog to select OSLC resources based on one of the dialogs defined by the specified service.
|
static ResourceSelectionDialog |
forService(Shell parentShell,
Service service,
URI resourceType)
Creates a dialog to select OSLC resources based on one of the dialogs defined by the specified service, a dialog which aims at handling the
specified type of OSLC resource.
|
static ResourceSelectionDialog |
forServiceProviders(Shell parentShell,
OslcClient client,
Collection<Link> serviceProviders,
URI domain)
Creates a dialog to select OSLC resources based on one of the dialogs defined by the specified service providers.
|
static ResourceSelectionDialog |
forServiceProviders(Shell parentShell,
OslcClient client,
Collection<Link> serviceProviders,
URI domain,
URI resourceType)
Creates a dialog to select OSLC resources based on one of the dialogs defined by the specified service providers.
|
Browser |
getBrowser()
Returns the browser displayed within the dialog.
|
List<Link> |
getResult()
Returns the list of OSLC resources selected within the OSLC delegated user interface.
|
createContents, getErrorMessage, getInitialSize, getMessage, getTitleArea, getTitleImageLabel, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImage
closeTray, createButtonBar, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
canHandleShellCloseEvent, configureShell, 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 ResourceSelectionDialog(Shell parentShell)
parentShell
- the parent SWT shell.public static ResourceSelectionDialog forDialog(Shell parentShell, Dialog dialog)
parentShell
- the parent SWT shell.dialog
- an OSLC dialog which defines a URL of a web page to display and the preferred size of the browser.public static ResourceSelectionDialog forDialogs(Shell parentShell, Collection<Dialog> dialogs)
parentShell
- the parent SWT shell.dialogs
- OSLC dialogs which defines a URL of a web page to display and the preferred size of the browser.public static ResourceSelectionDialog forService(Shell parentShell, Service service)
parentShell
- the parent SWT shell.service
- the service which defines OSLC creation and selection dialogs.public static ResourceSelectionDialog forService(Shell parentShell, Service service, URI resourceType)
parentShell
- the parent SWT shell.service
- the service which defines OSLC creation and selection dialogs.resourceType
- the type of OSLC resource the dialog must define to be retained.public static ResourceSelectionDialog forServiceProviders(Shell parentShell, OslcClient client, Collection<Link> serviceProviders, URI domain)
parentShell
- the parent SWT shell.client
- an OSLC client to load service providers.serviceProviders
- the service providers the user can select.domain
- the OSLC domain which determines the OSLC dialogs to retain.public static ResourceSelectionDialog forServiceProviders(Shell parentShell, OslcClient client, Collection<Link> serviceProviders, URI domain, URI resourceType)
parentShell
- the parent SWT shell.client
- an OSLC client to load service providers.serviceProviders
- the service providers the user can select.domain
- the OSLC domain which determines the OSLC dialogs to retain.resourceType
- the type of OSLC resource the dialog must define to be retained.public static ResourceSelectionDialog forConfiguration(Shell parentShell, Dialog globalConfigurationDialog, Dialog localConfigurationDialog)
parentShell
- the parent SWT shell.globalConfigurationDialog
- an OSLC global configuration dialog allowing the selection of a global configuration (might be null
).localConfigurationDialog
- an OSLC local configuration dialog allowing the selection of a local configuration, relative to a project.public final List<Link> getResult()
protected Control createDialogArea(Composite parent)
createDialogArea
in class TitleAreaDialog
parent
- The parent composite to contain the dialog areaprotected void createBrowser(Composite parent)
parent
- The parent composite to contain the browser.getBrowser()
protected void createButtonsForButtonBar(Composite parent)
createButtonsForButtonBar
in class Dialog
public final Browser getBrowser()