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.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.ExpandingLayout
ExpandingLayout.ExpandDirection
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.LayoutClickNotifier
LayoutClickNotifier.LayoutClickEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected FrameActionsHolder
protected FrameContext
protected ScreenFragment
Fields inherited from class io.jmix.ui.component.impl.AbstractBox
layoutClickRegistration, ownComponents, shortcuts
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.ui.component.VBoxLayout
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Add an action to the componentvoid
Add an action to the component with index.void
Registers the passed non-visual component in the frame.void
attached()
Notifies all listeners that component has been attached.protected void
attachToFrame
(Component childComponent) void
detached()
Notifies all listeners that component has been detached.protected void
protected void
getComponent
(String id) Gets a component belonging to the whole components tree below this container.Finds registered facet by ID.INTERNAL.protected boolean
protected void
initComponent
(JmixVerticalActionsLayout component) void
boolean
isValid()
Check validity by invoking validators on all components which support them.void
registerComponent
(Component component) INTERNAL.void
removeAction
(Action action) Remove the action from the componentvoid
removeAction
(String id) Remove the action by its ID.void
Remove all actions from the componentvoid
removeFacet
(Facet facet) Removes the non-visual component from the frame.void
setContext
(FrameContext ctx) INTERNAL.void
void
setFrameOwner
(ScreenFragment controller) void
unregisterComponent
(Component component) INTERNAL.void
validate()
Check validity by invoking validators on all components which support them.boolean
validate
(List<Validatable> fields) Check validity by invoking validators on specified components which support them and show validation result notification.boolean
Check 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, getExpandDirection
Methods 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, setSpacing
Methods 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, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.ActionsHolder
getActionNN, getSubPart
Methods 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, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.ComponentContainer
add, add, remove, remove, removeAll
Methods inherited from interface io.jmix.ui.component.ExpandingLayout
expand, getExpandDirection, isExpanded, resetExpanded
Methods inherited from interface io.jmix.ui.component.Frame
getFacetNN
Methods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStream
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasMargin
getMargin, setMargin, setMargin, setMargin
Methods inherited from interface io.jmix.ui.component.HasRequiredIndicator
isRequiredIndicatorVisible, setRequiredIndicatorVisible
Methods inherited from interface io.jmix.ui.component.HasSpacing
getSpacing, setSpacing
Methods inherited from interface io.jmix.ui.component.LayoutClickNotifier
addLayoutClickListener
Methods inherited from interface io.jmix.ui.component.OrderedContainer
getComponent, getComponentNN, indexOf
Methods inherited from interface io.jmix.ui.component.ShortcutNotifier
addShortcutAction, removeShortcutAction
Methods 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:
initComponent
in classVBoxLayoutImpl
-
addFacet
Description copied from interface:Frame
Registers the passed non-visual component in the frame. -
getFacet
Description copied from interface:Frame
Finds registered facet by ID. -
removeFacet
Description copied from interface:Frame
Removes the non-visual component from the frame.- Specified by:
removeFacet
in interfaceFrame
- Parameters:
facet
- facet
-
getFacets
-
add
- Specified by:
add
in interfaceOrderedContainer
- Overrides:
add
in classAbstractBox<JmixVerticalActionsLayout>
-
attachToFrame
- Overrides:
attachToFrame
in classAbstractBox<JmixVerticalActionsLayout>
-
setFrame
- Specified by:
setFrame
in interfaceComponent.BelongToFrame
- Overrides:
setFrame
in classAbstractBox<JmixVerticalActionsLayout>
-
getFrameOwner
- Specified by:
getFrameOwner
in interfaceFragment
- Specified by:
getFrameOwner
in interfaceFrame
- Returns:
- UI controller of the frame
- See Also:
-
getContext
- Specified by:
getContext
in interfaceFragment
- Specified by:
getContext
in interfaceFrame
- Returns:
- current frame context
-
setContext
Description copied from interface:FrameImplementation
INTERNAL. Don't call from application code.- Specified by:
setContext
in interfaceFrameImplementation
-
registerComponent
Description copied from interface:FrameImplementation
INTERNAL. Don't call from application code.- Specified by:
registerComponent
in interfaceFrameImplementation
-
unregisterComponent
Description copied from interface:FrameImplementation
INTERNAL. Don't call from application code.- Specified by:
unregisterComponent
in interfaceFrameImplementation
-
getRegisteredComponent
Description copied from interface:FrameImplementation
INTERNAL. Don't call from application code.- Specified by:
getRegisteredComponent
in interfaceFrameImplementation
-
getComponent
Description copied from interface:HasComponents
Gets a component belonging to the whole components tree below this container.- Specified by:
getComponent
in interfaceHasComponents
- Overrides:
getComponent
in classAbstractBox<JmixVerticalActionsLayout>
- Returns:
- component or null if not found
-
isValid
public boolean isValid()Description copied from interface:Frame
Check validity by invoking validators on all components which support them. -
validate
Description copied from interface:Frame
Check validity by invoking validators on all components which support them.- Specified by:
validate
in interfaceFrame
- Throws:
ValidationException
- if some components are currently in invalid state
-
validate
Description copied from interface:Frame
Check validity by invoking validators on specified components which support them and show validation result notification. -
validateAll
public boolean validateAll()Description copied from interface:Frame
Check validity by invoking validators on all components which support them and show validation result notification.- Specified by:
validateAll
in interfaceFrame
- Returns:
- true if the validation was successful, false if there were any problems
-
handleValidationErrors
-
addAction
Description copied from interface:ActionsHolder
Add an action to the component- Specified by:
addAction
in interfaceActionsHolder
-
addAction
Description copied from interface:ActionsHolder
Add an action to the component with index.- Specified by:
addAction
in interfaceActionsHolder
-
removeAction
Description copied from interface:ActionsHolder
Remove the action from the component- Specified by:
removeAction
in interfaceActionsHolder
-
removeAction
Description copied from interface:ActionsHolder
Remove the action by its ID. If there is no action with that ID, nothing happens.- Specified by:
removeAction
in interfaceActionsHolder
-
removeAllActions
public void removeAllActions()Description copied from interface:ActionsHolder
Remove all actions from the component- Specified by:
removeAllActions
in interfaceActionsHolder
-
getActions
- Specified by:
getActions
in interfaceActionsHolder
- Returns:
- unmodifiable collection of actions
-
getAction
- Specified by:
getAction
in interfaceActionsHolder
- Returns:
- an action by its ID, or null if not found
-
setFrameOwner
- Specified by:
setFrameOwner
in interfaceFragmentImplementation
-
initUiEventListeners
public void initUiEventListeners()- Specified by:
initUiEventListeners
in interfaceFragmentImplementation
-
attached
public void attached()Description copied from interface:AttachNotifier
Notifies all listeners that component has been attached.- Specified by:
attached
in interfaceAttachNotifier
- Overrides:
attached
in classAbstractBox<JmixVerticalActionsLayout>
-
detached
public void detached()Description copied from interface:AttachNotifier
Notifies all listeners that component has been detached.- Specified by:
detached
in interfaceAttachNotifier
- Overrides:
detached
in classAbstractBox<JmixVerticalActionsLayout>
-
disableEventListeners
protected void disableEventListeners() -
enableEventListeners
protected void enableEventListeners()
-