Package org.eclipse.jface.dialogs
Class PlainMessageDialog.Builder
- java.lang.Object
-
- org.eclipse.jface.dialogs.PlainMessageDialog.Builder
-
- Enclosing class:
- PlainMessageDialog
public static class PlainMessageDialog.Builder extends Object
The Builder to create PlainMessageDialog instances. It has a fluent API (every method returns the same builder instance).- Since:
- 3.23
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlainMessageDialog
build()
Create the dialog with all the parameters set in the builder.PlainMessageDialog.Builder
buttonLabels(List<String> buttonLabels)
Sets the dialog's button labels.PlainMessageDialog.Builder
defaultButtonIndex(int defaultButtonIndex)
Sets another (other than 0) button as default button.PlainMessageDialog.Builder
image(int iconId)
Sets the dialog's image (e.g. information icon).PlainMessageDialog.Builder
image(Image image)
Sets the dialog's image (e.g. information icon).PlainMessageDialog.Builder
message(String message)
Sets the dialog's message.PlainMessageDialog.Builder
titleImage(Image image)
Sets the shell's image.
-
-
-
Method Detail
-
titleImage
public PlainMessageDialog.Builder titleImage(Image image)
Sets the shell's image.- Parameters:
image
- the image- Returns:
- this
- See Also:
Decorations.setImage(Image)
-
image
public PlainMessageDialog.Builder image(Image image)
Sets the dialog's image (e.g. information icon).- Parameters:
image
- the image- Returns:
- this
-
image
public PlainMessageDialog.Builder image(int iconId)
Sets the dialog's image (e.g. information icon).- Parameters:
iconId
- SWT style of the image, see below for support styles- Returns:
- this
- See Also:
SWT.ICON_ERROR
,SWT.ICON_INFORMATION
,SWT.ICON_QUESTION
,SWT.ICON_WARNING
,SWT.ICON_WORKING
-
message
public PlainMessageDialog.Builder message(String message)
Sets the dialog's message.- Parameters:
message
- the message- Returns:
- this
-
buttonLabels
public PlainMessageDialog.Builder buttonLabels(List<String> buttonLabels)
Sets the dialog's button labels. Without callingdefaultButtonIndex(int)
the first entry is used for the default button.- Parameters:
buttonLabels
- the button labels- Returns:
- this
-
defaultButtonIndex
public PlainMessageDialog.Builder defaultButtonIndex(int defaultButtonIndex)
Sets another (other than 0) button as default button.- Parameters:
defaultButtonIndex
- the default button index- Returns:
- this
-
build
public PlainMessageDialog build()
Create the dialog with all the parameters set in the builder.- Returns:
- the PlainMessageDialog instance
-
-