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,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
Nested ClassesModifier and TypeClassDescriptionstatic classEvent sent after the screen is closed by itsclose(CloseAction)method and afterScreen.AfterDetachEvent.static classEvent sent after the screen is removed from the application UI when it is closed by the user or when the user logs out.static classEvent 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 classEvent sent right after the screen is shown, i.e.static classEvent sent right before the screen is closed by itsclose(CloseAction)method.static classEvent sent right before the screen is shown, i.e.static classEvent 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAfterCloseListener(Consumer<Screen.AfterCloseEvent> listener) AddsScreen.AfterCloseEventlistener.protected SubscriptionAddsScreen.AfterDetachEventlistener.protected SubscriptionaddAfterInitListener(Consumer<Screen.AfterInitEvent> listener) AddsScreen.AfterInitEventlistener.addAfterShowListener(Consumer<Screen.AfterShowEvent> listener) AddsScreen.AfterShowEventlistener.protected SubscriptionAddsScreen.BeforeCloseEventlistener.protected SubscriptionaddBeforeShowListener(Consumer<Screen.BeforeShowEvent> listener) AddsScreen.BeforeShowEventlistener.protected SubscriptionaddInitListener(Consumer<Screen.InitEvent> listener) AddsScreen.InitEventlistener.protected SubscriptionAddsUrlParamsChangedEventlistener.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_ACTIONaction.protected <E> voidprotected org.springframework.context.ApplicationContextprotected EventHubgetId()protected ScreenDataprotected List<org.springframework.context.ApplicationListener>protected booleanprotected booleanisSameScreen(Screen openedScreen) Compares this screen with an already opened screen.protected voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) protected voidsetExtensions(Map<Class<?>, Object> extensions) protected voidSets id of the screen.protected voidsetScreenData(ScreenData data) protected voidsetUiEventListeners(List<org.springframework.context.ApplicationListener> listeners) protected voidshow()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.InitEventlistener.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.AfterInitEventlistener.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.BeforeCloseEventlistener.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.BeforeShowEventlistener.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.AfterShowEventlistener.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.AfterCloseEventlistener.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.AfterDetachEventlistener.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
AddsUrlParamsChangedEventlistener.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.BeforeCloseEventandScreen.AfterCloseEvent- Returns:
- result of operation
-
closeWithDefaultAction
Closes the screen withFrameOwner.WINDOW_CLOSE_ACTIONaction.- 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
-