Class RelativePathSelectionDialog
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.csstudio.opibuilder.visualparts.RelativePathSelectionDialog
- All Implemented Interfaces:
IShellProvider,Listener
This class represents a Dialog to choose a file in the workspace. There is an option to return relative path.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
Window.IExceptionHandler -
Field Summary
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, ELLIPSISFields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred -
Constructor Summary
ConstructorsConstructorDescriptionRelativePathSelectionDialog(Shell parentShell, IPath refPath, String dialogMessage, String[] fileExtensions) Creates an input dialog with OK and Cancel buttons. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureShell(Shell shell) protected ControlcreateDialogArea(Composite parent) Returns the path to the selected resource.voidhandleEvent(Event event) protected voidvoidsetSelectedResource(String path) Sets the initially selected resource.Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createButtonsForButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenTextMethods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
Constructor Details
-
RelativePathSelectionDialog
public RelativePathSelectionDialog(Shell parentShell, IPath refPath, String dialogMessage, String[] fileExtensions) Creates an input dialog with OK and Cancel buttons. Note that the dialog will have no visual representation (no widgets) until it is told to open.Note that the
openmethod blocks for input dialogs.- Parameters:
parentShell- the parent shell, ornullto create a top-level shellrefPath- the reference path which doesn't include the file name.dialogMessage- the dialog message, ornullif nonefileExtensions- the file extensions of files to show in the dialog. Use an empty array ornullto show only containers (folders).
-
-
Method Details
-
setSelectedResource
Sets the initially selected resource. Must be called before the dialog is displayed.- Parameters:
path- the path to the initially selected resource.
-
configureShell
- Overrides:
configureShellin classWindow
-
createDialogArea
- Overrides:
createDialogAreain classDialog
-
okPressed
protected void okPressed() -
getSelectedResource
Returns the path to the selected resource.- Returns:
- the path to the selected resource, or
nullif no resource was selected.
-
handleEvent
- Specified by:
handleEventin interfaceListener
-