public class GroupBoxImpl extends AbstractComponent<JmixGroupBox> implements GroupBoxLayout, org.springframework.beans.factory.InitializingBean
ExpandingLayout.ExpandDirection
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasOrientation.Orientation
Collapsable.ExpandedStateChangeEvent
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
protected HasOrientation.Orientation |
orientation |
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, parent
NAME
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
GroupBoxImpl() |
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 |
addExpandedStateChangeListener(java.util.function.Consumer<Collapsable.ExpandedStateChangeEvent> listener) |
void |
addShortcutAction(ShortcutAction action) |
void |
afterPropertiesSet() |
void |
attached()
Notifies all listeners that component has been attached.
|
protected JmixGroupBox |
createComponent() |
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 void |
fireExpandStateChange(boolean expanded,
boolean invokedByUser) |
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.
|
protected com.vaadin.ui.AbstractOrderedLayout |
getComponentContent() |
java.util.Collection<Component> |
getComponents()
Gets all components belonging to the whole components tree below this container.
|
ExpandingLayout.ExpandDirection |
getExpandDirection() |
float |
getExpandRatio(Component component) |
HasOrientation.Orientation |
getOrientation() |
MarginInfo |
getOuterMargin() |
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() |
java.lang.String |
getStyleName()
Styles implementation is client-type-specific.
|
int |
indexOf(Component component) |
protected void |
initComponent(JmixGroupBox component) |
boolean |
isBorderVisible() |
boolean |
isCollapsable() |
boolean |
isExpanded() |
boolean |
isExpanded(Component component)
Returns true if the component occupies the maximum available space.
|
boolean |
isRequiredIndicatorVisible()
Returns whether a required indicator should be shown.
|
boolean |
isShowAsPanel() |
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 |
setBorderVisible(boolean borderVisible) |
void |
setCollapsable(boolean collapsable) |
void |
setExpanded(boolean expanded) |
void |
setExpandRatio(Component component,
float ratio)
Sets expand ratio for the component.
|
void |
setFrame(Frame frame) |
void |
setOrientation(HasOrientation.Orientation orientation) |
void |
setOuterMargin(MarginInfo marginInfo)
Sets margins on all sides according to the passed
MarginInfo object. |
void |
setRequiredIndicatorVisible(boolean visible)
Sets whether a required indicator should be shown.
|
void |
setShowAsPanel(boolean showAsPanel)
Sets layout style as a Vaadin Panel
|
void |
setSpacing(boolean enabled) |
void |
setStyleName(java.lang.String name)
Sets one or more style names of the component, replacing any
previous styles.
|
addAttachListener, addDetachListener, addStyleName, assignDebugId, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, 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, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponentNN
add, remove
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
focusFirstComponent, getComponentNN
getIcon, setIcon, setIconFromSet
setOuterMargin, setOuterMargin
getFrame
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
protected java.util.List<Component> ownComponents
protected HasOrientation.Orientation orientation
protected java.util.Map<ShortcutAction,com.vaadin.event.ShortcutListener> shortcuts
protected JmixGroupBox createComponent()
protected void initComponent(JmixGroupBox component)
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public void add(Component childComponent)
ComponentContainer
add
in interface ComponentContainer
childComponent
- a component to addpublic void add(Component childComponent, int index)
add
in interface OrderedContainer
public int indexOf(Component component)
indexOf
in interface OrderedContainer
@Nullable public Component getComponent(int index)
OrderedContainer
getComponent
in interface OrderedContainer
index
- component indexpublic void remove(Component childComponent)
ComponentContainer
remove
in interface ComponentContainer
childComponent
- a component to removepublic void removeAll()
ComponentContainer
removeAll
in interface ComponentContainer
public void setFrame(@Nullable Frame frame)
setFrame
in interface Component.BelongToFrame
setFrame
in class AbstractComponent<JmixGroupBox>
protected com.vaadin.ui.AbstractOrderedLayout getComponentContent()
@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
public void expand(Component childComponent)
ExpandingLayout
expand
in interface ExpandingLayout
childComponent
- the componentpublic void resetExpanded()
ExpandingLayout
resetExpanded
in interface ExpandingLayout
public boolean isExpanded(Component component)
ExpandingLayout
isExpanded
in interface ExpandingLayout
component
- component to checkpublic boolean isExpanded()
isExpanded
in interface Collapsable
public ExpandingLayout.ExpandDirection getExpandDirection()
getExpandDirection
in interface ExpandingLayout
ExpandingLayout.ExpandDirection
public void setExpanded(boolean expanded)
setExpanded
in interface Collapsable
public boolean isCollapsable()
isCollapsable
in interface Collapsable
public void setCollapsable(boolean collapsable)
setCollapsable
in interface Collapsable
public io.jmix.core.common.event.Subscription addExpandedStateChangeListener(java.util.function.Consumer<Collapsable.ExpandedStateChangeEvent> listener)
addExpandedStateChangeListener
in interface Collapsable
protected void fireExpandStateChange(boolean expanded, boolean invokedByUser)
public boolean isBorderVisible()
isBorderVisible
in interface HasBorder
public void setBorderVisible(boolean borderVisible)
setBorderVisible
in interface HasBorder
public void setSpacing(boolean enabled)
setSpacing
in interface HasSpacing
public boolean getSpacing()
getSpacing
in interface HasSpacing
public HasOrientation.Orientation getOrientation()
getOrientation
in interface HasOrientation
public void setOrientation(HasOrientation.Orientation orientation)
setOrientation
in interface HasOrientation
public void setShowAsPanel(boolean showAsPanel)
GroupBoxLayout
setShowAsPanel
in interface GroupBoxLayout
showAsPanel
- whether the layout should appear as a Vaadin Panelpublic boolean isShowAsPanel()
isShowAsPanel
in interface GroupBoxLayout
public void setStyleName(@Nullable java.lang.String name)
Component
setStyleName
in interface Component
setStyleName
in class AbstractComponent<JmixGroupBox>
name
- one or more style names separated by space.public java.lang.String getStyleName()
Component
getStyleName
in interface Component
getStyleName
in class AbstractComponent<JmixGroupBox>
public void addShortcutAction(ShortcutAction action)
addShortcutAction
in interface ShortcutNotifier
public void removeShortcutAction(ShortcutAction action)
removeShortcutAction
in interface ShortcutNotifier
public void setOuterMargin(MarginInfo marginInfo)
HasOuterMargin
MarginInfo
object.setOuterMargin
in interface HasOuterMargin
marginInfo
- the MarginInfo
object that describes the
margin settings for each side of a Component.public MarginInfo getOuterMargin()
getOuterMargin
in interface HasOuterMargin
MarginInfo
object that describes the
margin settings for each side of a Component.public void setExpandRatio(Component component, float ratio)
SupportsExpandRatio
setExpandRatio
in interface SupportsExpandRatio
component
- component to expand with ratioratio
- ratiopublic float getExpandRatio(Component component)
getExpandRatio
in interface SupportsExpandRatio
component
- component for which returns ratiopublic boolean isRequiredIndicatorVisible()
HasRequiredIndicator
isRequiredIndicatorVisible
in interface HasRequiredIndicator
true
if a required indicator should be shown, false
otherwisepublic void setRequiredIndicatorVisible(boolean visible)
HasRequiredIndicator
setRequiredIndicatorVisible
in interface HasRequiredIndicator
visible
- true
if a required indicator should be shown, false
otherwisepublic void attached()
AttachNotifier
attached
in interface AttachNotifier
attached
in class AbstractComponent<JmixGroupBox>
public void detached()
AttachNotifier
detached
in interface AttachNotifier
detached
in class AbstractComponent<JmixGroupBox>