Package io.jmix.ui.component
Interface OptionDialogFacet
- All Superinterfaces:
ActionsAwareDialogFacet<OptionDialogFacet>
,Facet
,HasSubParts
- All Known Implementing Classes:
OptionDialogFacetImpl
@StudioFacet(xmlElement="optionDialog",
caption="OptionDialog",
description="Prepares and shows option dialogs",
defaultProperty="message",
category="Facets",
icon="io/jmix/ui/icon/facet/dialog.svg",
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/facets/option-dialog-facet.html")
public interface OptionDialogFacet
extends Facet, ActionsAwareDialogFacet<OptionDialogFacet>, HasSubParts
Prepares and shows option dialogs.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.ActionsAwareDialogFacet
ActionsAwareDialogFacet.DialogAction<T>, ActionsAwareDialogFacet.DialogActionPerformedEvent<T>
-
Method Summary
Modifier and TypeMethodDescriptionfloat
float
getWidth()
boolean
void
setActionTarget
(String actionId) Sets that dialog should be shown when action with idactionId
is performed.void
setButtonTarget
(String buttonId) Sets that dialog should be shown when button with idactionId
is clicked.void
setCaption
(String caption) Sets dialog caption.void
setContentMode
(ContentMode contentMode) Sets dialog message content mode.void
Sets dialog height.void
setHtmlSanitizerEnabled
(boolean htmlSanitizerEnabled) Sets whether html sanitizer is enabled or not for dialog content.void
setMessage
(String message) Sets dialog message.void
setStyleName
(String styleName) Sets dialog style name.void
Sets dialog width.void
setWindowMode
(WindowMode windowMode) Sets the mode of the dialog windowvoid
show()
Shows dialog.Methods inherited from interface io.jmix.ui.component.ActionsAwareDialogFacet
getActions, setActions
Methods inherited from interface io.jmix.ui.component.HasSubParts
getSubPart
-
Method Details
-
setCaption
Sets dialog caption.- Parameters:
caption
- caption
-
getCaption
- Returns:
- dialog caption
-
setMessage
Sets dialog message.- Parameters:
message
- message
-
getMessage
- Returns:
- dialog message
-
setContentMode
Sets dialog message content mode.- Parameters:
contentMode
- content mode
-
getContentMode
ContentMode getContentMode()- Returns:
- dialog message content mode
-
setWindowMode
Sets the mode of the dialog window- Parameters:
windowMode
- the mode of the dialog window
-
getWindowMode
WindowMode getWindowMode()- Returns:
- the mode of the dialog window
-
setStyleName
Sets dialog style name.- Parameters:
styleName
- style name
-
getStyleName
- Returns:
- dialog style name
-
setWidth
Sets dialog width.- Parameters:
width
- width
-
getWidth
float getWidth()- Returns:
- dialog width
-
getWidthSizeUnit
SizeUnit getWidthSizeUnit()- Returns:
- dialog width size unit
-
setHeight
Sets dialog height.- Parameters:
height
- height
-
getHeight
float getHeight()- Returns:
- dialog height
-
getHeightSizeUnit
SizeUnit getHeightSizeUnit()- Returns:
- dialog height size unit
-
getActionTarget
- Returns:
- id of action that triggers dialog
-
setActionTarget
@StudioProperty(name="onAction", type=COMPONENT_REF, options="io.jmix.ui.action.Action") void setActionTarget(@Nullable String actionId) Sets that dialog should be shown when action with idactionId
is performed.- Parameters:
actionId
- action id
-
getButtonTarget
- Returns:
- id of button that triggers dialog
-
setButtonTarget
@StudioProperty(name="onButton", type=COMPONENT_REF, options="io.jmix.ui.component.Button") void setButtonTarget(@Nullable String buttonId) Sets that dialog should be shown when button with idactionId
is clicked.- Parameters:
buttonId
- button id
-
setHtmlSanitizerEnabled
@StudioProperty(type=BOOLEAN, defaultValue="true") void setHtmlSanitizerEnabled(boolean htmlSanitizerEnabled) Sets whether html sanitizer is enabled or not for dialog content.- Parameters:
htmlSanitizerEnabled
- specifies whether html sanitizer is enabled
-
isHtmlSanitizerEnabled
boolean isHtmlSanitizerEnabled()- Returns:
- html sanitizer is enabled for dialog content
-
show
void show()Shows dialog.
-