Package com._1c.g5.v8.dt.ui.dialog
Class ListItemSelectionDialog
- 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
-
- com._1c.g5.v8.dt.ui.dialog.ListItemSelectionDialog
-
- All Implemented Interfaces:
ISwtSelectionDialog
,org.eclipse.jface.window.IShellProvider
public class ListItemSelectionDialog extends ItemSelectionDialog
Common dialog for single/multiple item selection. Items are displayed on a tableviewer as list. In order to display icons and names this class needs a special label provider instance. Content provider receives context variable as input
-
-
Field Summary
Fields Modifier and Type Field Description protected TableViewer
elementsTableViewer
-
Fields inherited from class com._1c.g5.v8.dt.ui.dialog.ItemSelectionDialog
contentProvider, context, dialogValidator, labelProvider, multiselect, selection
-
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
-
-
Constructor Summary
Constructors Constructor Description ListItemSelectionDialog(org.eclipse.swt.widgets.Shell parentShell, Object context, IStructuredSelection selection, ILabelProvider labelProvider, IStructuredContentProvider contentProvider, String windowTitle, boolean multiselect, boolean editable)
Constructor for creating list item selection dialog, withoutIElementComparer
comparer.ListItemSelectionDialog(org.eclipse.swt.widgets.Shell parentShell, Object context, IStructuredSelection selection, ILabelProvider labelProvider, IStructuredContentProvider contentProvider, IElementComparer comparer, String windowTitle, boolean multiselect, boolean editable)
Constructor for creating list item selection dialog.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.swt.widgets.Control
createDialogControls(org.eclipse.swt.widgets.Composite parent)
Creates dialog area according to used constructor: multi or single selectprotected ViewerComparator
getViewerComparator()
Viewer comparator for sort elements (optional)protected void
updateSelection()
Updates selection that will be returned by getSelection()-
Methods inherited from class com._1c.g5.v8.dt.ui.dialog.ItemSelectionDialog
configureShell, createButtonBar, createDialogArea, getInitialSize, getResult, getSelection, okPressed, setDialogValidator
-
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, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
-
Methods 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, 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, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.ui.dialog.ISwtSelectionDialog
open
-
-
-
-
Field Detail
-
elementsTableViewer
protected TableViewer elementsTableViewer
-
-
Constructor Detail
-
ListItemSelectionDialog
public ListItemSelectionDialog(org.eclipse.swt.widgets.Shell parentShell, Object context, IStructuredSelection selection, ILabelProvider labelProvider, IStructuredContentProvider contentProvider, String windowTitle, boolean multiselect, boolean editable)
Constructor for creating list item selection dialog, withoutIElementComparer
comparer.- Parameters:
parentShell
- - parent shell. (Can not benull
).context
- - context owner of item. (Can not benull
).selection
- - IStructuredSelection that contains selected item (s). (Can not benull
).labelProvider
- - label provider for viewer. (Can not benull
).contentProvider
- - content provider for viewer. (Can not benull
).windowTitle
- - title of the window. (Thenull
value supports).multivalue
- - flag, indicating that dialog supports or not multiselectioneditable
- - the editable state,true
if this model is editable,false
otherwise
-
ListItemSelectionDialog
public ListItemSelectionDialog(org.eclipse.swt.widgets.Shell parentShell, Object context, IStructuredSelection selection, ILabelProvider labelProvider, IStructuredContentProvider contentProvider, IElementComparer comparer, String windowTitle, boolean multiselect, boolean editable)
Constructor for creating list item selection dialog.- Parameters:
parentShell
- - parent shell. (Can not benull
).context
- - context owner of item. (Can not benull
).selection
- - IStructuredSelection that contains selected item (s). (Can not benull
).labelProvider
- - label provider for viewer. (Can not benull
).contentProvider
- - content provider for viewer. (Can not benull
).comparer
- - the element comparer. (Thenull
is valid).windowTitle
- - title of the window. (Thenull
is valid).multivalue
- - flag, indicating that dialog supports or not multiselectioneditable
- - the editable state,true
if this model is editable,false
otherwise
-
-
Method Detail
-
getViewerComparator
protected ViewerComparator getViewerComparator()
Viewer comparator for sort elements (optional)- Returns:
- a
ViewerComparator
, ornull
if none
-
createDialogControls
protected org.eclipse.swt.widgets.Control createDialogControls(org.eclipse.swt.widgets.Composite parent)
Creates dialog area according to used constructor: multi or single select- Specified by:
createDialogControls
in classItemSelectionDialog
- Parameters:
parent
- - parent composite- Returns:
- dialog area control
-
updateSelection
protected void updateSelection()
Description copied from class:ItemSelectionDialog
Updates selection that will be returned by getSelection()- Specified by:
updateSelection
in classItemSelectionDialog
-
-