Class Screen
- All Implemented Interfaces:
FrameOwner
- Direct Known Subclasses:
ActivateProcessDefinitionScreen
,AppSettingsEntityScreen
,AttributeEnumerationScreen
,BackgroundWorkDialog
,BpmnModelerScreen
,BulkEditorWindow
,ChangePasswordDialog
,ColspanDialog
,CreateNotificationScreen
,CssLayoutCreationDialog
,DashboardViewScreen
,DateIntervalDialog
,DecisionTableModelerScreen
,DefaultStartProcessForm
,DefaultTaskProcessForm
,DmnDecisionTableBrowse
,DynamicProcessForm
,EmailAddressEdit
,EmailContentEdit
,EmailTemplateSendScreen
,EntityDataTaskJpqlEditor
,EntityInfoWindow
,EntityValueScreen
,ExpandDialog
,FileUploadDialog
,GridCreationDialog
,HitPolicySelectScreen
,HtmlSourceCodeScreen
,InputDialog
,InputEntryEdit
,InputParametersDialog
,JmxConsoleScreen
,LayoutAnalyzerScreen
,MBeanOperationResultScreen
,MultipleResourcePolicyModelCreateScreen
,NotFoundScreen
,PessimisticLockBrowser
,PivotTableScreen
,ProcessInstanceMigrationScreen
,ReportImportDialog
,ReportWizardCreator
,ResendMessage
,ResetPasswordDialog
,ResponsiveCreationDialog
,RoleAssignmentScreen
,ScriptEditor
,ScriptEditorDialog
,SearchResultsScreen
,SelectValueDialog
,SendingMessageBrowser
,ShowChartScreen
,ShowPivotTableScreen
,ShowReportTableScreen
,StandardEditor
,StandardLookup
,StyleDialog
,SuspendProcessDefinitionScreen
,TaskReassignScreen
,TestMainScreen
,ThemeSettingsScreen
,UserInAppNotificationBrowseScreen
,UserSubstitutionsScreen
,WeightDialog
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Event sent after the screen is closed by itsclose(CloseAction)
method and afterScreen.AfterDetachEvent
.static class
Event sent after the screen is removed from the application UI when it is closed by the user or when the user logs out.static class
Event sent when the screen controller and all its declaratively defined components are created, dependency injection is completed, and all components have completed their internal initialization procedures.static class
Event sent right after the screen is shown, i.e.static class
Event sent right before the screen is closed by itsclose(CloseAction)
method.static class
Event sent right before the screen is shown, i.e.static class
Event sent when the screen controller and all its declaratively defined components are created, and dependency injection is completed. -
Field Summary
Fields inherited from interface io.jmix.ui.screen.FrameOwner
NO_OPTIONS, WINDOW_CLOSE_ACTION, WINDOW_COMMIT_AND_CLOSE_ACTION, WINDOW_DISCARD_AND_CLOSE_ACTION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAfterCloseListener
(Consumer<Screen.AfterCloseEvent> listener) AddsScreen.AfterCloseEvent
listener.protected Subscription
AddsScreen.AfterDetachEvent
listener.protected Subscription
addAfterInitListener
(Consumer<Screen.AfterInitEvent> listener) AddsScreen.AfterInitEvent
listener.addAfterShowListener
(Consumer<Screen.AfterShowEvent> listener) AddsScreen.AfterShowEvent
listener.protected Subscription
AddsScreen.BeforeCloseEvent
listener.protected Subscription
addBeforeShowListener
(Consumer<Screen.BeforeShowEvent> listener) AddsScreen.BeforeShowEvent
listener.protected Subscription
addInitListener
(Consumer<Screen.InitEvent> listener) AddsScreen.InitEvent
listener.protected Subscription
AddsUrlParamsChangedEvent
listener.close
(CloseAction action) Requests closing of the screen caused by the given action.close
(StandardOutcome outcome) Requests closing of the screen with the givenoutcome
.Closes the screen withFrameOwner.WINDOW_CLOSE_ACTION
action.protected <E> void
protected org.springframework.context.ApplicationContext
protected EventHub
getId()
protected ScreenData
protected List<org.springframework.context.ApplicationListener>
protected boolean
protected boolean
isSameScreen
(Screen openedScreen) Compares this screen with an already opened screen.protected boolean
isScreenAction
(BaseAction action) protected void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) protected void
setExtensions
(Map<Class<?>, Object> extensions) protected void
Sets id of the screen.protected void
setScreenData
(ScreenData data) protected void
setUiEventListeners
(List<org.springframework.context.ApplicationListener> listeners) protected void
show()
Shows this screen.
-
Constructor Details
-
Screen
public Screen()
-
-
Method Details
-
getApplicationContext
protected org.springframework.context.ApplicationContext getApplicationContext() -
setApplicationContext
@Autowired protected void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) -
getEventHub
-
getExtensions
-
setExtensions
-
getId
-
setId
Sets id of the screen. Called by the framework during screen init to assign screen id.- Parameters:
id
- screen id
-
getScreenData
-
setScreenData
-
fireEvent
-
getWindow
- Returns:
- screen UI component
-
setWindow
-
getUiEventListeners
-
setUiEventListeners
protected void setUiEventListeners(@Nullable List<org.springframework.context.ApplicationListener> listeners) -
addInitListener
AddsScreen.InitEvent
listener.You can also add an event listener declaratively using a controller method annotated with
Subscribe
:@Subscribe protected void onInit(InitEvent event) { // handle event here }
- Parameters:
listener
- listener- Returns:
- subscription
-
addAfterInitListener
AddsScreen.AfterInitEvent
listener.You can also add an event listener declaratively using a controller method annotated with
Subscribe
:@Subscribe protected void onAfterInit(AfterInitEvent event) { // handle event here }
- Parameters:
listener
- listener- Returns:
- subscription
-
addBeforeCloseListener
AddsScreen.BeforeCloseEvent
listener.You can also add an event listener declaratively using a controller method annotated with
Subscribe
:@Subscribe protected void onBeforeClose(BeforeCloseEvent event) { // handle event here }
- Parameters:
listener
- listener- Returns:
- subscription
-
addBeforeShowListener
AddsScreen.BeforeShowEvent
listener.You can also add an event listener declaratively using a controller method annotated with
Subscribe
:@Subscribe protected void onBeforeShow(BeforeShowEvent event) { // handle event here }
- Parameters:
listener
- listener- Returns:
- subscription
-
addAfterShowListener
AddsScreen.AfterShowEvent
listener.You can also add an event listener declaratively using a controller method annotated with
Subscribe
:@Subscribe protected void onAfterShow(AfterShowEvent event) { // handle event here }
- Parameters:
listener
- listener- Returns:
- subscription
-
addAfterCloseListener
AddsScreen.AfterCloseEvent
listener.You can also add an event listener declaratively using a controller method annotated with
Subscribe
:@Subscribe protected void onAfterClose(AfterCloseEvent event) { // handle event here }
- Parameters:
listener
- listener- Returns:
- subscription
-
addAfterDetachListener
AddsScreen.AfterDetachEvent
listener.You can also add an event listener declaratively using a controller method annotated with
Subscribe
:@Subscribe protected void onAfterDetach(AfterDetachEvent event) { // handle event here }
- Parameters:
listener
- listener- Returns:
- subscription
-
addUrlParamsChangeListener
AddsUrlParamsChangedEvent
listener.You can also add an event listener declaratively using a controller method annotated with
Subscribe
:@Subscribe protected void onUrlParamsChanged(UrlParamsChangedEvent event) { // handle event here }
- Parameters:
listener
- listener- Returns:
- subscription
-
show
Shows this screen.- See Also:
-
close
Requests closing of the screen caused by the given action.- Parameters:
action
- close action which is propagated toScreen.BeforeCloseEvent
andScreen.AfterCloseEvent
- Returns:
- result of operation
-
closeWithDefaultAction
Closes the screen withFrameOwner.WINDOW_CLOSE_ACTION
action.- Returns:
- result of close request
-
close
Requests closing of the screen with the givenoutcome
.- Parameters:
outcome
-StandardOutcome
- Returns:
- result of operation
-
isMultipleOpen
protected boolean isMultipleOpen()- Returns:
- true if screen can be opened multiple times from a navigation menu
-
isSameScreen
Compares this screen with an already opened screen.- Parameters:
openedScreen
- already opened screen- Returns:
- true if screens are the same
-
isScreenAction
- Parameters:
action
- target action- Returns:
- true if action is
Action.ScreenAction
-