Package io.jmix.ui.component.impl
Class GridLayoutImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<JmixGridLayout>
io.jmix.ui.component.impl.GridLayoutImpl
- All Implemented Interfaces:
AttachNotifier,Component,Component.BelongToFrame,Component.HasCaption,Component.HasDescription,Component.HasIcon,Component.HasXmlDescriptor,Component.Wrapper,ComponentContainer,GridLayout,HasComponents,HasContextHelp,HasDebugId,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,HasMargin,HasRequiredIndicator,HasSpacing,LayoutClickNotifier,ShortcutNotifier
-
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.GridLayout
GridLayout.AreaNested 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 com.vaadin.shared.Registrationprotected Map<ShortcutAction,com.vaadin.event.ShortcutListener> Fields 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.GridLayout
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a component to this container.voidvoidAdds a listener that is fired when user clicks inside the layout at any place.voidaddShortcutAction(ShortcutAction action) voidattached()Notifies all listeners that component has been attached.protected JmixGridLayoutvoiddetached()Notifies all listeners that component has been detached.protected ComponentfindChildComponent(com.vaadin.ui.Component vComponent) floatgetColumnExpandRatio(int col) intgetComponent(int columnIndex, int rowIndex) Gets the Component at given row and column.getComponent(String id) Gets a component belonging to the whole components tree below this container.getComponentArea(Component childComponent) Returns information about the area where given component is laid in the GridLayout.Gets all components belonging to the whole components tree below this container.Gets component directly owned by this container.Gets all components directly owned by this container.Gets stream of all components directly owned by this container.floatgetRowExpandRatio(int row) intgetRows()booleanprotected voidbooleanReturns whether a required indicator should be shown.voidRemoves a component from this container.voidRemoves all components from this container.voidremoveShortcutAction(ShortcutAction action) voidsetColumnExpandRatio(int col, float ratio) voidsetColumns(int columns) voidvoidsetMargin(MarginInfo marginInfo) voidsetRequiredIndicatorVisible(boolean visible) Sets whether a required indicator should be shown.voidsetRowExpandRatio(int row, float ratio) voidsetRows(int rows) voidsetSpacing(boolean enabled) 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, 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.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, removeMethods inherited from interface io.jmix.ui.component.GridLayout
getComponentNNMethods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponentNNMethods 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, setHtmlSanitizerEnabled
-
Field Details
-
ownComponents
-
layoutClickRegistration
protected com.vaadin.shared.Registration layoutClickRegistration -
shortcuts
-
-
Constructor Details
-
GridLayoutImpl
public GridLayoutImpl()
-
-
Method Details
-
createComponent
-
add
Description copied from interface:ComponentContainerAdds a component to this container.- Specified by:
addin interfaceComponentContainer- Parameters:
childComponent- a component to add
-
getColumnExpandRatio
public float getColumnExpandRatio(int col) - Specified by:
getColumnExpandRatioin interfaceGridLayout
-
setColumnExpandRatio
public void setColumnExpandRatio(int col, float ratio) - Specified by:
setColumnExpandRatioin interfaceGridLayout
-
getRowExpandRatio
public float getRowExpandRatio(int row) - Specified by:
getRowExpandRatioin interfaceGridLayout
-
setRowExpandRatio
public void setRowExpandRatio(int row, float ratio) - Specified by:
setRowExpandRatioin interfaceGridLayout
-
add
- Specified by:
addin interfaceGridLayout
-
add
- Specified by:
addin interfaceGridLayout
-
getRows
public int getRows()- Specified by:
getRowsin interfaceGridLayout
-
setRows
public void setRows(int rows) - Specified by:
setRowsin interfaceGridLayout
-
getColumns
public int getColumns()- Specified by:
getColumnsin interfaceGridLayout
-
setColumns
public void setColumns(int columns) - Specified by:
setColumnsin interfaceGridLayout
-
getComponent
Description copied from interface:GridLayoutGets the Component at given row and column.- Specified by:
getComponentin interfaceGridLayout- Parameters:
columnIndex- the column index, starting from 0 for the leftmost column.rowIndex- the row index, starting from 0 for the topmost row.- Returns:
- Component in given cell or null if empty
-
getComponentArea
Description copied from interface:GridLayoutReturns information about the area where given component is laid in the GridLayout.- Specified by:
getComponentAreain interfaceGridLayout- Parameters:
childComponent- the component whose area information is requested.- Returns:
- an Area object that contains information how component is laid in the grid
-
remove
Description copied from interface:ComponentContainerRemoves a component from this container.- Specified by:
removein interfaceComponentContainer- Parameters:
childComponent- a component to remove
-
removeAll
public void removeAll()Description copied from interface:ComponentContainerRemoves all components from this container.- Specified by:
removeAllin interfaceComponentContainer
-
setFrame
- Specified by:
setFramein interfaceComponent.BelongToFrame- Overrides:
setFramein classAbstractComponent<JmixGridLayout>
-
getOwnComponent
Description copied from interface:HasComponentsGets component directly owned by this container.- Specified by:
getOwnComponentin interfaceHasComponents- Returns:
- component or null if not found
-
getComponent
Description copied from interface:HasComponentsGets a component belonging to the whole components tree below this container.- Specified by:
getComponentin interfaceHasComponents- Returns:
- component or null if not found
-
getOwnComponents
Description copied from interface:HasComponentsGets all components directly owned by this container.- Specified by:
getOwnComponentsin interfaceHasComponents- Returns:
- all components directly owned by this container
-
getOwnComponentsStream
Description copied from interface:HasComponentsGets stream of all components directly owned by this container.- Specified by:
getOwnComponentsStreamin interfaceHasComponents- Returns:
- stream of all components directly owned by this container
-
getComponents
Description copied from interface:HasComponentsGets all components belonging to the whole components tree below this container.- Specified by:
getComponentsin interfaceHasComponents- Returns:
- all components belonging to the whole components tree below this container
-
setMargin
-
getMargin
-
setSpacing
public void setSpacing(boolean enabled) - Specified by:
setSpacingin interfaceHasSpacing
-
getSpacing
public boolean getSpacing()- Specified by:
getSpacingin interfaceHasSpacing
-
addLayoutClickListener
Description copied from interface:LayoutClickNotifierAdds a listener that is fired when user clicks inside the layout at any place.- Specified by:
addLayoutClickListenerin interfaceLayoutClickNotifier- Parameters:
listener- a listener to add
-
findChildComponent
-
internalRemoveLayoutClickListener
protected void internalRemoveLayoutClickListener(Consumer<LayoutClickNotifier.LayoutClickEvent> listener) -
addShortcutAction
- Specified by:
addShortcutActionin interfaceShortcutNotifier
-
removeShortcutAction
- Specified by:
removeShortcutActionin interfaceShortcutNotifier
-
isRequiredIndicatorVisible
public boolean isRequiredIndicatorVisible()Description copied from interface:HasRequiredIndicatorReturns whether a required indicator should be shown.- Specified by:
isRequiredIndicatorVisiblein interfaceHasRequiredIndicator- Returns:
trueif a required indicator should be shown,falseotherwise
-
setRequiredIndicatorVisible
public void setRequiredIndicatorVisible(boolean visible) Description copied from interface:HasRequiredIndicatorSets whether a required indicator should be shown.- Specified by:
setRequiredIndicatorVisiblein interfaceHasRequiredIndicator- Parameters:
visible-trueif a required indicator should be shown,falseotherwise
-
attached
public void attached()Description copied from interface:AttachNotifierNotifies all listeners that component has been attached.- Specified by:
attachedin interfaceAttachNotifier- Overrides:
attachedin classAbstractComponent<JmixGridLayout>
-
detached
public void detached()Description copied from interface:AttachNotifierNotifies all listeners that component has been detached.- Specified by:
detachedin interfaceAttachNotifier- Overrides:
detachedin classAbstractComponent<JmixGridLayout>
-