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

    Constructors
    Constructor
    Description
    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 new TreeDialog.
    TreeDialog(org.eclipse.swt.widgets.Shell parentShell, Object input, ITreeContentProvider contentProvider, ILabelProvider labelProvider, boolean showCheckboxes, boolean onlyLeafSelectable, boolean multiselectionPerRoots, Object... selectedObjects)
    Creates a new TreeDialog.
    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 new TreeDialog.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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)
     
    Returns the array of the objects obtained from content provider that is selected in the dialog.
    void
    Sets this viewer's comparator to be used for sorting elements.
    void
    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 new TreeDialog.
      Parameters:
      parentShell - - the shell, cannot be null
      input - - the input object. It's used as input for content provider, cannot be null
      contentProvider - - the ITreeContentProvider for the dialog, cannot be null
      labelProvider - - the ILabelProvider for the dialog, cannot be null
      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 not
      multiselectionPerRoots - - the value indicating whether to allow selection more than one element per parent node or not
      dialogTitle - the dialog title, can be null
      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 new TreeDialog.
      Parameters:
      parentShell - - the shell, cannot be null
      input - - the input object. It's used as input for content provider, cannot be null
      contentProvider - - the ITreeContentProvider for the dialog, cannot be null
      labelProvider - - the ILabelProvider for the dialog, cannot be null
      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 not
      multiselectionPerRoots - - the value indicating whether to allow selection more than one element per parent node or not
      selectedObjects - - the array of the selected objects, can be null
    • 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 new TreeDialog.
      Parameters:
      parentShell - - the shell, cannot be null
      input - - the input object. It's used as input for content provider, cannot be null
      contentProvider - - the ITreeContentProvider for the dialog, cannot be null
      labelProvider - - the ILabelProvider for the dialog, cannot be null
      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 not
      multiselectionPerRoots - - the value indicating whether to allow selection more than one element per parent node or not
      autoExpandLevel - the tree auto expand level
      checkStateListener - the check state listener, can be null
      dialogTitle - the dialog title, can be null
      selectedObjects - - the array of the selected objects, can be null
  • Method Details

    • getResult

      public Object[] getResult()
      Returns the array of the objects obtained from content provider that is selected in the dialog.
      Specified by:
      getResult in interface ISwtSelectionDialog
      Overrides:
      getResult in class org.eclipse.ui.dialogs.SelectionDialog
      Returns:
      the array of selected objects
    • setElementComparer

      public void setElementComparer(IElementComparer comparer)
      Sets element comparer.
      Parameters:
      comparer - the element comparer, can be null
    • setComparator

      public void setComparator(ViewerComparator comparator)
      Sets this viewer's comparator to be used for sorting elements.
      Parameters:
      comparator - a viewer comparator, or null if none
    • createContents

      protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
      Overrides:
      createContents in class org.eclipse.jface.dialogs.Dialog
    • createDialogArea

      protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
      Overrides:
      createDialogArea in class org.eclipse.jface.dialogs.Dialog
    • buttonPressed

      protected void buttonPressed(int buttonId)
      Overrides:
      buttonPressed in class org.eclipse.jface.dialogs.Dialog