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

public abstract class ScreenFragment extends Object implements FrameOwner
Base class for all fragment controllers.
See Also:
  • 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

      @Nullable protected Map<Class<?>,Object> getExtensions()
    • setExtensions

      protected void setExtensions(@Nullable Map<Class<?>,Object> extensions)
    • getEventHub

      protected EventHub getEventHub()
    • fireEvent

      protected <E> void fireEvent(Class<E> eventType, E event)
    • setFragment

      protected void setFragment(Fragment fragment)
    • getFragment

      public Fragment getFragment()
    • getHostController

      public FrameOwner getHostController()
    • setHostController

      protected void setHostController(FrameOwner hostController)
    • getHostScreen

      protected Screen getHostScreen()
      Returns:
      host screen of the fragment
      Throws:
      IllegalStateException - if host screen cannot be found though hierarchy of fragments
    • setId

      protected void setId(@Nullable String id)
      Sets id of the screen fragment. Called by the framework during screen init to assign screen id.
      Parameters:
      id - screen id
    • getId

      @Nullable public String getId()
    • getScreenData

      protected ScreenData getScreenData()
    • setScreenData

      protected void setScreenData(ScreenData data)
    • getUiEventListeners

      @Nullable protected List<org.springframework.context.ApplicationListener> getUiEventListeners()
    • setUiEventListeners

      protected void setUiEventListeners(@Nullable List<org.springframework.context.ApplicationListener> listeners)
    • init

      public ScreenFragment init()
      Convenient method to perform programmatic initialization of the fragment.
      See Also:
    • addInitListener

      protected Subscription addInitListener(Consumer<ScreenFragment.InitEvent> listener)
      Parameters:
      listener - listener
      Returns:
      subscription
    • addAfterInitListener

      protected Subscription addAfterInitListener(Consumer<ScreenFragment.AfterInitEvent> listener)
      Parameters:
      listener - listener
      Returns:
      subscription
    • addAttachEventListener

      protected Subscription addAttachEventListener(Consumer<ScreenFragment.AttachEvent> listener)
      Parameters:
      listener - listener
      Returns:
      subscription
    • addDetachEventListener

      protected Subscription addDetachEventListener(Consumer<ScreenFragment.DetachEvent> listener)
      Parameters:
      listener - listener
      Returns:
      subscription