Package com._1c.g5.v8.dt.ui.dialog
Class ItemSelectionDialog
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.jface.dialogs.TrayDialog
org.eclipse.jface.dialogs.TitleAreaDialog
com._1c.g5.v8.dt.ui.dialog.ItemSelectionDialog
- All Implemented Interfaces:
 ISwtSelectionDialog,org.eclipse.jface.window.IShellProvider
- Direct Known Subclasses:
 BipartiteElementsSelectionDialog,ListItemSelectionDialog
public abstract class ItemSelectionDialog
extends org.eclipse.jface.dialogs.TitleAreaDialog
implements ISwtSelectionDialog
Item selection abstract implementation. Contains methods for creating base structure of dialog,
 sets default dialog size to 400x370px, and provides methods for returning selected item(s).
 Specific dialog implementations are held in subclasses.
- 
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IContentProviderIContentProviderto be used at the dialog to provide elements to show.protected ObjectDialog elements container.protected org.eclipse.core.databinding.validation.IValidator<IStructuredSelection>IValidatorto show validation messages at the dialog if needed.protected ILabelProviderILabelProviderto be used at the dialog to provide elements presentation.protected final booleanFlag showing if multiselection is available for this dialog instance.protected IStructuredSelectionDialog selection to be returned as its result.Fields inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGEFields 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
ConstructorsConstructorDescriptionItemSelectionDialog(org.eclipse.swt.widgets.Shell parentShell, Object context, IStructuredSelection selection, ILabelProvider labelProvider, IContentProvider contentProvider, String windowTitle, boolean multiselect, boolean isEditable) Default constructor for all implementations Context object is passed to content provider to generate viewer content - 
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureShell(org.eclipse.swt.widgets.Shell newShell) protected org.eclipse.swt.widgets.ControlcreateButtonBar(org.eclipse.swt.widgets.Composite parent) protected org.eclipse.swt.widgets.ControlcreateDialogArea(org.eclipse.swt.widgets.Composite parent) protected abstract org.eclipse.swt.widgets.ControlcreateDialogControls(org.eclipse.swt.widgets.Composite parent) Creates dialog controls and handlersprotected org.eclipse.swt.graphics.PointReturns configured of minimal size of ItemSelectionDialog (400 x 370)Object[]Returns an array of objects that user chose in the dialog.protected voidSaves user selection and closes the dialogvoidsetDialogValidator(org.eclipse.core.databinding.validation.IValidator<IStructuredSelection> dialogValidator) Sets the dialog result validator.protected abstract voidUpdates selection that will be returned by getSelection()Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
createContents, getErrorMessage, getMessage, getTitleArea, getTitleImageLabel, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImageMethods inherited from class org.eclipse.jface.dialogs.TrayDialog
closeTray, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailableMethods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonsForButtonBar, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, isResizable, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenTextMethods inherited from class org.eclipse.jface.window.Window
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, setWindowManagerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com._1c.g5.v8.dt.ui.dialog.ISwtSelectionDialog
open 
- 
Field Details
- 
labelProvider
ILabelProviderto be used at the dialog to provide elements presentation. - 
contentProvider
IContentProviderto be used at the dialog to provide elements to show. - 
dialogValidator
IValidatorto show validation messages at the dialog if needed. - 
context
Dialog elements container. - 
multiselect
protected final boolean multiselectFlag showing if multiselection is available for this dialog instance. - 
selection
Dialog selection to be returned as its result. 
 - 
 - 
Constructor Details
- 
ItemSelectionDialog
public ItemSelectionDialog(org.eclipse.swt.widgets.Shell parentShell, Object context, IStructuredSelection selection, ILabelProvider labelProvider, IContentProvider contentProvider, String windowTitle, boolean multiselect, boolean isEditable) Default constructor for all implementations Context object is passed to content provider to generate viewer content- Parameters:
 parentShell- - parent shell, cannot benullcontext- - eObject feature container, cannot benullselection- - container for selected element(s), cannot benulllabelProvider- - label provider for viewer, cannot benullcontentProvider- - content provider for viewer, cannot benullwindowTitle- - dialog window title text, can benullmultiselect- - flag, indicating that dialog supports or not multiselectionisEditable- - flag indicating that dialog is in read-only editable
 
 - 
 - 
Method Details
- 
getResult
Description copied from interface:ISwtSelectionDialogReturns an array of objects that user chose in the dialog.- Specified by:
 getResultin interfaceISwtSelectionDialog- Returns:
 - the result of the dialog.
 
 - 
getSelection
- Returns:
 - IStructuredSelection that contains selected item(s) or is just empty
 
 - 
setDialogValidator
public void setDialogValidator(org.eclipse.core.databinding.validation.IValidator<IStructuredSelection> dialogValidator) Sets the dialog result validator.- Parameters:
 dialogValidator- theIValidatorobject, can be {@link null}
 - 
updateSelection
protected abstract void updateSelection()Updates selection that will be returned by getSelection() - 
createDialogControls
protected abstract org.eclipse.swt.widgets.Control createDialogControls(org.eclipse.swt.widgets.Composite parent) Creates dialog controls and handlers- Parameters:
 parent- - parent composite- Returns:
 - dialog area control
 
 - 
createDialogArea
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent) - Overrides:
 createDialogAreain classorg.eclipse.jface.dialogs.TitleAreaDialog
 - 
getInitialSize
protected org.eclipse.swt.graphics.Point getInitialSize()Returns configured of minimal size of ItemSelectionDialog (400 x 370)- Overrides:
 getInitialSizein classorg.eclipse.jface.dialogs.TitleAreaDialog
 - 
okPressed
protected void okPressed()Saves user selection and closes the dialog- Overrides:
 okPressedin classorg.eclipse.jface.dialogs.Dialog
 - 
configureShell
protected void configureShell(org.eclipse.swt.widgets.Shell newShell) - Overrides:
 configureShellin classorg.eclipse.jface.window.Window
 - 
createButtonBar
protected org.eclipse.swt.widgets.Control createButtonBar(org.eclipse.swt.widgets.Composite parent) - Overrides:
 createButtonBarin classorg.eclipse.jface.dialogs.TrayDialog
 
 -