public class FragmentImpl extends VBoxLayoutImpl implements Fragment, FragmentImplementation
ExpandingLayout.ExpandDirection
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
LayoutClickNotifier.LayoutClickEvent
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
protected FrameActionsHolder |
actionsHolder |
protected java.util.Map<java.lang.String,Component> |
allComponents |
protected FrameContext |
context |
protected java.util.Set<Facet> |
facets |
protected ScreenFragment |
frameOwner |
layoutClickRegistration, ownComponents, shortcuts
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
NAME
Constructor and Description |
---|
FragmentImpl() |
Modifier and Type | Method and Description |
---|---|
void |
add(Component childComponent,
int index) |
void |
addAction(Action action)
Add an action to the component
|
void |
addAction(Action action,
int index)
Add an action to the component with index.
|
void |
addFacet(Facet facet)
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 |
disableEventListeners() |
protected void |
enableEventListeners() |
Action |
getAction(java.lang.String id) |
java.util.Collection<Action> |
getActions() |
Component |
getComponent(java.lang.String id)
Gets a component belonging to the whole components tree below this container.
|
FrameContext |
getContext() |
Facet |
getFacet(java.lang.String id)
Finds registered facet by ID.
|
java.util.stream.Stream<Facet> |
getFacets() |
ScreenFragment |
getFrameOwner() |
Component |
getRegisteredComponent(java.lang.String id)
INTERNAL.
|
protected boolean |
handleValidationErrors(ValidationErrors errors) |
protected void |
initComponent(JmixVerticalActionsLayout component) |
void |
initUiEventListeners() |
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 component
|
void |
removeAction(java.lang.String id)
Remove the action by its ID.
|
void |
removeAllActions()
Remove all actions from the component
|
void |
removeFacet(Facet facet)
Removes the non-visual component from the frame.
|
void |
setContext(FrameContext ctx)
INTERNAL.
|
void |
setFrame(Frame frame) |
void |
setFrameOwner(ScreenFragment controller) |
void |
unregisterComponent(Component component)
INTERNAL.
|
void |
validate()
Check validity by invoking validators on all components which support them.
|
boolean |
validate(java.util.List<Validatable> fields)
Check validity by invoking validators on specified components which support them
and show validation result notification.
|
boolean |
validateAll()
Check validity by invoking validators on all components which support them
and show validation result notification.
|
createComponent, getExpandDirection
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
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFacetNN
expand, getExpandDirection, isExpanded, resetExpanded
getComponent, getComponentNN, indexOf
add, add, remove, remove, removeAll
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
focusFirstComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStream
getFrame
getSpacing, setSpacing
getMargin, setMargin, setMargin, setMargin
getActionNN, getSubPart
getIcon, setIcon, setIconFromSet
getCaption, setCaption
getDescription, setDescription
getExpandRatio, setExpandRatio
addLayoutClickListener
addShortcutAction, removeShortcutAction
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
isDescriptionAsHtml, setDescriptionAsHtml
isRequiredIndicatorVisible, setRequiredIndicatorVisible
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
protected FrameContext context
protected ScreenFragment frameOwner
protected java.util.Set<Facet> facets
protected java.util.Map<java.lang.String,Component> allComponents
protected FrameActionsHolder actionsHolder
protected void initComponent(JmixVerticalActionsLayout component)
initComponent
in class VBoxLayoutImpl
public void addFacet(Facet facet)
Frame
@Nullable public Facet getFacet(java.lang.String id)
Frame
public void removeFacet(Facet facet)
Frame
removeFacet
in interface Frame
facet
- facetpublic java.util.stream.Stream<Facet> getFacets()
public void add(Component childComponent, int index)
add
in interface OrderedContainer
add
in class AbstractBox<JmixVerticalActionsLayout>
protected void attachToFrame(Component childComponent)
attachToFrame
in class AbstractBox<JmixVerticalActionsLayout>
public void setFrame(@Nullable Frame frame)
setFrame
in interface Component.BelongToFrame
setFrame
in class AbstractBox<JmixVerticalActionsLayout>
public ScreenFragment getFrameOwner()
getFrameOwner
in interface Fragment
getFrameOwner
in interface Frame
Screen
,
ScreenFragment
public FrameContext getContext()
getContext
in interface Fragment
getContext
in interface Frame
public void setContext(FrameContext ctx)
FrameImplementation
setContext
in interface FrameImplementation
public void registerComponent(Component component)
FrameImplementation
registerComponent
in interface FrameImplementation
public void unregisterComponent(Component component)
FrameImplementation
unregisterComponent
in interface FrameImplementation
@Nullable public Component getRegisteredComponent(java.lang.String id)
FrameImplementation
getRegisteredComponent
in interface FrameImplementation
@Nullable public Component getComponent(java.lang.String id)
HasComponents
getComponent
in interface HasComponents
getComponent
in class AbstractBox<JmixVerticalActionsLayout>
public boolean isValid()
Frame
public void validate() throws ValidationException
Frame
validate
in interface Frame
ValidationException
- if some components are currently in invalid statepublic boolean validate(java.util.List<Validatable> fields)
Frame
public boolean validateAll()
Frame
validateAll
in interface Frame
protected boolean handleValidationErrors(ValidationErrors errors)
public void addAction(Action action)
ActionsHolder
addAction
in interface ActionsHolder
public void addAction(Action action, int index)
ActionsHolder
addAction
in interface ActionsHolder
public void removeAction(Action action)
ActionsHolder
removeAction
in interface ActionsHolder
public void removeAction(java.lang.String id)
ActionsHolder
removeAction
in interface ActionsHolder
public void removeAllActions()
ActionsHolder
removeAllActions
in interface ActionsHolder
public java.util.Collection<Action> getActions()
getActions
in interface ActionsHolder
@Nullable public Action getAction(java.lang.String id)
getAction
in interface ActionsHolder
public void setFrameOwner(ScreenFragment controller)
setFrameOwner
in interface FragmentImplementation
public void initUiEventListeners()
initUiEventListeners
in interface FragmentImplementation
public void attached()
AttachNotifier
attached
in interface AttachNotifier
attached
in class AbstractBox<JmixVerticalActionsLayout>
public void detached()
AttachNotifier
detached
in interface AttachNotifier
detached
in class AbstractBox<JmixVerticalActionsLayout>
protected void disableEventListeners()
protected void enableEventListeners()