public class WebDialogs.OptionDialogBuilderImpl extends java.lang.Object implements Dialogs.OptionDialogBuilder
Modifier and Type | Field and Description |
---|---|
protected Action[] |
actions |
protected com.vaadin.ui.HorizontalLayout |
buttonsContainer |
protected boolean |
htmlSanitizerEnabled |
protected com.vaadin.ui.VerticalLayout |
layout |
protected CubaLabel |
messageLabel |
protected Dialogs.MessageType |
type |
protected CubaWindow |
window |
Constructor and Description |
---|
OptionDialogBuilderImpl() |
Modifier and Type | Method and Description |
---|---|
protected DialogAction |
findFirstActionWithType(Action[] actions,
java.util.EnumSet<DialogAction.Type> types) |
Action[] |
getActions() |
java.lang.String |
getCaption() |
ContentMode |
getContentMode() |
float |
getHeight() |
SizeUnit |
getHeightSizeUnit() |
java.lang.String |
getMessage() |
java.lang.String |
getStyleName() |
Dialogs.MessageType |
getType() |
float |
getWidth() |
SizeUnit |
getWidthSizeUnit() |
boolean |
isHtmlSanitizerEnabled() |
boolean |
isMaximized() |
Dialogs.OptionDialogBuilder |
maximized()
Enables dialog maximized mode.
|
void |
show()
Shows the dialog.
|
Dialogs.OptionDialogBuilder |
withActions(Action... actions)
Sets dialog actions.
|
Dialogs.OptionDialogBuilder |
withCaption(java.lang.String caption)
Sets caption text.
|
Dialogs.OptionDialogBuilder |
withContentMode(ContentMode contentMode)
Sets content mode for message, e.g.
|
Dialogs.OptionDialogBuilder |
withHeight(java.lang.String height)
Sets dialog height.
|
Dialogs.OptionDialogBuilder |
withHtmlSanitizer(boolean htmlSanitizerEnabled)
Sets whether html sanitizer is enabled or not for dialog content.
|
Dialogs.OptionDialogBuilder |
withMaximized(boolean maximized)
Sets whether dialog should be maximized.
|
Dialogs.OptionDialogBuilder |
withMessage(java.lang.String message)
Sets message text.
|
Dialogs.OptionDialogBuilder |
withStyleName(java.lang.String styleName)
Sets custom CSS style name for dialog.
|
Dialogs.OptionDialogBuilder |
withType(Dialogs.MessageType type)
Sets message type, e.g.
|
Dialogs.OptionDialogBuilder |
withWidth(java.lang.String width)
Sets dialog width.
|
protected CubaWindow window
protected CubaLabel messageLabel
protected com.vaadin.ui.VerticalLayout layout
protected com.vaadin.ui.HorizontalLayout buttonsContainer
protected Dialogs.MessageType type
protected boolean htmlSanitizerEnabled
protected Action[] actions
public Dialogs.OptionDialogBuilder withCaption(java.lang.String caption)
Dialogs.HasCaption
withCaption
in interface Dialogs.HasCaption<Dialogs.OptionDialogBuilder>
caption
- caption textpublic java.lang.String getCaption()
getCaption
in interface Dialogs.HasCaption<Dialogs.OptionDialogBuilder>
public Dialogs.OptionDialogBuilder withMessage(java.lang.String message)
Dialogs.HasMessage
withMessage
in interface Dialogs.HasMessage<Dialogs.OptionDialogBuilder>
message
- message textpublic java.lang.String getMessage()
getMessage
in interface Dialogs.HasMessage<Dialogs.OptionDialogBuilder>
public Dialogs.OptionDialogBuilder withType(Dialogs.MessageType type)
Dialogs.HasType
Dialogs.MessageType.CONFIRMATION
or Dialogs.MessageType.WARNING
.withType
in interface Dialogs.HasType<Dialogs.OptionDialogBuilder>
type
- message typepublic Dialogs.MessageType getType()
getType
in interface Dialogs.HasType<Dialogs.OptionDialogBuilder>
public Dialogs.OptionDialogBuilder withContentMode(ContentMode contentMode)
Dialogs.HasContentMode
withContentMode
in interface Dialogs.HasContentMode<Dialogs.OptionDialogBuilder>
contentMode
- content modepublic ContentMode getContentMode()
getContentMode
in interface Dialogs.HasContentMode<Dialogs.OptionDialogBuilder>
public Dialogs.OptionDialogBuilder withActions(Action... actions)
Dialogs.OptionDialogBuilder
withActions
in interface Dialogs.OptionDialogBuilder
actions
- actionspublic Action[] getActions()
getActions
in interface Dialogs.OptionDialogBuilder
public Dialogs.OptionDialogBuilder withWidth(java.lang.String width)
Dialogs.HasSize
withWidth
in interface Dialogs.HasSize<Dialogs.OptionDialogBuilder>
width
- widthpublic float getWidth()
getWidth
in interface Dialogs.HasSize<Dialogs.OptionDialogBuilder>
public SizeUnit getWidthSizeUnit()
getWidthSizeUnit
in interface Dialogs.HasSize<Dialogs.OptionDialogBuilder>
public Dialogs.OptionDialogBuilder withHeight(java.lang.String height)
Dialogs.HasSize
withHeight
in interface Dialogs.HasSize<Dialogs.OptionDialogBuilder>
height
- heightpublic float getHeight()
getHeight
in interface Dialogs.HasSize<Dialogs.OptionDialogBuilder>
public SizeUnit getHeightSizeUnit()
getHeightSizeUnit
in interface Dialogs.HasSize<Dialogs.OptionDialogBuilder>
public boolean isMaximized()
isMaximized
in interface Dialogs.HasMaximized<Dialogs.OptionDialogBuilder>
public Dialogs.OptionDialogBuilder withMaximized(boolean maximized)
Dialogs.HasMaximized
withMaximized
in interface Dialogs.HasMaximized<Dialogs.OptionDialogBuilder>
maximized
- maximized flagpublic Dialogs.OptionDialogBuilder maximized()
Dialogs.HasMaximized
maximized
in interface Dialogs.HasMaximized<Dialogs.OptionDialogBuilder>
public Dialogs.OptionDialogBuilder withStyleName(java.lang.String styleName)
Dialogs.HasStyleName
withStyleName
in interface Dialogs.HasStyleName<Dialogs.OptionDialogBuilder>
styleName
- style namepublic java.lang.String getStyleName()
getStyleName
in interface Dialogs.HasStyleName<Dialogs.OptionDialogBuilder>
public Dialogs.OptionDialogBuilder withHtmlSanitizer(boolean htmlSanitizerEnabled)
Dialogs.HasHtmlSanitizer
withHtmlSanitizer
in interface Dialogs.HasHtmlSanitizer<Dialogs.OptionDialogBuilder>
htmlSanitizerEnabled
- specifies whether html sanitizer is enabledpublic boolean isHtmlSanitizerEnabled()
isHtmlSanitizerEnabled
in interface Dialogs.HasHtmlSanitizer<Dialogs.OptionDialogBuilder>
public void show()
Dialogs.OptionDialogBuilder
show
in interface Dialogs.OptionDialogBuilder
@Nullable protected DialogAction findFirstActionWithType(Action[] actions, java.util.EnumSet<DialogAction.Type> types)