Package io.jmix.ui.screen
Class ScreenFragment
java.lang.Object
io.jmix.ui.screen.ScreenFragment
- All Implemented Interfaces:
FrameOwner
- Direct Known Subclasses:
AbstractElementPropertiesFragment,AssignmentDetailsPropertiesFragment,AttributeLocalizationFragment,AttributeLocationFragment,BandDefinitionEditor,BpmnDiagramViewerFragment,CanvasFragment,CategoryAttrsFragment,ChartWidget,ChartWidgetEdit,DescriptionEditFragment,DispatcherPropertiesFragment,EmailAttachmentFragment,EmailTemplateAttachmentsFragment,EmailTemplateParametersFragment,EntityAttributesFragment,EntityListValueFragment,EntityTreeFragment,EntityValueFragment,EnumValueFragment,ErrorRefPropertiesFragment,ExecutionListenersFragment,ExtensionPropertiesFragment,FieldsFragment,FilterConfigurationModelFragment,FormDataPropertiesFragment,ImapEventHandlersFragment,InputParametersFragment,JpqlParametersFragment,JsonChartFragment,MBeanOperationFragment,MessageRefPropertiesFragment,MultiInstanceLoopCharacteristicsPropertiesFragment,PaletteFragment,ParametersFragment,ParametersFragment,PivotTableFragment,ProcessInstanceEditHistoryFragment,ProcessInstanceEditRuntimeFragment,ReportEditGeneralFragment,ReportEditLocalesFragment,ReportEditParametersFragment,ReportEditSecurityFragment,ReportEditTemplatesFragment,ReportEditValueFormatsFragment,RoleAssignmentFragment,RoleFilterFragment,SignalRefPropertiesFragment,SimpleValueFragment,SnapshotDiffViewer,StepFragment,TimerDescriptionPropertiesFragment,UiDataFilterConfigurationModelFragment,UserSubstitutionsFragment,ValueFormatsFragment
Base class for all fragment controllers.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEvent sent when the fragment controller is created, dependency injection is completed, and all components have completed their internal initialization procedures.static classEvent sent when the fragment controller is initialized and added to host screen.static classEvent sent when the fragment controller has been removed from host screen.static classEvent sent when the fragment controller is 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 TypeMethodDescriptionprotected SubscriptionAddsScreenFragment.AfterInitEventlistener.protected SubscriptionAddsScreenFragment.AttachEventlistener.protected SubscriptionAddsScreenFragment.DetachEventlistener.protected SubscriptionaddInitListener(Consumer<ScreenFragment.InitEvent> listener) AddsScreenFragment.InitEventlistener.protected <E> voidprotected org.springframework.context.ApplicationContextprotected EventHubprotected ScreengetId()protected ScreenDataprotected List<org.springframework.context.ApplicationListener>init()Convenient method to perform programmatic initialization of the fragment.protected voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) protected voidsetExtensions(Map<Class<?>, Object> extensions) protected voidsetFragment(Fragment fragment) protected voidsetHostController(FrameOwner hostController) protected voidSets id of the screen fragment.protected voidsetScreenData(ScreenData data) protected voidsetUiEventListeners(List<org.springframework.context.ApplicationListener> listeners)
-
Constructor Details
-
ScreenFragment
public ScreenFragment()
-
-
Method Details
-
setApplicationContext
@Autowired protected void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) -
getApplicationContext
protected org.springframework.context.ApplicationContext getApplicationContext() -
getExtensions
-
setExtensions
-
getEventHub
-
fireEvent
-
setFragment
-
getFragment
-
getHostController
-
setHostController
-
getHostScreen
- Returns:
- host screen of the fragment
- Throws:
IllegalStateException- if host screen cannot be found though hierarchy of fragments
-
setId
Sets id of the screen fragment. Called by the framework during screen init to assign screen id.- Parameters:
id- screen id
-
getId
-
getScreenData
-
setScreenData
-
getUiEventListeners
-
setUiEventListeners
protected void setUiEventListeners(@Nullable List<org.springframework.context.ApplicationListener> listeners) -
init
Convenient method to perform programmatic initialization of the fragment.- See Also:
-
addInitListener
AddsScreenFragment.InitEventlistener.- Parameters:
listener- listener- Returns:
- subscription
-
addAfterInitListener
AddsScreenFragment.AfterInitEventlistener.- Parameters:
listener- listener- Returns:
- subscription
-
addAttachEventListener
AddsScreenFragment.AttachEventlistener.- Parameters:
listener- listener- Returns:
- subscription
-
addDetachEventListener
AddsScreenFragment.DetachEventlistener.- Parameters:
listener- listener- Returns:
- subscription
-