public class InputDialogFacetImpl extends AbstractFacet implements InputDialogFacet
ActionsAwareDialogFacet.DialogAction<T>, ActionsAwareDialogFacet.DialogActionPerformedEvent<T>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
actionId |
protected java.util.Collection<ActionsAwareDialogFacet.DialogAction<InputDialogFacet>> |
actions |
protected java.lang.String |
buttonId |
protected java.lang.String |
caption |
protected java.util.List<java.util.function.Consumer<InputDialog.InputDialogCloseEvent>> |
closeListeners |
protected DialogActions |
dialogActions |
protected java.util.function.Consumer<InputDialog.InputDialogResult> |
dialogResultHandler |
protected SizeWithUnit |
height |
protected InputDialog |
inputDialog |
protected InputParameter[] |
parameters |
protected java.util.function.Function<InputDialog.ValidationContext,ValidationErrors> |
validator |
protected SizeWithUnit |
width |
id, owner
Constructor and Description |
---|
InputDialogFacetImpl() |
Modifier and Type | Method and Description |
---|---|
io.jmix.core.common.event.Subscription |
addCloseListener(java.util.function.Consumer<InputDialog.InputDialogCloseEvent> closeListener)
Adds the given
Consumer as dialog InputDialog.InputDialogCloseEvent listener. |
InputDialog |
create()
Creates InputDialog.
|
protected InputDialogAction |
createAction(ActionsAwareDialogFacet.DialogAction<InputDialogFacet> action) |
protected InputDialogAction[] |
createActions(java.util.Collection<ActionsAwareDialogFacet.DialogAction<InputDialogFacet>> actions) |
java.util.Collection<ActionsAwareDialogFacet.DialogAction<InputDialogFacet>> |
getActions() |
java.lang.String |
getActionTarget() |
java.lang.String |
getButtonTarget() |
java.lang.String |
getCaption() |
DialogActions |
getDialogActions() |
float |
getHeight() |
SizeUnit |
getHeightSizeUnit() |
java.lang.Object |
getSubPart(java.lang.String name) |
float |
getWidth() |
SizeUnit |
getWidthSizeUnit() |
protected void |
internalRemoveCloseListener(java.util.function.Consumer<InputDialog.InputDialogCloseEvent> closeListener) |
void |
setActions(java.util.Collection<ActionsAwareDialogFacet.DialogAction<InputDialogFacet>> 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 |
setDialogActions(DialogActions dialogActions)
Defines a set of predefined actions to use in dialog.
|
void |
setDialogResultHandler(java.util.function.Consumer<InputDialog.InputDialogResult> dialogResultHandler)
Sets input dialog result handler.
|
void |
setHeight(java.lang.String height)
Sets dialog height.
|
void |
setOwner(Frame owner)
|
void |
setParameters(InputParameter... parameters)
Sets input dialog parameters.
|
void |
setValidator(java.util.function.Function<InputDialog.ValidationContext,ValidationErrors> validator)
Sets additional handler for field validation.
|
void |
setWidth(java.lang.String width)
Sets dialog width.
|
InputDialog |
show()
Shows InputDialog.
|
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 SizeWithUnit width
protected SizeWithUnit height
protected InputParameter[] parameters
protected java.lang.String actionId
protected java.lang.String buttonId
protected DialogActions dialogActions
protected java.util.function.Consumer<InputDialog.InputDialogResult> dialogResultHandler
protected java.util.Collection<ActionsAwareDialogFacet.DialogAction<InputDialogFacet>> actions
protected java.util.function.Function<InputDialog.ValidationContext,ValidationErrors> validator
protected java.util.List<java.util.function.Consumer<InputDialog.InputDialogCloseEvent>> closeListeners
protected InputDialog inputDialog
public void setCaption(@Nullable java.lang.String caption)
InputDialogFacet
setCaption
in interface InputDialogFacet
caption
- caption@Nullable public java.lang.String getCaption()
getCaption
in interface InputDialogFacet
public void setWidth(@Nullable java.lang.String width)
InputDialogFacet
setWidth
in interface InputDialogFacet
width
- widthpublic float getWidth()
getWidth
in interface InputDialogFacet
public SizeUnit getWidthSizeUnit()
getWidthSizeUnit
in interface InputDialogFacet
public void setHeight(@Nullable java.lang.String height)
InputDialogFacet
setHeight
in interface InputDialogFacet
height
- heightpublic float getHeight()
getHeight
in interface InputDialogFacet
public SizeUnit getHeightSizeUnit()
getHeightSizeUnit
in interface InputDialogFacet
@Nullable public java.lang.String getActionTarget()
getActionTarget
in interface InputDialogFacet
public void setActionTarget(@Nullable java.lang.String actionId)
InputDialogFacet
actionId
is performed.setActionTarget
in interface InputDialogFacet
actionId
- action id@Nullable public java.lang.String getButtonTarget()
getButtonTarget
in interface InputDialogFacet
public void setButtonTarget(@Nullable java.lang.String buttonId)
InputDialogFacet
actionId
is clicked.setButtonTarget
in interface InputDialogFacet
buttonId
- button idpublic void setDialogActions(@Nullable DialogActions dialogActions)
InputDialogFacet
setDialogActions
in interface InputDialogFacet
dialogActions
- one of DialogActions
values@Nullable public DialogActions getDialogActions()
getDialogActions
in interface InputDialogFacet
public void setParameters(InputParameter... parameters)
InputDialogFacet
setParameters
in interface InputDialogFacet
parameters
- set of InputParameter
public void setActions(@Nullable java.util.Collection<ActionsAwareDialogFacet.DialogAction<InputDialogFacet>> actions)
ActionsAwareDialogFacet
setActions
in interface ActionsAwareDialogFacet<InputDialogFacet>
actions
- actions@Nullable public java.util.Collection<ActionsAwareDialogFacet.DialogAction<InputDialogFacet>> getActions()
getActions
in interface ActionsAwareDialogFacet<InputDialogFacet>
public io.jmix.core.common.event.Subscription addCloseListener(java.util.function.Consumer<InputDialog.InputDialogCloseEvent> closeListener)
InputDialogFacet
Consumer
as dialog InputDialog.InputDialogCloseEvent
listener.addCloseListener
in interface InputDialogFacet
closeListener
- close listenerprotected void internalRemoveCloseListener(java.util.function.Consumer<InputDialog.InputDialogCloseEvent> closeListener)
public void setDialogResultHandler(java.util.function.Consumer<InputDialog.InputDialogResult> dialogResultHandler)
InputDialogFacet
setDialogResultHandler
in interface InputDialogFacet
dialogResultHandler
- result handlerpublic void setValidator(java.util.function.Function<InputDialog.ValidationContext,ValidationErrors> validator)
InputDialogFacet
ValidationErrors
instance. Returned validation errors will be shown with another errors from fields.setValidator
in interface InputDialogFacet
validator
- validator@Nullable public java.lang.Object getSubPart(java.lang.String name)
getSubPart
in interface HasSubParts
public InputDialog create()
InputDialogFacet
create
in interface InputDialogFacet
public InputDialog show()
InputDialogFacet
show
in interface InputDialogFacet
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 InputDialogAction[] createActions(@Nullable java.util.Collection<ActionsAwareDialogFacet.DialogAction<InputDialogFacet>> actions)
protected InputDialogAction createAction(ActionsAwareDialogFacet.DialogAction<InputDialogFacet> action)