public class ResponsiveGridLayoutImpl extends AbstractComponent<JmixResponsiveGridLayout> implements ResponsiveGridLayout
Modifier and Type | Class and Description |
---|---|
protected static class |
ResponsiveGridLayoutImpl.AbstractGridElementImpl<T extends JmixResponsiveGridLayout.AbstractGridElement> |
protected static class |
ResponsiveGridLayoutImpl.ColumnImpl |
protected static class |
ResponsiveGridLayoutImpl.RowImpl |
ResponsiveGridLayout.AlignItems, ResponsiveGridLayout.AlignSelf, ResponsiveGridLayout.Breakpoint, ResponsiveGridLayout.Column, ResponsiveGridLayout.ColumnsValue, ResponsiveGridLayout.ContainerType, ResponsiveGridLayout.GridElement, ResponsiveGridLayout.JustifyContent, ResponsiveGridLayout.OffsetValue, ResponsiveGridLayout.OrderValue, ResponsiveGridLayout.Row, ResponsiveGridLayout.RowColumnsValue
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 com.vaadin.shared.Registration |
layoutClickRegistration |
protected java.util.List<Component> |
ownComponents |
protected java.util.List<ResponsiveGridLayout.Row> |
rowOrder |
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
NAME
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
ResponsiveGridLayoutImpl() |
Modifier and Type | Method and Description |
---|---|
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.
|
protected void |
addOwnComponent(Component component) |
ResponsiveGridLayout.Row |
addRow()
Creates a new
ResponsiveGridLayout.Row and adds it to this responsive grid layout. |
ResponsiveGridLayout.Row |
addRow(int index)
Creates a new
ResponsiveGridLayout.Row and adds it to the given position in responsive grid layout. |
void |
attached()
Notifies all listeners that component has been attached.
|
protected void |
checkInitializedState() |
protected JmixResponsiveGridLayout |
createComponent() |
void |
detached()
Notifies all listeners that component has been detached.
|
protected Component |
findChildComponent(com.vaadin.ui.Component clickedComponent) |
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.
|
ResponsiveGridLayout.ContainerType |
getContainerType() |
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.
|
java.util.List<ResponsiveGridLayout.Row> |
getRows() |
float |
getWidth()
Get component width in
Component.getWidthSizeUnit() |
SizeUnit |
getWidthSizeUnit()
Gets the width property units.
|
protected void |
internalRemoveLayoutClickListener(java.util.function.Consumer<LayoutClickNotifier.LayoutClickEvent> listener) |
boolean |
isResponsive()
Is the component responsive?
|
void |
removeAllRows()
Removes all rows from this responsive grid layout.
|
protected void |
removeOwnComponent(Component component) |
void |
removeRow(ResponsiveGridLayout.Row row)
Removes the given row from this responsive grid layout.
|
void |
setContainerType(ResponsiveGridLayout.ContainerType containerType)
Sets the container type.
|
void |
setResponsive(boolean responsive)
Sets component to be responsive by width and height.
|
void |
setWidth(java.lang.String width)
Set component width in
Component.getWidthSizeUnit() } |
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, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setParent, setStyleName, setValidationError, setVisible, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFrame, setFrame
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, isEnabled, isEnabledRecursive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
focusFirstComponent, getComponentNN
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
protected java.util.List<ResponsiveGridLayout.Row> rowOrder
protected java.util.List<Component> ownComponents
protected com.vaadin.shared.Registration layoutClickRegistration
protected JmixResponsiveGridLayout createComponent()
public ResponsiveGridLayout.Row addRow()
ResponsiveGridLayout
ResponsiveGridLayout.Row
and adds it to this responsive grid layout.addRow
in interface ResponsiveGridLayout
public ResponsiveGridLayout.Row addRow(int index)
ResponsiveGridLayout
ResponsiveGridLayout.Row
and adds it to the given position in responsive grid layout.addRow
in interface ResponsiveGridLayout
index
- the position of the new row. The rows that are
currently in and after the position are shifted forwardspublic void removeRow(ResponsiveGridLayout.Row row)
ResponsiveGridLayout
removeRow
in interface ResponsiveGridLayout
row
- the row to be removedpublic void removeAllRows()
ResponsiveGridLayout
removeAllRows
in interface ResponsiveGridLayout
public java.util.List<ResponsiveGridLayout.Row> getRows()
getRows
in interface ResponsiveGridLayout
public ResponsiveGridLayout.ContainerType getContainerType()
getContainerType
in interface ResponsiveGridLayout
null
public void setContainerType(ResponsiveGridLayout.ContainerType containerType)
ResponsiveGridLayout
The built-in container types are:
ResponsiveGridLayout.ContainerType.FLUID
- a full width container,
spanning the entire width of the viewport. Used by default.ResponsiveGridLayout.ContainerType.FIXED
- a fixed-width container,
meaning its max-width
changes at each breakpoint.setContainerType
in interface ResponsiveGridLayout
containerType
- the container type to switch to, not null
@Nullable public Component getOwnComponent(java.lang.String id)
HasComponents
getOwnComponent
in interface HasComponents
@Nullable public Component getComponent(java.lang.String id)
HasComponents
getComponent
in interface HasComponents
public java.util.Collection<Component> getOwnComponents()
HasComponents
getOwnComponents
in interface HasComponents
public java.util.stream.Stream<Component> getOwnComponentsStream()
HasComponents
getOwnComponentsStream
in interface HasComponents
public java.util.Collection<Component> getComponents()
HasComponents
getComponents
in interface HasComponents
protected void addOwnComponent(Component component)
protected void removeOwnComponent(Component component)
public io.jmix.core.common.event.Subscription addLayoutClickListener(java.util.function.Consumer<LayoutClickNotifier.LayoutClickEvent> listener)
LayoutClickNotifier
addLayoutClickListener
in interface LayoutClickNotifier
listener
- a listener to add@Nullable protected Component findChildComponent(com.vaadin.ui.Component clickedComponent)
protected void internalRemoveLayoutClickListener(java.util.function.Consumer<LayoutClickNotifier.LayoutClickEvent> listener)
public void attached()
AttachNotifier
attached
in interface AttachNotifier
attached
in class AbstractComponent<JmixResponsiveGridLayout>
public void detached()
AttachNotifier
detached
in interface AttachNotifier
detached
in class AbstractComponent<JmixResponsiveGridLayout>
public float getWidth()
Component
Component.getWidthSizeUnit()
getWidth
in interface Component
getWidth
in class AbstractComponent<JmixResponsiveGridLayout>
public SizeUnit getWidthSizeUnit()
Component
getWidthSizeUnit
in interface Component
getWidthSizeUnit
in class AbstractComponent<JmixResponsiveGridLayout>
public void setWidth(@Nullable java.lang.String width)
Component
Component.getWidthSizeUnit()
}setWidth
in interface Component
setWidth
in class AbstractComponent<JmixResponsiveGridLayout>
public boolean isResponsive()
Component
isResponsive
in interface Component
isResponsive
in class AbstractComponent<JmixResponsiveGridLayout>
public void setResponsive(boolean responsive)
Component
setResponsive
in interface Component
setResponsive
in class AbstractComponent<JmixResponsiveGridLayout>
responsive
- responsive flagprotected void checkInitializedState()