public abstract class AbstractBox<T extends com.vaadin.ui.AbstractOrderedLayout> extends AbstractComponent<T> implements BoxLayout
ExpandingLayout.ExpandDirectionComponent.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperLayoutClickNotifier.LayoutClickEventHasContextHelp.ContextHelpIconClickEvent| Modifier and Type | Field and Description |
|---|---|
protected com.vaadin.shared.Registration |
layoutClickRegistration |
protected java.util.List<Component> |
ownComponents |
protected java.util.Map<ShortcutAction,com.vaadin.event.ShortcutListener> |
shortcuts |
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentAUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE| Constructor and Description |
|---|
AbstractBox() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Component childComponent)
Adds a component to this container.
|
void |
add(Component childComponent,
int index) |
io.jmix.core.common.event.Subscription |
addLayoutClickListener(java.util.function.Consumer<LayoutClickNotifier.LayoutClickEvent> listener)
Adds a listener that is fired when user clicks inside the layout at any place.
|
void |
addShortcutAction(ShortcutAction action) |
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.
|
void |
expand(Component childComponent)
Specifies the component that will be given maximum available space.
|
protected Component |
findChildComponent(com.vaadin.ui.Component childComponent) |
Component |
getComponent(int index)
Returns the component at the given position.
|
Component |
getComponent(java.lang.String id)
Gets a component belonging to the whole components tree below this container.
|
java.util.Collection<Component> |
getComponents()
Gets all components belonging to the whole components tree below this container.
|
float |
getExpandRatio(Component component) |
MarginInfo |
getMargin() |
Component |
getOwnComponent(java.lang.String id)
Gets component directly owned by this container.
|
java.util.Collection<Component> |
getOwnComponents()
Gets all components directly owned by this container.
|
java.util.stream.Stream<Component> |
getOwnComponentsStream()
Gets stream of all components directly owned by this container.
|
boolean |
getSpacing() |
int |
indexOf(Component childComponent) |
protected void |
internalRemoveLayoutClickListener(java.util.function.Consumer<LayoutClickNotifier.LayoutClickEvent> listener) |
boolean |
isExpanded(Component component)
Returns true if the component occupies the maximum available space.
|
boolean |
isRequiredIndicatorVisible()
Returns whether a required indicator should be shown.
|
void |
remove(Component childComponent)
Removes a component from this container.
|
void |
removeAll()
Removes all components from this container.
|
void |
removeShortcutAction(ShortcutAction action) |
void |
resetExpanded()
Resets the expanded component and provides equal space for all nested components.
|
void |
setExpandRatio(Component component,
float ratio)
Sets expand ratio for the component.
|
void |
setFrame(Frame frame) |
void |
setMargin(MarginInfo marginInfo) |
void |
setRequiredIndicatorVisible(boolean visible)
Sets whether a required indicator should be shown.
|
void |
setSpacing(boolean enabled) |
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, withUnwrappedCompositionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetExpandDirectiongetComponentNNadd, removeaddStyleName, 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, withUnwrappedCompositionfocusFirstComponent, getComponentNNgetFramegetIcon, setIcon, setIconFromSetgetContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledisCaptionAsHtml, setCaptionAsHtmlgetCaption, setCaptiongetDescription, setDescriptionisDescriptionAsHtml, setDescriptionAsHtmlisHtmlSanitizerEnabled, setHtmlSanitizerEnabledprotected java.util.List<Component> ownComponents
protected com.vaadin.shared.Registration layoutClickRegistration
protected java.util.Map<ShortcutAction,com.vaadin.event.ShortcutListener> shortcuts
public void add(Component childComponent)
ComponentContaineradd in interface ComponentContainerchildComponent - a component to addpublic void add(Component childComponent, int index)
add in interface OrderedContainerpublic int indexOf(Component childComponent)
indexOf in interface OrderedContainer@Nullable public Component getComponent(int index)
OrderedContainergetComponent in interface OrderedContainerindex - component indexprotected void attachToFrame(Component childComponent)
public void remove(Component childComponent)
ComponentContainerremove in interface ComponentContainerchildComponent - a component to removepublic void removeAll()
ComponentContainerremoveAll in interface ComponentContainerpublic void setFrame(@Nullable
Frame frame)
setFrame in interface Component.BelongToFramesetFrame in class AbstractComponent<T extends com.vaadin.ui.AbstractOrderedLayout>@Nullable public Component getOwnComponent(java.lang.String id)
HasComponentsgetOwnComponent in interface HasComponents@Nullable public Component getComponent(java.lang.String id)
HasComponentsgetComponent in interface HasComponentspublic java.util.Collection<Component> getOwnComponents()
HasComponentsgetOwnComponents in interface HasComponentspublic java.util.stream.Stream<Component> getOwnComponentsStream()
HasComponentsgetOwnComponentsStream in interface HasComponentspublic java.util.Collection<Component> getComponents()
HasComponentsgetComponents in interface HasComponentspublic void expand(Component childComponent)
ExpandingLayoutexpand in interface ExpandingLayoutchildComponent - the componentpublic void resetExpanded()
ExpandingLayoutresetExpanded in interface ExpandingLayoutpublic boolean isExpanded(Component component)
ExpandingLayoutisExpanded in interface ExpandingLayoutcomponent - component to checkpublic void setMargin(MarginInfo marginInfo)
public MarginInfo getMargin()
public void setSpacing(boolean enabled)
setSpacing in interface HasSpacingpublic boolean getSpacing()
getSpacing in interface HasSpacingpublic io.jmix.core.common.event.Subscription addLayoutClickListener(java.util.function.Consumer<LayoutClickNotifier.LayoutClickEvent> listener)
LayoutClickNotifieraddLayoutClickListener in interface LayoutClickNotifierlistener - a listener to add@Nullable protected Component findChildComponent(com.vaadin.ui.Component childComponent)
protected void internalRemoveLayoutClickListener(java.util.function.Consumer<LayoutClickNotifier.LayoutClickEvent> listener)
public void addShortcutAction(ShortcutAction action)
addShortcutAction in interface ShortcutNotifierpublic void removeShortcutAction(ShortcutAction action)
removeShortcutAction in interface ShortcutNotifierpublic void setExpandRatio(Component component, float ratio)
SupportsExpandRatiosetExpandRatio in interface SupportsExpandRatiocomponent - component to expand with ratioratio - ratiopublic float getExpandRatio(Component component)
getExpandRatio in interface SupportsExpandRatiocomponent - component for which returns ratiopublic boolean isRequiredIndicatorVisible()
HasRequiredIndicatorisRequiredIndicatorVisible in interface HasRequiredIndicatortrue if a required indicator should be shown, false otherwisepublic void setRequiredIndicatorVisible(boolean visible)
HasRequiredIndicatorsetRequiredIndicatorVisible in interface HasRequiredIndicatorvisible - true if a required indicator should be shown, false otherwisepublic void attached()
AttachNotifierattached in interface AttachNotifierattached in class AbstractComponent<T extends com.vaadin.ui.AbstractOrderedLayout>public void detached()
AttachNotifierdetached in interface AttachNotifierdetached in class AbstractComponent<T extends com.vaadin.ui.AbstractOrderedLayout>