Class ListSelectionDialog.Builder

    • Method Detail

      • labelProvider

        public ListSelectionDialog.Builder labelProvider​(ILabelProvider labelProvider)
        Sets the label provider.

        When this method is not called or when set to null, LabelProvider will be used.

        Parameters:
        labelProvider - the label provider for displaying model elements
        Returns:
        this
      • message

        public ListSelectionDialog.Builder message​(String message)
        Sets the message.

        When this method is not called or when set to null, a default message will shown.

        Parameters:
        message - the message to be displayed at the top of this dialog, or null to display a default message
        Returns:
        this
      • okButtonText

        public ListSelectionDialog.Builder okButtonText​(String text)
        Sets the OK button label.
        Parameters:
        text - the label of the OK button; can contain the placeholder {0} for the number of currently selected elements and the placeholder {1} for the total number of elements
        Returns:
        this
        See Also:
        okButtonTextWhenNoSelection(String)
      • okButtonTextWhenNoSelection

        public ListSelectionDialog.Builder okButtonTextWhenNoSelection​(String text)
        Sets the OK button label that will be displayed when no item is selected; otherwise the label of okButtonText(String) will be displayed.
        Parameters:
        text - the label of the OK button when no item is selected which can contain the placeholder {0} for the number of currently selected elements and the placeholder {1} for the total number of elements
        Returns:
        this
        See Also:
        okButtonText(String)
      • canCancel

        public ListSelectionDialog.Builder canCancel​(boolean canCancel)
        Sets whether the dialog can be canceled.
        Parameters:
        canCancel - whether selecting can be canceled or not (via the Cancel button or by closing the dialog)
        Returns:
        this
      • asSheet

        public ListSelectionDialog.Builder asSheet​(boolean asSheet)
        Sets whether to show the dialog as sheet.
        Parameters:
        asSheet - whether to use SWT.SHEET (modal dialog that is attached to a parent window)
        Returns:
        this
        See Also:
        SWT.SHEET