Package io.jmix.ui.presentation.facet
Class PresentationsFacetImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractFacet
io.jmix.ui.presentation.facet.PresentationsFacetImpl
- All Implemented Interfaces:
Facet,PresentationsFacet,ScreenSettingsFacetResolver.AfterShowEventHandler,ScreenSettingsFacetResolver.PostAfterShowEventHandler
public class PresentationsFacetImpl
extends AbstractFacet
implements PresentationsFacet, ScreenSettingsFacetResolver.AfterShowEventHandler, ScreenSettingsFacetResolver.PostAfterShowEventHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected PresentationsManagerprotected ScreenSettingsFacetResolverFields inherited from class io.jmix.ui.component.impl.AbstractFacet
id, owner -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponentIds(String... ids) Adds component ids that should be handled whenPresentationsFacet.isAuto()returns false.protected voidapplyDefaultPresentation(Collection<Component> components) protected voidprotected voidcommitPresentations(Collection<Component> components) protected Collection<Component>fillComponents(Collection<Component> components) protected Collection<Component>fillWithInnerComponents(Collection<Component> components, HasInnerComponents hasInnerComponents) Collection depends onPresentationsFacet.isAuto()property.protected ScreenbooleanisAuto()protected booleanvoidvoidvoidsetAuto(boolean auto) Set to true if facet should apply and save presentations for all supported component in the screen.voidprotected voidsetupDefaultSettings(Collection<Component> components) protected voidprotected voidMethods inherited from class io.jmix.ui.component.impl.AbstractFacet
getEventHub, getId, getOwner, hasSubscriptions, publish, setId, unsubscribe
-
Field Details
-
settingsFacetResolver
-
presentationsManager
-
auto
protected boolean auto -
componentIds
-
isAfterShowHandled
protected boolean isAfterShowHandled -
isPostAfterShowHandled
protected boolean isPostAfterShowHandled
-
-
Constructor Details
-
PresentationsFacetImpl
public PresentationsFacetImpl()
-
-
Method Details
-
isAuto
public boolean isAuto()- Specified by:
isAutoin interfacePresentationsFacet- Returns:
- true if facet should apply and save presentations for all supported component in the screen. False by default.
-
setAuto
public void setAuto(boolean auto) Description copied from interface:PresentationsFacetSet to true if facet should apply and save presentations for all supported component in the screen. False by default.- Specified by:
setAutoin interfacePresentationsFacet- Parameters:
auto- whether facet should include all components for applying/saving presentations
-
addComponentIds
Description copied from interface:PresentationsFacetAdds component ids that should be handled whenPresentationsFacet.isAuto()returns false.Note, component must be attached to the Window, otherwise it will be ignored.
- Specified by:
addComponentIdsin interfacePresentationsFacet- Parameters:
ids- component ids
-
getComponentIds
- Specified by:
getComponentIdsin interfacePresentationsFacet- Returns:
- list of component ids that should be handled when
PresentationsFacet.isAuto()returns false.
-
getComponents
Description copied from interface:PresentationsFacetCollection depends onPresentationsFacet.isAuto()property. IfPresentationsFacet.isAuto()returns true collection will be filled byWindow's components, otherwise collection will be filled by components were added byPresentationsFacet.addComponentIds(String...).- Specified by:
getComponentsin interfacePresentationsFacet- Returns:
- components collection that is used for applying and saving presentations.
-
setOwner
Description copied from interface:Facet- Specified by:
setOwnerin interfaceFacet- Overrides:
setOwnerin classAbstractFacet- Parameters:
owner- owner frame
-
setupDefaultSettings
-
applyDefaultPresentation
-
commitPresentations
-
subscribe
protected void subscribe() -
unsubscribe
protected void unsubscribe() -
onAfterShowEvent
- Specified by:
onAfterShowEventin interfaceScreenSettingsFacetResolver.AfterShowEventHandler
-
onPostAfterShow
public void onPostAfterShow()- Specified by:
onPostAfterShowin interfaceScreenSettingsFacetResolver.PostAfterShowEventHandler
-
checkAttachedFrame
protected void checkAttachedFrame() -
getScreenOwner
-
isPresentationsEnabled
protected boolean isPresentationsEnabled() -
fillComponents
-
fillWithInnerComponents
protected Collection<Component> fillWithInnerComponents(Collection<Component> components, HasInnerComponents hasInnerComponents)
-