Class ComponentConnectorLayoutSlot


  • public class ComponentConnectorLayoutSlot
    extends VLayoutSlot
    A slot class implementation for ManagedLayout cells.
    Author:
    Vaadin Ltd
    • Constructor Detail

      • ComponentConnectorLayoutSlot

        public ComponentConnectorLayoutSlot​(String baseClassName,
                                            ComponentConnector child,
                                            ManagedLayout layout)
        Constructs a slot instance for a ManagedLayout cell.
        Parameters:
        baseClassName - the base class name of the layout
        child - the connector of the child component whose widget should be set to this slot, should not be null
        layout - the managed layout that contains this slot
    • Method Detail

      • getChild

        public ComponentConnector getChild()
        Returns the connector of the child component that has been assigned to this slot.
        Returns:
        the content connector
      • getCaptionHeight

        protected int getCaptionHeight()
        Description copied from class: VLayoutSlot
        Returns the height of the caption, or zero if there is no caption.
        Specified by:
        getCaptionHeight in class VLayoutSlot
        Returns:
        the height of the caption, or zero if not found
      • getCaptionWidth

        protected int getCaptionWidth()
        Description copied from class: VLayoutSlot
        Returns the width of the caption, or zero if there is no caption.
        Specified by:
        getCaptionWidth in class VLayoutSlot
        Returns:
        the width of the caption, or zero if not found
      • getLayoutManager

        public LayoutManager getLayoutManager()
        Returns the layout manager for the managed layout.
        Returns:
        layout manager
      • setCaption

        public void setCaption​(VCaption caption)
        Description copied from class: VLayoutSlot
        Sets the caption element for this slot.
        Overrides:
        setCaption in class VLayoutSlot
        Parameters:
        caption - the caption element, can be null
      • reportActualRelativeHeight

        protected void reportActualRelativeHeight​(int allocatedHeight)
        Reports the expected outer height to the LayoutManager.
        Overrides:
        reportActualRelativeHeight in class VLayoutSlot
        Parameters:
        allocatedHeight - the height to set (including margins, borders and paddings) in pixels
      • reportActualRelativeWidth

        protected void reportActualRelativeWidth​(int allocatedWidth)
        Reports the expected outer width to the LayoutManager.
        Overrides:
        reportActualRelativeWidth in class VLayoutSlot
        Parameters:
        allocatedWidth - the width to set (including margins, borders and paddings) in pixels
      • getWidgetHeight

        public int getWidgetHeight()
        Description copied from class: VLayoutSlot
        Returns the height of the widget, or zero if there is no caption.
        Specified by:
        getWidgetHeight in class VLayoutSlot
        Returns:
        the height of the widget, or zero if not found
      • getWidgetWidth

        public int getWidgetWidth()
        Description copied from class: VLayoutSlot
        Returns the width of the widget, or zero if there is no caption.
        Specified by:
        getWidgetWidth in class VLayoutSlot
        Returns:
        the width of the widget, or zero if not found
      • isUndefinedHeight

        public boolean isUndefinedHeight()
        Description copied from class: VLayoutSlot
        Returns whether the height of the widget has been set as undefined.
        Specified by:
        isUndefinedHeight in class VLayoutSlot
        Returns:
        true if the widget height is undefined, false otherwise
      • isUndefinedWidth

        public boolean isUndefinedWidth()
        Description copied from class: VLayoutSlot
        Returns whether the width of the widget has been set as undefined.
        Specified by:
        isUndefinedWidth in class VLayoutSlot
        Returns:
        true if the widget width is undefined, false otherwise
      • isRelativeHeight

        public boolean isRelativeHeight()
        Description copied from class: VLayoutSlot
        Returns whether the height of the widget has been set as relative.
        Specified by:
        isRelativeHeight in class VLayoutSlot
        Returns:
        true if the widget height is relative, false otherwise
      • isRelativeWidth

        public boolean isRelativeWidth()
        Description copied from class: VLayoutSlot
        Returns whether the width of the widget has been set as relative.
        Specified by:
        isRelativeWidth in class VLayoutSlot
        Returns:
        true if the widget width is relative, false otherwise