Package io.jmix.ui.component.impl
Class AbstractScreenFacet<S extends Screen>
java.lang.Object
io.jmix.ui.component.impl.AbstractFacet
io.jmix.ui.component.impl.AbstractScreenFacet<S>
- All Implemented Interfaces:
- Facet,- ScreenFacet<S>,- org.springframework.beans.factory.Aware,- org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
- AbstractEntityAwareScreenFacet,- ScreenFacetImpl
public abstract class AbstractScreenFacet<S extends Screen>
extends AbstractFacet
implements ScreenFacet<S>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Stringprotected List<Consumer<Screen.AfterCloseEvent>>protected List<Consumer<Screen.AfterShowEvent>>protected org.springframework.context.ApplicationContextprotected Stringprotected OpenModeprotected Supplier<ScreenOptions>protected Collection<UiControllerProperty>protected Sprotected StringFields inherited from class io.jmix.ui.component.impl.AbstractFacetid, owner
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAdds the givenConsumeras screen after close event listener.Adds the givenConsumeras screen after show event listener.protected voidapplyScreenConfigurer(S screen) protected ScreenOptionsprotected voidinitScreenListeners(Screen screen) protected voidinjectScreenProperties(S screen, Collection<UiControllerProperty> properties) protected voidprotected voidvoidsetActionTarget(String actionId) Sets that screen should be shown when action with idactionIdis performed.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetButtonTarget(String buttonId) Sets that screen should be shown when button with idactionIdis clicked.voidsetOpenMode(OpenMode openMode) Sets screenOpenMode.voidsetOptionsProvider(Supplier<ScreenOptions> optionsProvider) Sets the givenSupplieras screen options provider.voidvoidsetProperties(Collection<UiControllerProperty> properties) Sets properties that will be injected into opened screen via public setters.voidsetScreenClass(Class<S> screenClass) Sets class of screen to open.voidsetScreenConfigurer(Consumer<S> screenConfigurer) Sets the screen configurer.voidsetScreenId(String screenId) Sets the id of screen to open.protected voidprotected voidsubscribeOnAction(Frame owner) protected voidsubscribeOnButton(Frame owner) Methods inherited from class io.jmix.ui.component.impl.AbstractFacetgetEventHub, getId, getOwner, hasSubscriptions, publish, setId, unsubscribeMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.component.ScreenFacetcreate, show
- 
Field Details- 
applicationContextprotected org.springframework.context.ApplicationContext applicationContext
- 
screenId
- 
screenClass
- 
openMode
- 
screenConfigurer
- 
optionsProvider
- 
properties
- 
actionId
- 
buttonId
- 
afterShowListeners
- 
afterCloseListeners
- 
screen
 
- 
- 
Constructor Details- 
AbstractScreenFacetpublic AbstractScreenFacet()
 
- 
- 
Method Details- 
setApplicationContextpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
- setApplicationContextin interface- org.springframework.context.ApplicationContextAware
 
- 
setScreenIdDescription copied from interface:ScreenFacetSets the id of screen to open.- Specified by:
- setScreenIdin interface- ScreenFacet<S extends Screen>
- Parameters:
- screenId- screen id
 
- 
getScreenId- Specified by:
- getScreenIdin interface- ScreenFacet<S extends Screen>
- Returns:
- screen id
 
- 
setScreenClassDescription copied from interface:ScreenFacetSets class of screen to open.- Specified by:
- setScreenClassin interface- ScreenFacet<S extends Screen>
- Parameters:
- screenClass- screen class
 
- 
getScreenClass- Specified by:
- getScreenClassin interface- ScreenFacet<S extends Screen>
- Returns:
- class of screen to open
 
- 
getOpenMode- Specified by:
- getOpenModein interface- ScreenFacet<S extends Screen>
- Returns:
- screen OpenMode
 
- 
setOpenModeDescription copied from interface:ScreenFacetSets screenOpenMode.- Specified by:
- setOpenModein interface- ScreenFacet<S extends Screen>
- Parameters:
- openMode- an open mode to set
 
- 
setOptionsProviderDescription copied from interface:ScreenFacetSets the givenSupplieras screen options provider.- Specified by:
- setOptionsProviderin interface- ScreenFacet<S extends Screen>
- Parameters:
- optionsProvider- screen options provider
 
- 
getOptionsProvider- Specified by:
- getOptionsProviderin interface- ScreenFacet<S extends Screen>
- Returns:
- ScreenOptionsprovider
 
- 
getScreenConfigurer- Specified by:
- getScreenConfigurerin interface- ScreenFacet<S extends Screen>
- Returns:
- the screen configurer or nullof not set
 
- 
setScreenConfigurerDescription copied from interface:ScreenFacetSets the screen configurer. Use the configurer if you need to provide parameters to the opened screen through setters. The preferred way to set the configurer is using a controller method annotated withInstall, e.g.:@Install(to = "userBrowseFacet", subject = "screenConfigurer") private void userBrowseFacetScreenConfigurer(UserBrowse userBrowse) { userBrowse.setSomeParameter(someValue); }- Specified by:
- setScreenConfigurerin interface- ScreenFacet<S extends Screen>
- Parameters:
- screenConfigurer- the configurer to set.
 
- 
setPropertiesDescription copied from interface:ScreenFacetSets properties that will be injected into opened screen via public setters.- Specified by:
- setPropertiesin interface- ScreenFacet<S extends Screen>
- Parameters:
- properties- screen properties
 
- 
getProperties- Specified by:
- getPropertiesin interface- ScreenFacet<S extends Screen>
- Returns:
- properties that will be injected into opened screen via public setters.
 
- 
getActionTarget- Specified by:
- getActionTargetin interface- ScreenFacet<S extends Screen>
- Returns:
- id of action that triggers screen
 
- 
setActionTargetDescription copied from interface:ScreenFacetSets that screen should be shown when action with idactionIdis performed.- Specified by:
- setActionTargetin interface- ScreenFacet<S extends Screen>
- Parameters:
- actionId- action id
 
- 
getButtonTarget- Specified by:
- getButtonTargetin interface- ScreenFacet<S extends Screen>
- Returns:
- id of button that triggers screen
 
- 
setButtonTargetDescription copied from interface:ScreenFacetSets that screen should be shown when button with idactionIdis clicked.- Specified by:
- setButtonTargetin interface- ScreenFacet<S extends Screen>
- Parameters:
- buttonId- button id
 
- 
setOwnerDescription copied from interface:Facet- Specified by:
- setOwnerin interface- Facet
- Overrides:
- setOwnerin class- AbstractFacet
- Parameters:
- owner- owner frame
 
- 
addAfterShowEventListenerDescription copied from interface:ScreenFacetAdds the givenConsumeras screen after show event listener.- Specified by:
- addAfterShowEventListenerin interface- ScreenFacet<S extends Screen>
- Parameters:
- listener- listener
- Returns:
- after show event subscription
 
- 
internalRemoveAfterShowEventListener
- 
addAfterCloseEventListenerDescription copied from interface:ScreenFacetAdds the givenConsumeras screen after close event listener.- Specified by:
- addAfterCloseEventListenerin interface- ScreenFacet<S extends Screen>
- Parameters:
- listener- listener
- Returns:
- after close event subscription
 
- 
internalRemoveAfterCloseEventListener
- 
initScreenListeners
- 
subscribeprotected void subscribe()
- 
subscribeOnAction
- 
subscribeOnButton
- 
injectScreenProperties
- 
applyScreenConfigurer
- 
getScreenOptions
 
-