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 Modifier and Type Method Description protected int
getCaptionHeight()
Returns the height of the caption, or zero if there is no caption.
protected int
getCaptionWidth()
Returns the width of the caption, or zero if there is no caption.
ComponentConnector
getChild()
Returns the connector of the child component that has been assigned to this slot.
LayoutManager
getLayoutManager()
Returns the layout manager for the managed layout.
int
getWidgetHeight()
Returns the height of the widget, or zero if there is no caption.
int
getWidgetWidth()
Returns the width of the widget, or zero if there is no caption.
boolean
isRelativeHeight()
Returns whether the height of the widget has been set as relative.
boolean
isRelativeWidth()
Returns whether the width of the widget has been set as relative.
boolean
isUndefinedHeight()
Returns whether the height of the widget has been set as undefined.
boolean
isUndefinedWidth()
Returns whether the width of the widget has been set as undefined.
protected void
reportActualRelativeHeight(int allocatedHeight)
Reports the expected outer height to the LayoutManager.
protected void
reportActualRelativeWidth(int allocatedWidth)
Reports the expected outer width to the LayoutManager.
void
setCaption(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 benull
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 classVLayoutSlot
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 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:
VLayoutSlot
Sets the caption element for this slot.
Overrides:
setCaption
in classVLayoutSlot
Parameters:
caption
- the caption element, can benull
-
reportActualRelativeHeight
protected void reportActualRelativeHeight(int allocatedHeight)
Reports the expected outer height to the LayoutManager.
Overrides:
reportActualRelativeHeight
in 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:
reportActualRelativeWidth
in classVLayoutSlot
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 classVLayoutSlot
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 classVLayoutSlot
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 classVLayoutSlot
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 classVLayoutSlot
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 classVLayoutSlot
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 classVLayoutSlot
Returns:
true
if the widget width is relative,false
otherwise
-
-