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
Modifier and TypeFieldDescriptionprotected String
protected String
protected String
protected List<Consumer<InputDialog.InputDialogCloseEvent>>
protected DialogActions
protected Consumer<InputDialog.InputDialogResult>
protected SizeWithUnit
protected InputDialog
protected InputParameter[]
protected SizeWithUnit
Fields inherited from class io.jmix.ui.component.impl.AbstractFacet
id, owner
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddCloseListener
(Consumer<InputDialog.InputDialogCloseEvent> closeListener) Adds the givenConsumer
as dialogInputDialog.InputDialogCloseEvent
listener.create()
Creates InputDialog.protected InputDialogAction
protected InputDialogAction[]
float
getSubPart
(String name) float
getWidth()
protected void
internalRemoveCloseListener
(Consumer<InputDialog.InputDialogCloseEvent> closeListener) void
Sets dialog actions.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
setDialogActions
(DialogActions dialogActions) Defines a set of predefined actions to use in dialog.void
setDialogResultHandler
(Consumer<InputDialog.InputDialogResult> dialogResultHandler) Sets input dialog result handler.void
Sets dialog height.void
void
setParameters
(InputParameter... parameters) Sets input dialog parameters.void
Sets additional handler for field validation.void
Sets dialog width.show()
Shows InputDialog.protected void
protected void
subscribeOnAction
(Frame owner) protected void
subscribeOnButton
(Frame owner) Methods inherited from class io.jmix.ui.component.impl.AbstractFacet
getEventHub, getId, getOwner, hasSubscriptions, publish, setId, unsubscribe
-
Field Details
-
width
-
height
-
parameters
-
actionId
-
buttonId
-
dialogActions
-
dialogResultHandler
-
actions
-
validator
-
closeListeners
-
inputDialog
-
Constructor Details
-
InputDialogFacetImpl
public InputDialogFacetImpl()
-
-
Method Details
-
setCaption
Description copied from interface:InputDialogFacet
Sets dialog caption.- Specified by:
setCaption
in interfaceInputDialogFacet
- Parameters:
caption
- caption
-
getCaption
- Specified by:
getCaption
in interfaceInputDialogFacet
- Returns:
- dialog caption
-
setWidth
Description copied from interface:InputDialogFacet
Sets dialog width.- Specified by:
setWidth
in interfaceInputDialogFacet
- Parameters:
width
- width
-
getWidth
public float getWidth()- Specified by:
getWidth
in interfaceInputDialogFacet
- Returns:
- dialog width
-
getWidthSizeUnit
- Specified by:
getWidthSizeUnit
in interfaceInputDialogFacet
- Returns:
- dialog width size unit
-
setHeight
Description copied from interface:InputDialogFacet
Sets dialog height.- Specified by:
setHeight
in interfaceInputDialogFacet
- Parameters:
height
- height
-
getHeight
public float getHeight()- Specified by:
getHeight
in interfaceInputDialogFacet
- Returns:
- dialog height
-
getHeightSizeUnit
- Specified by:
getHeightSizeUnit
in interfaceInputDialogFacet
- Returns:
- dialog height size unit
-
getActionTarget
- Specified by:
getActionTarget
in interfaceInputDialogFacet
- Returns:
- id of action that triggers dialog
-
setActionTarget
Description copied from interface:InputDialogFacet
Sets that dialog should be shown when action with idactionId
is performed.- Specified by:
setActionTarget
in interfaceInputDialogFacet
- Parameters:
actionId
- action id
-
getButtonTarget
- Specified by:
getButtonTarget
in interfaceInputDialogFacet
- Returns:
- id of button that triggers dialog
-
setButtonTarget
Description copied from interface:InputDialogFacet
Sets that dialog should be shown when button with idactionId
is clicked.- Specified by:
setButtonTarget
in interfaceInputDialogFacet
- Parameters:
buttonId
- button id
-
setDialogActions
Description copied from interface:InputDialogFacet
Defines a set of predefined actions to use in dialog.- Specified by:
setDialogActions
in interfaceInputDialogFacet
- Parameters:
dialogActions
- one ofDialogActions
values
-
getDialogActions
- Specified by:
getDialogActions
in interfaceInputDialogFacet
- Returns:
- set of predefined actions used in dialog
-
setParameters
Description copied from interface:InputDialogFacet
Sets input dialog parameters.- Specified by:
setParameters
in interfaceInputDialogFacet
- Parameters:
parameters
- set ofInputParameter
-
setActions
public void setActions(@Nullable Collection<ActionsAwareDialogFacet.DialogAction<InputDialogFacet>> actions) Description copied from interface:ActionsAwareDialogFacet
Sets dialog actions.- Specified by:
setActions
in interfaceActionsAwareDialogFacet<InputDialogFacet>
- Parameters:
actions
- actions
-
getActions
- Specified by:
getActions
in interfaceActionsAwareDialogFacet<InputDialogFacet>
- Returns:
- dialog actions
-
addCloseListener
Description copied from interface:InputDialogFacet
Adds the givenConsumer
as dialogInputDialog.InputDialogCloseEvent
listener.- Specified by:
addCloseListener
in interfaceInputDialogFacet
- Parameters:
closeListener
- close listener- Returns:
- close event subscription
-
internalRemoveCloseListener
protected void internalRemoveCloseListener(Consumer<InputDialog.InputDialogCloseEvent> closeListener) -
setDialogResultHandler
Description copied from interface:InputDialogFacet
Sets input dialog result handler.- Specified by:
setDialogResultHandler
in interfaceInputDialogFacet
- Parameters:
dialogResultHandler
- result handler
-
setValidator
Description copied from interface:InputDialogFacet
Sets additional handler for field validation. It receives input dialog context and must returnValidationErrors
instance. Returned validation errors will be shown with another errors from fields.- Specified by:
setValidator
in interfaceInputDialogFacet
- Parameters:
validator
- validator
-
getSubPart
- Specified by:
getSubPart
in interfaceHasSubParts
-
create
Description copied from interface:InputDialogFacet
Creates InputDialog.- Specified by:
create
in interfaceInputDialogFacet
- Returns:
- input dialog instance
-
show
Description copied from interface:InputDialogFacet
Shows InputDialog.- Specified by:
show
in interfaceInputDialogFacet
-
setOwner
Description copied from interface:Facet
- Specified by:
setOwner
in interfaceFacet
- Overrides:
setOwner
in 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)
-