Package io.jmix.ui.component.impl
Class FragmentImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<T>
io.jmix.ui.component.impl.AbstractBox<JmixVerticalActionsLayout>
io.jmix.ui.component.impl.VBoxLayoutImpl
io.jmix.ui.component.impl.FragmentImpl
- All Implemented Interfaces:
ActionsHolder,AttachNotifier,BoxLayout,Component,Component.BelongToFrame,Component.HasCaption,Component.HasDescription,Component.HasIcon,Component.HasXmlDescriptor,Component.Wrapper,ComponentContainer,ExpandingLayout,Fragment,Frame,HasComponents,HasContextHelp,HasDebugId,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,HasMargin,HasRequiredIndicator,HasSpacing,HasSubParts,FragmentImplementation,FrameImplementation,LayoutClickNotifier,OrderedContainer,ShortcutNotifier,SupportsExpandRatio,VBoxLayout
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.ExpandingLayout
ExpandingLayout.ExpandDirectionNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.LayoutClickNotifier
LayoutClickNotifier.LayoutClickEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FrameActionsHolderprotected FrameContextprotected ScreenFragmentFields inherited from class io.jmix.ui.component.impl.AbstractBox
layoutClickRegistration, ownComponents, shortcutsFields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZEFields inherited from interface io.jmix.ui.component.VBoxLayout
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidAdd an action to the componentvoidAdd an action to the component with index.voidRegisters the passed non-visual component in the frame.voidattached()Notifies all listeners that component has been attached.protected voidattachToFrame(Component childComponent) voiddetached()Notifies all listeners that component has been detached.protected voidprotected voidgetComponent(String id) Gets a component belonging to the whole components tree below this container.Finds registered facet by ID.INTERNAL.protected booleanprotected voidinitComponent(JmixVerticalActionsLayout component) voidbooleanisValid()Check validity by invoking validators on all components which support them.voidregisterComponent(Component component) INTERNAL.voidremoveAction(Action action) Remove the action from the componentvoidremoveAction(String id) Remove the action by its ID.voidRemove all actions from the componentvoidremoveFacet(Facet facet) Removes the non-visual component from the frame.voidsetContext(FrameContext ctx) INTERNAL.voidvoidsetFrameOwner(ScreenFragment controller) voidunregisterComponent(Component component) INTERNAL.voidvalidate()Check validity by invoking validators on all components which support them.booleanvalidate(List<Validatable> fields) Check validity by invoking validators on specified components which support them and show validation result notification.booleanCheck validity by invoking validators on all components which support them and show validation result notification.Methods inherited from class io.jmix.ui.component.impl.VBoxLayoutImpl
createComponent, getExpandDirectionMethods inherited from class io.jmix.ui.component.impl.AbstractBox
add, addLayoutClickListener, addShortcutAction, expand, findChildComponent, getComponent, getComponents, getExpandRatio, getMargin, getOwnComponent, getOwnComponents, getOwnComponentsStream, getSpacing, indexOf, internalRemoveLayoutClickListener, isExpanded, isRequiredIndicatorVisible, remove, removeAll, removeShortcutAction, resetExpanded, setExpandRatio, setMargin, setRequiredIndicatorVisible, setSpacingMethods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setParent, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.component.ActionsHolder
getActionNN, getSubPartMethods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrameMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.ComponentContainer
add, add, remove, remove, removeAllMethods inherited from interface io.jmix.ui.component.ExpandingLayout
expand, getExpandDirection, isExpanded, resetExpandedMethods inherited from interface io.jmix.ui.component.Frame
getFacetNNMethods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStreamMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabledMethods inherited from interface io.jmix.ui.component.HasMargin
getMargin, setMargin, setMargin, setMarginMethods inherited from interface io.jmix.ui.component.HasRequiredIndicator
isRequiredIndicatorVisible, setRequiredIndicatorVisibleMethods inherited from interface io.jmix.ui.component.HasSpacing
getSpacing, setSpacingMethods inherited from interface io.jmix.ui.component.LayoutClickNotifier
addLayoutClickListenerMethods inherited from interface io.jmix.ui.component.OrderedContainer
getComponent, getComponentNN, indexOfMethods inherited from interface io.jmix.ui.component.ShortcutNotifier
addShortcutAction, removeShortcutActionMethods inherited from interface io.jmix.ui.component.SupportsExpandRatio
getExpandRatio, setExpandRatio
-
Field Details
-
context
-
frameOwner
-
facets
-
allComponents
-
actionsHolder
-
-
Constructor Details
-
FragmentImpl
public FragmentImpl()
-
-
Method Details
-
initComponent
- Overrides:
initComponentin classVBoxLayoutImpl
-
addFacet
Description copied from interface:FrameRegisters the passed non-visual component in the frame. -
getFacet
Description copied from interface:FrameFinds registered facet by ID. -
removeFacet
Description copied from interface:FrameRemoves the non-visual component from the frame.- Specified by:
removeFacetin interfaceFrame- Parameters:
facet- facet
-
getFacets
-
add
- Specified by:
addin interfaceOrderedContainer- Overrides:
addin classAbstractBox<JmixVerticalActionsLayout>
-
attachToFrame
- Overrides:
attachToFramein classAbstractBox<JmixVerticalActionsLayout>
-
setFrame
- Specified by:
setFramein interfaceComponent.BelongToFrame- Overrides:
setFramein classAbstractBox<JmixVerticalActionsLayout>
-
getFrameOwner
- Specified by:
getFrameOwnerin interfaceFragment- Specified by:
getFrameOwnerin interfaceFrame- Returns:
- UI controller of the frame
- See Also:
-
getContext
- Specified by:
getContextin interfaceFragment- Specified by:
getContextin interfaceFrame- Returns:
- current frame context
-
setContext
Description copied from interface:FrameImplementationINTERNAL. Don't call from application code.- Specified by:
setContextin interfaceFrameImplementation
-
registerComponent
Description copied from interface:FrameImplementationINTERNAL. Don't call from application code.- Specified by:
registerComponentin interfaceFrameImplementation
-
unregisterComponent
Description copied from interface:FrameImplementationINTERNAL. Don't call from application code.- Specified by:
unregisterComponentin interfaceFrameImplementation
-
getRegisteredComponent
Description copied from interface:FrameImplementationINTERNAL. Don't call from application code.- Specified by:
getRegisteredComponentin interfaceFrameImplementation
-
getComponent
Description copied from interface:HasComponentsGets a component belonging to the whole components tree below this container.- Specified by:
getComponentin interfaceHasComponents- Overrides:
getComponentin classAbstractBox<JmixVerticalActionsLayout>- Returns:
- component or null if not found
-
isValid
public boolean isValid()Description copied from interface:FrameCheck validity by invoking validators on all components which support them. -
validate
Description copied from interface:FrameCheck validity by invoking validators on all components which support them.- Specified by:
validatein interfaceFrame- Throws:
ValidationException- if some components are currently in invalid state
-
validate
Description copied from interface:FrameCheck validity by invoking validators on specified components which support them and show validation result notification. -
validateAll
public boolean validateAll()Description copied from interface:FrameCheck validity by invoking validators on all components which support them and show validation result notification.- Specified by:
validateAllin interfaceFrame- Returns:
- true if the validation was successful, false if there were any problems
-
handleValidationErrors
-
addAction
Description copied from interface:ActionsHolderAdd an action to the component- Specified by:
addActionin interfaceActionsHolder
-
addAction
Description copied from interface:ActionsHolderAdd an action to the component with index.- Specified by:
addActionin interfaceActionsHolder
-
removeAction
Description copied from interface:ActionsHolderRemove the action from the component- Specified by:
removeActionin interfaceActionsHolder
-
removeAction
Description copied from interface:ActionsHolderRemove the action by its ID. If there is no action with that ID, nothing happens.- Specified by:
removeActionin interfaceActionsHolder
-
removeAllActions
public void removeAllActions()Description copied from interface:ActionsHolderRemove all actions from the component- Specified by:
removeAllActionsin interfaceActionsHolder
-
getActions
- Specified by:
getActionsin interfaceActionsHolder- Returns:
- unmodifiable collection of actions
-
getAction
- Specified by:
getActionin interfaceActionsHolder- Returns:
- an action by its ID, or null if not found
-
setFrameOwner
- Specified by:
setFrameOwnerin interfaceFragmentImplementation
-
initUiEventListeners
public void initUiEventListeners()- Specified by:
initUiEventListenersin interfaceFragmentImplementation
-
attached
public void attached()Description copied from interface:AttachNotifierNotifies all listeners that component has been attached.- Specified by:
attachedin interfaceAttachNotifier- Overrides:
attachedin classAbstractBox<JmixVerticalActionsLayout>
-
detached
public void detached()Description copied from interface:AttachNotifierNotifies all listeners that component has been detached.- Specified by:
detachedin interfaceAttachNotifier- Overrides:
detachedin classAbstractBox<JmixVerticalActionsLayout>
-
disableEventListeners
protected void disableEventListeners() -
enableEventListeners
protected void enableEventListeners()
-