public class OptionDialogFacetImpl extends AbstractFacet implements OptionDialogFacet
ActionsAwareDialogFacet.DialogAction<T>, ActionsAwareDialogFacet.DialogActionPerformedEvent<T>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
actionId |
protected java.util.Collection<ActionsAwareDialogFacet.DialogAction<OptionDialogFacet>> |
actions |
protected java.lang.String |
buttonId |
protected java.lang.String |
caption |
protected ContentMode |
contentMode |
protected SizeWithUnit |
height |
protected boolean |
htmlSanitizerEnabled |
protected java.lang.String |
message |
protected java.lang.String |
styleName |
protected SizeWithUnit |
width |
protected WindowMode |
windowMode |
id, owner
Constructor and Description |
---|
OptionDialogFacetImpl() |
Modifier and Type | Method and Description |
---|---|
protected BaseAction |
createAction(ActionsAwareDialogFacet.DialogAction<OptionDialogFacet> action) |
protected Action[] |
createActions() |
java.util.Collection<ActionsAwareDialogFacet.DialogAction<OptionDialogFacet>> |
getActions() |
java.lang.String |
getActionTarget() |
java.lang.String |
getButtonTarget() |
java.lang.String |
getCaption() |
ContentMode |
getContentMode() |
float |
getHeight() |
SizeUnit |
getHeightSizeUnit() |
java.lang.String |
getMessage() |
java.lang.String |
getStyleName() |
java.lang.Object |
getSubPart(java.lang.String name) |
float |
getWidth() |
SizeUnit |
getWidthSizeUnit() |
WindowMode |
getWindowMode() |
boolean |
isHtmlSanitizerEnabled() |
void |
setActions(java.util.Collection<ActionsAwareDialogFacet.DialogAction<OptionDialogFacet>> actions)
Sets dialog actions.
|
void |
setActionTarget(java.lang.String actionId)
Sets that dialog should be shown when action with id
actionId
is performed. |
void |
setButtonTarget(java.lang.String buttonId)
Sets that dialog should be shown when button with id
actionId
is clicked. |
void |
setCaption(java.lang.String caption)
Sets dialog caption.
|
void |
setContentMode(ContentMode contentMode)
Sets dialog message content mode.
|
void |
setHeight(java.lang.String height)
Sets dialog height.
|
void |
setHtmlSanitizerEnabled(boolean htmlSanitizerEnabled)
Sets whether html sanitizer is enabled or not for dialog content.
|
void |
setMessage(java.lang.String message)
Sets dialog message.
|
void |
setOwner(Frame owner)
|
void |
setStyleName(java.lang.String styleName)
Sets dialog style name.
|
void |
setWidth(java.lang.String width)
Sets dialog width.
|
void |
setWindowMode(WindowMode windowMode)
Sets the mode of the dialog window
|
void |
show()
Shows dialog.
|
protected void |
subscribe() |
protected void |
subscribeOnAction(Frame owner) |
protected void |
subscribeOnButton(Frame owner) |
getEventHub, getId, getOwner, hasSubscriptions, publish, setId, unsubscribe
protected java.lang.String caption
protected java.lang.String message
protected SizeWithUnit width
protected SizeWithUnit height
protected java.lang.String styleName
protected ContentMode contentMode
protected WindowMode windowMode
protected java.lang.String actionId
protected java.lang.String buttonId
protected java.util.Collection<ActionsAwareDialogFacet.DialogAction<OptionDialogFacet>> actions
protected boolean htmlSanitizerEnabled
public void setActions(@Nullable java.util.Collection<ActionsAwareDialogFacet.DialogAction<OptionDialogFacet>> actions)
ActionsAwareDialogFacet
setActions
in interface ActionsAwareDialogFacet<OptionDialogFacet>
actions
- actions@Nullable public java.util.Collection<ActionsAwareDialogFacet.DialogAction<OptionDialogFacet>> getActions()
getActions
in interface ActionsAwareDialogFacet<OptionDialogFacet>
public void setCaption(@Nullable java.lang.String caption)
OptionDialogFacet
setCaption
in interface OptionDialogFacet
caption
- caption@Nullable public java.lang.String getCaption()
getCaption
in interface OptionDialogFacet
public void setMessage(@Nullable java.lang.String message)
OptionDialogFacet
setMessage
in interface OptionDialogFacet
message
- message@Nullable public java.lang.String getMessage()
getMessage
in interface OptionDialogFacet
public void setContentMode(ContentMode contentMode)
OptionDialogFacet
setContentMode
in interface OptionDialogFacet
contentMode
- content modepublic ContentMode getContentMode()
getContentMode
in interface OptionDialogFacet
public void setWindowMode(WindowMode windowMode)
OptionDialogFacet
setWindowMode
in interface OptionDialogFacet
windowMode
- the mode of the dialog windowpublic WindowMode getWindowMode()
getWindowMode
in interface OptionDialogFacet
public void setStyleName(java.lang.String styleName)
OptionDialogFacet
setStyleName
in interface OptionDialogFacet
styleName
- style name@Nullable public java.lang.String getStyleName()
getStyleName
in interface OptionDialogFacet
public void setWidth(@Nullable java.lang.String width)
OptionDialogFacet
setWidth
in interface OptionDialogFacet
width
- widthpublic float getWidth()
getWidth
in interface OptionDialogFacet
public SizeUnit getWidthSizeUnit()
getWidthSizeUnit
in interface OptionDialogFacet
public void setHeight(@Nullable java.lang.String height)
OptionDialogFacet
setHeight
in interface OptionDialogFacet
height
- heightpublic float getHeight()
getHeight
in interface OptionDialogFacet
public SizeUnit getHeightSizeUnit()
getHeightSizeUnit
in interface OptionDialogFacet
@Nullable public java.lang.String getActionTarget()
getActionTarget
in interface OptionDialogFacet
public void setActionTarget(@Nullable java.lang.String actionId)
OptionDialogFacet
actionId
is performed.setActionTarget
in interface OptionDialogFacet
actionId
- action id@Nullable public java.lang.String getButtonTarget()
getButtonTarget
in interface OptionDialogFacet
public void setButtonTarget(@Nullable java.lang.String buttonId)
OptionDialogFacet
actionId
is clicked.setButtonTarget
in interface OptionDialogFacet
buttonId
- button idpublic void setHtmlSanitizerEnabled(boolean htmlSanitizerEnabled)
OptionDialogFacet
setHtmlSanitizerEnabled
in interface OptionDialogFacet
htmlSanitizerEnabled
- specifies whether html sanitizer is enabledpublic boolean isHtmlSanitizerEnabled()
isHtmlSanitizerEnabled
in interface OptionDialogFacet
public void show()
OptionDialogFacet
show
in interface OptionDialogFacet
@Nullable public java.lang.Object getSubPart(java.lang.String name)
getSubPart
in interface HasSubParts
public void setOwner(@Nullable Frame owner)
Facet
setOwner
in interface Facet
setOwner
in class AbstractFacet
owner
- owner frameprotected void subscribe()
protected void subscribeOnAction(Frame owner)
protected void subscribeOnButton(Frame owner)
protected Action[] createActions()
protected BaseAction createAction(ActionsAwareDialogFacet.DialogAction<OptionDialogFacet> action)