Package de.uka.ipd.sdq.dialogs.selection
Class SelectEObjectDialog
- java.lang.Object
-
- org.eclipse.jface.window.Window
-
- org.eclipse.jface.dialogs.Dialog
-
- org.eclipse.jface.dialogs.TrayDialog
-
- org.eclipse.jface.dialogs.TitleAreaDialog
-
- de.uka.ipd.sdq.dialogs.selection.SelectEObjectDialog
-
- All Implemented Interfaces:
IShellProvider
public class SelectEObjectDialog extends TitleAreaDialog
-
-
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.TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGE
-
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
Constructors Constructor Description SelectEObjectDialog(Shell parentShell, String resourceName, Object input, AdapterFactoryContentProvider contentProvider, IBaseLabelProvider labelProvider)
Create the dialog
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
cancelPressed()
protected void
configureShell(Shell newShell)
protected void
createButtonsForButtonBar(Composite parent)
protected Control
createDialogArea(Composite parent)
void
enableToolBar(Boolean addEnabled, Boolean deleteEnabled, Boolean editedEnabled)
Activated an action border with that actions: Insert, an editing, deletion.protected Point
getInitialSize()
Return the initial size of the dialogEObject
getResult()
EObject
getRootOfResult()
TreeViewer
getTreeViewer()
Object
getViewerRootElement()
The method supplies the main knots of, in this dialogue the represented, tree.int
open()
protected void
setAddSelectionListener(SelectionListener listener)
protected void
setDeleteSelectionListener(SelectionListener listener)
protected void
setEditeSelectionListener(SelectionListener listener)
void
setProvidedService(Class<?> providedService)
The function makes possible for validation a selected type element in in the dialogue.void
setViewerContentProvider(IContentProvider provider)
void
setViewerLabelProvider(IBaseLabelProvider labelProvider)
-
Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
createContents, getErrorMessage, getMessage, getTitleArea, getTitleImageLabel, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImage
-
Methods inherited from class org.eclipse.jface.dialogs.TrayDialog
closeTray, createButtonBar, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
-
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, 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
-
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
-
-
-
Constructor Detail
-
SelectEObjectDialog
public SelectEObjectDialog(Shell parentShell, String resourceName, Object input, AdapterFactoryContentProvider contentProvider, IBaseLabelProvider labelProvider)
Create the dialog
-
-
Method Detail
-
configureShell
protected void configureShell(Shell newShell)
- Overrides:
configureShell
in classWindow
-
createDialogArea
protected Control createDialogArea(Composite parent)
- Overrides:
createDialogArea
in classTitleAreaDialog
-
createButtonsForButtonBar
protected void createButtonsForButtonBar(Composite parent)
- Overrides:
createButtonsForButtonBar
in classDialog
-
cancelPressed
protected void cancelPressed()
- Overrides:
cancelPressed
in classDialog
-
getInitialSize
protected Point getInitialSize()
Return the initial size of the dialog- Overrides:
getInitialSize
in classTitleAreaDialog
-
enableToolBar
public void enableToolBar(Boolean addEnabled, Boolean deleteEnabled, Boolean editedEnabled)
Activated an action border with that actions: Insert, an editing, deletion.- Parameters:
addEnabled
- - the new enabled state of insert action deleteEnabled - the new enabled state of delete actio editedEnabled - the new enabled state of edited action If a Action is activated, one must set additionally a SelectionListener- See Also:
de.uka.ipd.sdq.dialogs#setAddSelectionListener(SelectionListener)
-
setAddSelectionListener
protected void setAddSelectionListener(SelectionListener listener)
-
setDeleteSelectionListener
protected void setDeleteSelectionListener(SelectionListener listener)
-
setEditeSelectionListener
protected void setEditeSelectionListener(SelectionListener listener)
-
setProvidedService
public void setProvidedService(Class<?> providedService)
The function makes possible for validation a selected type element in in the dialogue. If provided service is set, OK button activated only if selected element agrees with entered type. The function must be called forwards open() function!- Parameters:
providedService
- - return type of dialog
-
getTreeViewer
public TreeViewer getTreeViewer()
-
getResult
public EObject getResult()
-
getViewerRootElement
public Object getViewerRootElement()
The method supplies the main knots of, in this dialogue the represented, tree.- Returns:
- the viewer root element
-
getRootOfResult
public EObject getRootOfResult()
-
setViewerLabelProvider
public void setViewerLabelProvider(IBaseLabelProvider labelProvider)
-
setViewerContentProvider
public void setViewerContentProvider(IContentProvider provider)
-
-