Class FilePathDialogWithFilter
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.csstudio.opibuilder.visualparts.FilePathDialogWithFilter
- All Implemented Interfaces:
IShellProvider
,Listener
This class represents a Dialog to choose a file (applying or not filters) in the workspace. There is an option to
return or not 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, ELLIPSIS
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred
-
Constructor Summary
ConstructorDescriptionFilePathDialogWithFilter
(Shell parentShell, IPath refPath, String dialogMessage, String[] filters) Creates an input dialog with OK and Cancel buttons. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureShell
(Shell shell) protected Control
createDialogArea
(Composite parent) void
handleEvent
(Event event) protected void
void
setSelectedResource
(IPath 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, shortenText
Methods 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
-
FilePathDialogWithFilter
public FilePathDialogWithFilter(Shell parentShell, IPath refPath, String dialogMessage, String[] filters) 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
open
method blocks for input dialogs.- Parameters:
parentShell
- the parent shell, ornull
to create a top-level shellrefPath
- the reference path which doesn't include the file name.dialogMessage
- the dialog message, ornull
if nonefilters
-
-
-
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:
configureShell
in classWindow
-
createDialogArea
- Overrides:
createDialogArea
in classDialog
-
okPressed
protected void okPressed() -
getSelectedResource
-
handleEvent
- Specified by:
handleEvent
in interfaceListener
-