Package io.jmix.ui.component.impl
Class InputDialogFacetImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractFacet
io.jmix.ui.component.impl.InputDialogFacetImpl
- All Implemented Interfaces:
ActionsAwareDialogFacet<InputDialogFacet>,Facet,HasSubParts,InputDialogFacet
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.ActionsAwareDialogFacet
ActionsAwareDialogFacet.DialogAction<T>, ActionsAwareDialogFacet.DialogActionPerformedEvent<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected Stringprotected List<Consumer<InputDialog.InputDialogCloseEvent>>protected DialogActionsprotected Consumer<InputDialog.InputDialogResult>protected SizeWithUnitprotected InputDialogprotected InputParameter[]protected SizeWithUnitFields inherited from class io.jmix.ui.component.impl.AbstractFacet
id, owner -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCloseListener(Consumer<InputDialog.InputDialogCloseEvent> closeListener) Adds the givenConsumeras dialogInputDialog.InputDialogCloseEventlistener.create()Creates InputDialog.protected InputDialogActionprotected InputDialogAction[]floatgetSubPart(String name) floatgetWidth()protected voidinternalRemoveCloseListener(Consumer<InputDialog.InputDialogCloseEvent> closeListener) voidSets dialog actions.voidsetActionTarget(String actionId) Sets that dialog should be shown when action with idactionIdis performed.voidsetButtonTarget(String buttonId) Sets that dialog should be shown when button with idactionIdis clicked.voidsetCaption(String caption) Sets dialog caption.voidsetDialogActions(DialogActions dialogActions) Defines a set of predefined actions to use in dialog.voidsetDialogResultHandler(Consumer<InputDialog.InputDialogResult> dialogResultHandler) Sets input dialog result handler.voidSets dialog height.voidvoidsetParameters(InputParameter... parameters) Sets input dialog parameters.voidSets additional handler for field validation.voidSets dialog width.show()Shows InputDialog.protected voidprotected voidsubscribeOnAction(Frame owner) protected voidsubscribeOnButton(Frame owner) Methods inherited from class io.jmix.ui.component.impl.AbstractFacet
getEventHub, getId, getOwner, hasSubscriptions, publish, setId, unsubscribe
-
Field Details
-
caption
-
width
-
height
-
parameters
-
actionId
-
buttonId
-
dialogActions
-
dialogResultHandler
-
actions
-
validator
-
closeListeners
-
inputDialog
-
-
Constructor Details
-
InputDialogFacetImpl
public InputDialogFacetImpl()
-
-
Method Details
-
setCaption
Description copied from interface:InputDialogFacetSets dialog caption.- Specified by:
setCaptionin interfaceInputDialogFacet- Parameters:
caption- caption
-
getCaption
- Specified by:
getCaptionin interfaceInputDialogFacet- Returns:
- dialog caption
-
setWidth
Description copied from interface:InputDialogFacetSets dialog width.- Specified by:
setWidthin interfaceInputDialogFacet- Parameters:
width- width
-
getWidth
public float getWidth()- Specified by:
getWidthin interfaceInputDialogFacet- Returns:
- dialog width
-
getWidthSizeUnit
- Specified by:
getWidthSizeUnitin interfaceInputDialogFacet- Returns:
- dialog width size unit
-
setHeight
Description copied from interface:InputDialogFacetSets dialog height.- Specified by:
setHeightin interfaceInputDialogFacet- Parameters:
height- height
-
getHeight
public float getHeight()- Specified by:
getHeightin interfaceInputDialogFacet- Returns:
- dialog height
-
getHeightSizeUnit
- Specified by:
getHeightSizeUnitin interfaceInputDialogFacet- Returns:
- dialog height size unit
-
getActionTarget
- Specified by:
getActionTargetin interfaceInputDialogFacet- Returns:
- id of action that triggers dialog
-
setActionTarget
Description copied from interface:InputDialogFacetSets that dialog should be shown when action with idactionIdis performed.- Specified by:
setActionTargetin interfaceInputDialogFacet- Parameters:
actionId- action id
-
getButtonTarget
- Specified by:
getButtonTargetin interfaceInputDialogFacet- Returns:
- id of button that triggers dialog
-
setButtonTarget
Description copied from interface:InputDialogFacetSets that dialog should be shown when button with idactionIdis clicked.- Specified by:
setButtonTargetin interfaceInputDialogFacet- Parameters:
buttonId- button id
-
setDialogActions
Description copied from interface:InputDialogFacetDefines a set of predefined actions to use in dialog.- Specified by:
setDialogActionsin interfaceInputDialogFacet- Parameters:
dialogActions- one ofDialogActionsvalues
-
getDialogActions
- Specified by:
getDialogActionsin interfaceInputDialogFacet- Returns:
- set of predefined actions used in dialog
-
setParameters
Description copied from interface:InputDialogFacetSets input dialog parameters.- Specified by:
setParametersin interfaceInputDialogFacet- Parameters:
parameters- set ofInputParameter
-
setActions
public void setActions(@Nullable Collection<ActionsAwareDialogFacet.DialogAction<InputDialogFacet>> actions) Description copied from interface:ActionsAwareDialogFacetSets dialog actions.- Specified by:
setActionsin interfaceActionsAwareDialogFacet<InputDialogFacet>- Parameters:
actions- actions
-
getActions
- Specified by:
getActionsin interfaceActionsAwareDialogFacet<InputDialogFacet>- Returns:
- dialog actions
-
addCloseListener
Description copied from interface:InputDialogFacetAdds the givenConsumeras dialogInputDialog.InputDialogCloseEventlistener.- Specified by:
addCloseListenerin interfaceInputDialogFacet- Parameters:
closeListener- close listener- Returns:
- close event subscription
-
internalRemoveCloseListener
protected void internalRemoveCloseListener(Consumer<InputDialog.InputDialogCloseEvent> closeListener) -
setDialogResultHandler
Description copied from interface:InputDialogFacetSets input dialog result handler.- Specified by:
setDialogResultHandlerin interfaceInputDialogFacet- Parameters:
dialogResultHandler- result handler
-
setValidator
Description copied from interface:InputDialogFacetSets additional handler for field validation. It receives input dialog context and must returnValidationErrorsinstance. Returned validation errors will be shown with another errors from fields.- Specified by:
setValidatorin interfaceInputDialogFacet- Parameters:
validator- validator
-
getSubPart
- Specified by:
getSubPartin interfaceHasSubParts
-
create
Description copied from interface:InputDialogFacetCreates InputDialog.- Specified by:
createin interfaceInputDialogFacet- Returns:
- input dialog instance
-
show
Description copied from interface:InputDialogFacetShows InputDialog.- Specified by:
showin interfaceInputDialogFacet
-
setOwner
Description copied from interface:Facet- Specified by:
setOwnerin interfaceFacet- Overrides:
setOwnerin classAbstractFacet- Parameters:
owner- owner frame
-
subscribe
protected void subscribe() -
subscribeOnAction
-
subscribeOnButton
-
createActions
protected InputDialogAction[] createActions(@Nullable Collection<ActionsAwareDialogFacet.DialogAction<InputDialogFacet>> actions) -
createAction
protected InputDialogAction createAction(ActionsAwareDialogFacet.DialogAction<InputDialogFacet> action)
-