Package com.vaadin.client.ui.layout
Class ComponentConnectorLayoutSlot
- java.lang.Object
-
- com.vaadin.client.ui.layout.VLayoutSlot
-
- com.vaadin.client.ui.layout.ComponentConnectorLayoutSlot
-
public class ComponentConnectorLayoutSlot extends VLayoutSlot
A slot class implementation for ManagedLayout cells.- Author:
- Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor Description ComponentConnectorLayoutSlot(String baseClassName, ComponentConnector child, ManagedLayout layout)Constructs a slot instance for a ManagedLayout cell.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intgetCaptionHeight()Returns the height of the caption, or zero if there is no caption.protected intgetCaptionWidth()Returns the width of the caption, or zero if there is no caption.ComponentConnectorgetChild()Returns the connector of the child component that has been assigned to this slot.LayoutManagergetLayoutManager()Returns the layout manager for the managed layout.intgetWidgetHeight()Returns the height of the widget, or zero if there is no caption.intgetWidgetWidth()Returns the width of the widget, or zero if there is no caption.booleanisRelativeHeight()Returns whether the height of the widget has been set as relative.booleanisRelativeWidth()Returns whether the width of the widget has been set as relative.booleanisUndefinedHeight()Returns whether the height of the widget has been set as undefined.booleanisUndefinedWidth()Returns whether the width of the widget has been set as undefined.protected voidreportActualRelativeHeight(int allocatedHeight)Reports the expected outer height to the LayoutManager.protected voidreportActualRelativeWidth(int allocatedWidth)Reports the expected outer width to the LayoutManager.voidsetCaption(VCaption caption)Sets the caption element for this slot.-
Methods inherited from class com.vaadin.client.ui.layout.VLayoutSlot
getAlignment, getCaption, getExpandRatio, getUsedHeight, getUsedSizeInDirection, getUsedWidth, getWidget, getWidgetSizeInDirection, getWrapperElement, isRelativeInDirection, isUndefinedInDirection, positionHorizontally, positionInDirection, positionVertically, setAlignment, setExpandRatio
-
-
-
-
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 layoutchild- the connector of the child component whose widget should be set to this slot, should not benulllayout- 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:VLayoutSlotReturns the height of the caption, or zero if there is no caption.- Specified by:
getCaptionHeightin classVLayoutSlot- Returns:
- the height of the caption, or zero if not found
-
getCaptionWidth
protected int getCaptionWidth()
Description copied from class:VLayoutSlotReturns the width of the caption, or zero if there is no caption.- Specified by:
getCaptionWidthin classVLayoutSlot- 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:VLayoutSlotSets the caption element for this slot.- Overrides:
setCaptionin classVLayoutSlot- Parameters:
caption- the caption element, can benull
-
reportActualRelativeHeight
protected void reportActualRelativeHeight(int allocatedHeight)
Reports the expected outer height to the LayoutManager.- Overrides:
reportActualRelativeHeightin classVLayoutSlot- 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:
reportActualRelativeWidthin classVLayoutSlot- Parameters:
allocatedWidth- the width to set (including margins, borders and paddings) in pixels
-
getWidgetHeight
public int getWidgetHeight()
Description copied from class:VLayoutSlotReturns the height of the widget, or zero if there is no caption.- Specified by:
getWidgetHeightin classVLayoutSlot- Returns:
- the height of the widget, or zero if not found
-
getWidgetWidth
public int getWidgetWidth()
Description copied from class:VLayoutSlotReturns the width of the widget, or zero if there is no caption.- Specified by:
getWidgetWidthin classVLayoutSlot- Returns:
- the width of the widget, or zero if not found
-
isUndefinedHeight
public boolean isUndefinedHeight()
Description copied from class:VLayoutSlotReturns whether the height of the widget has been set as undefined.- Specified by:
isUndefinedHeightin classVLayoutSlot- Returns:
trueif the widget height is undefined,falseotherwise
-
isUndefinedWidth
public boolean isUndefinedWidth()
Description copied from class:VLayoutSlotReturns whether the width of the widget has been set as undefined.- Specified by:
isUndefinedWidthin classVLayoutSlot- Returns:
trueif the widget width is undefined,falseotherwise
-
isRelativeHeight
public boolean isRelativeHeight()
Description copied from class:VLayoutSlotReturns whether the height of the widget has been set as relative.- Specified by:
isRelativeHeightin classVLayoutSlot- Returns:
trueif the widget height is relative,falseotherwise
-
isRelativeWidth
public boolean isRelativeWidth()
Description copied from class:VLayoutSlotReturns whether the width of the widget has been set as relative.- Specified by:
isRelativeWidthin classVLayoutSlot- Returns:
trueif the widget width is relative,falseotherwise
-
-