Package com._1c.g5.v8.dt.ui.dialog
Class TreeDialog
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.jface.dialogs.TrayDialog
org.eclipse.ui.dialogs.SelectionDialog
com._1c.g5.v8.dt.ui.dialog.TreeDialog
- All Implemented Interfaces:
ISwtSelectionDialog
,org.eclipse.jface.window.IShellProvider
public class TreeDialog
extends org.eclipse.ui.dialogs.SelectionDialog
implements ISwtSelectionDialog
A
Dialog
for selection from tree-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.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
ConstructorsConstructorDescriptionTreeDialog
(org.eclipse.swt.widgets.Shell parentShell, Object input, ITreeContentProvider contentProvider, ILabelProvider labelProvider, boolean showCheckboxes, boolean onlyLeafSelectable, boolean multiselectionPerRoots, int autoExpandLevel, ICheckStateListener checkStateListener, String dialogTitle, Object... selectedObjects) Creates a newTreeDialog
.TreeDialog
(org.eclipse.swt.widgets.Shell parentShell, Object input, ITreeContentProvider contentProvider, ILabelProvider labelProvider, boolean showCheckboxes, boolean onlyLeafSelectable, boolean multiselectionPerRoots, Object... selectedObjects) Creates a newTreeDialog
.TreeDialog
(org.eclipse.swt.widgets.Shell parentShell, Object input, ITreeContentProvider contentProvider, ILabelProvider labelProvider, boolean showCheckboxes, boolean onlyLeafSelectable, boolean multiselectionPerRoots, String dialogTitle, Object... selectedObjects) Creates a newTreeDialog
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
buttonPressed
(int buttonId) protected org.eclipse.swt.widgets.Control
createContents
(org.eclipse.swt.widgets.Composite parent) protected org.eclipse.swt.widgets.Control
createDialogArea
(org.eclipse.swt.widgets.Composite parent) Object[]
Returns the array of the objects obtained from content provider that is selected in the dialog.void
setComparator
(ViewerComparator comparator) Sets this viewer's comparator to be used for sorting elements.void
setElementComparer
(IElementComparer comparer) Sets element comparer.Methods inherited from class org.eclipse.ui.dialogs.SelectionDialog
configureShell, createButtonsForButtonBar, createMessageArea, getDialogBoundsSettings, getDialogBoundsStrategy, getInitialElementSelections, getInitialSelections, getMessage, getOkButton, isResizable, setDialogBoundsSettings, setInitialElementSelections, setInitialSelections, setMessage, setResult, setSelectionResult, setTitle
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, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, 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, 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
-
Constructor Details
-
TreeDialog
public TreeDialog(org.eclipse.swt.widgets.Shell parentShell, Object input, ITreeContentProvider contentProvider, ILabelProvider labelProvider, boolean showCheckboxes, boolean onlyLeafSelectable, boolean multiselectionPerRoots, String dialogTitle, Object... selectedObjects) Creates a newTreeDialog
.- Parameters:
parentShell
- - the shell, cannot benull
input
- - the input object. It's used as input for content provider, cannot benull
contentProvider
- - theITreeContentProvider
for the dialog, cannot benull
labelProvider
- - theILabelProvider
for the dialog, cannot benull
showCheckboxes
- - the value indicating whether to show checkboxes or not. It value turns multi-value mode.onlyLeafSelectable
- - the value indicating whether to allow selection from non-leaf nodes or notmultiselectionPerRoots
- - the value indicating whether to allow selection more than one element per parent node or notdialogTitle
- the dialog title, can benull
selectedObjects
- - the array of the selected objects
-
TreeDialog
public TreeDialog(org.eclipse.swt.widgets.Shell parentShell, Object input, ITreeContentProvider contentProvider, ILabelProvider labelProvider, boolean showCheckboxes, boolean onlyLeafSelectable, boolean multiselectionPerRoots, Object... selectedObjects) Creates a newTreeDialog
.- Parameters:
parentShell
- - the shell, cannot benull
input
- - the input object. It's used as input for content provider, cannot benull
contentProvider
- - theITreeContentProvider
for the dialog, cannot benull
labelProvider
- - theILabelProvider
for the dialog, cannot benull
showCheckboxes
- - the value indicating whether to show checkboxes or not. It value turns multi-value mode.onlyLeafSelectable
- - the value indicating whether to allow selection from non-leaf nodes or notmultiselectionPerRoots
- - the value indicating whether to allow selection more than one element per parent node or notselectedObjects
- - the array of the selected objects, can benull
-
TreeDialog
public TreeDialog(org.eclipse.swt.widgets.Shell parentShell, Object input, ITreeContentProvider contentProvider, ILabelProvider labelProvider, boolean showCheckboxes, boolean onlyLeafSelectable, boolean multiselectionPerRoots, int autoExpandLevel, ICheckStateListener checkStateListener, String dialogTitle, Object... selectedObjects) Creates a newTreeDialog
.- Parameters:
parentShell
- - the shell, cannot benull
input
- - the input object. It's used as input for content provider, cannot benull
contentProvider
- - theITreeContentProvider
for the dialog, cannot benull
labelProvider
- - theILabelProvider
for the dialog, cannot benull
showCheckboxes
- - the value indicating whether to show checkboxes or not. It value turns multi-value mode.onlyLeafSelectable
- - the value indicating whether to allow selection from non-leaf nodes or notmultiselectionPerRoots
- - the value indicating whether to allow selection more than one element per parent node or notautoExpandLevel
- the tree auto expand levelcheckStateListener
- the check state listener, can benull
dialogTitle
- the dialog title, can benull
selectedObjects
- - the array of the selected objects, can benull
-
-
Method Details
-
getResult
Returns the array of the objects obtained from content provider that is selected in the dialog.- Specified by:
getResult
in interfaceISwtSelectionDialog
- Overrides:
getResult
in classorg.eclipse.ui.dialogs.SelectionDialog
- Returns:
- the array of selected objects
-
setElementComparer
Sets element comparer.- Parameters:
comparer
- the element comparer, can benull
-
setComparator
Sets this viewer's comparator to be used for sorting elements.- Parameters:
comparator
- a viewer comparator, ornull
if none
-
createContents
protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent) - Overrides:
createContents
in classorg.eclipse.jface.dialogs.Dialog
-
createDialogArea
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent) - Overrides:
createDialogArea
in classorg.eclipse.jface.dialogs.Dialog
-
buttonPressed
protected void buttonPressed(int buttonId) - Overrides:
buttonPressed
in classorg.eclipse.jface.dialogs.Dialog
-