Package com.vaadin.classic.v8.ui
Class AbsoluteLayout.ComponentPosition
java.lang.Object
com.vaadin.classic.v8.ui.AbsoluteLayout.ComponentPosition
- All Implemented Interfaces:
Serializable
- Enclosing class:
- AbsoluteLayout
The ComponentPosition class represents a component's position within the
absolute layout. It contains the attributes for left, right, top and
bottom and the units used to specify them.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancom.vaadin.flow.component.UnitGets the unit for the 'bottom' attribute.Gets the 'bottom' attributes value using current units.Converts the internal values into a valid CSS string.com.vaadin.flow.component.UnitGets the unit for the 'left' attribute.Gets the 'left' attributes value using current units.com.vaadin.flow.component.UnitGets the unit for the 'right' attribute.Gets the 'right' attributes value in current units.com.vaadin.flow.component.UnitGets the unit for the 'top' attribute.Gets the 'top' attributes value in current units.intGets the 'z-index' attribute.inthashCode()voidSets the 'bottom' attribute; distance from the bottom of the component to the bottom edge of the layout.voidsetBottomUnits(com.vaadin.flow.component.Unit bottomUnits) Sets the unit for the 'bottom' attribute.voidsetBottomValue(Float bottomValue) Sets the 'bottom' attribute value (distance from the bottom of the component to the bottom edge of the layout).voidsetCSSString(String css) Sets the position attributes using CSS syntax.voidSets the 'left' attribute; distance from the left of the component to the left edge of the layout.voidsetLeftUnits(com.vaadin.flow.component.Unit leftUnits) Sets the unit for the 'left' attribute.voidsetLeftValue(Float leftValue) Sets the 'left' attribute value (distance from the left of the component to the left edge of the layout).voidSets the 'right' attribute; distance from the right of the component to the right edge of the layout.voidsetRightUnits(com.vaadin.flow.component.Unit rightUnits) Sets the unit for the 'right' attribute.voidsetRightValue(Float rightValue) Sets the 'right' attribute value (distance from the right of the component to the right edge of the layout).voidSets the 'top' attribute; distance from the top of the component to the top edge of the layout.voidsetTopUnits(com.vaadin.flow.component.Unit topUnits) Sets the unit for the 'top' attribute.voidsetTopValue(Float topValue) Sets the value of the 'top' attribute; distance from the top of the component to the top edge of the layout.voidsetZIndex(int zIndex) Sets the 'z-index' attribute; the visual stacking order.toString()
-
Constructor Details
-
ComponentPosition
public ComponentPosition()
-
-
Method Details
-
setCSSString
Sets the position attributes using CSS syntax. Attributes not included in the string are reset to their unset states.setCSSString("top:10px;left:20%;z-index:16;");- Parameters:
css- inline css to set the position
-
getCSSString
Converts the internal values into a valid CSS string.- Returns:
- A valid CSS string
-
setTop
Sets the 'top' attribute; distance from the top of the component to the top edge of the layout.- Parameters:
topValue- The value of the 'top' attributetopUnits- The unit of the 'top' attribute. See UNIT_SYMBOLS for a description of the available units.
-
setRight
Sets the 'right' attribute; distance from the right of the component to the right edge of the layout.- Parameters:
rightValue- The value of the 'right' attributerightUnits- The unit of the 'right' attribute. See UNIT_SYMBOLS for a description of the available units.
-
setBottom
Sets the 'bottom' attribute; distance from the bottom of the component to the bottom edge of the layout.- Parameters:
bottomValue- The value of the 'bottom' attributebottomUnits- The unit of the 'bottom' attribute. See UNIT_SYMBOLS for a description of the available units.
-
setLeft
Sets the 'left' attribute; distance from the left of the component to the left edge of the layout.- Parameters:
leftValue- The value of the 'left' attributeleftUnits- The unit of the 'left' attribute. See UNIT_SYMBOLS for a description of the available units.
-
setZIndex
public void setZIndex(int zIndex) Sets the 'z-index' attribute; the visual stacking order.- Parameters:
zIndex- The z-index for the component.
-
setTopValue
Sets the value of the 'top' attribute; distance from the top of the component to the top edge of the layout.- Parameters:
topValue- The value of the 'left' attribute
-
getTopValue
Gets the 'top' attributes value in current units.- Returns:
- The value of the 'top' attribute, null if not set
- See Also:
-
getRightValue
Gets the 'right' attributes value in current units.- Returns:
- The value of the 'right' attribute, null if not set
- See Also:
-
setRightValue
Sets the 'right' attribute value (distance from the right of the component to the right edge of the layout). Currently active units are maintained.- Parameters:
rightValue- The value of the 'right' attribute- See Also:
-
getBottomValue
Gets the 'bottom' attributes value using current units.- Returns:
- The value of the 'bottom' attribute, null if not set
- See Also:
-
setBottomValue
Sets the 'bottom' attribute value (distance from the bottom of the component to the bottom edge of the layout). Currently active units are maintained.- Parameters:
bottomValue- The value of the 'bottom' attribute- See Also:
-
getLeftValue
Gets the 'left' attributes value using current units.- Returns:
- The value of the 'left' attribute, null if not set
- See Also:
-
setLeftValue
Sets the 'left' attribute value (distance from the left of the component to the left edge of the layout). Currently active units are maintained.- Parameters:
leftValue- The value of the 'left' CSS-attribute- See Also:
-
getTopUnits
public com.vaadin.flow.component.Unit getTopUnits()Gets the unit for the 'top' attribute.- Returns:
- See
SizeableUNIT_SYMBOLS for a description of the available units.
-
setTopUnits
public void setTopUnits(com.vaadin.flow.component.Unit topUnits) Sets the unit for the 'top' attribute.- Parameters:
topUnits- SeeSizeableUNIT_SYMBOLS for a description of the available units.
-
getRightUnits
public com.vaadin.flow.component.Unit getRightUnits()Gets the unit for the 'right' attribute.- Returns:
- See
SizeableUNIT_SYMBOLS for a description of the available units.
-
setRightUnits
public void setRightUnits(com.vaadin.flow.component.Unit rightUnits) Sets the unit for the 'right' attribute.- Parameters:
rightUnits- SeeSizeableUNIT_SYMBOLS for a description of the available units.
-
getBottomUnits
public com.vaadin.flow.component.Unit getBottomUnits()Gets the unit for the 'bottom' attribute.- Returns:
- See
SizeableUNIT_SYMBOLS for a description of the available units.
-
setBottomUnits
public void setBottomUnits(com.vaadin.flow.component.Unit bottomUnits) Sets the unit for the 'bottom' attribute.- Parameters:
bottomUnits- SeeSizeableUNIT_SYMBOLS for a description of the available units.
-
getLeftUnits
public com.vaadin.flow.component.Unit getLeftUnits()Gets the unit for the 'left' attribute.- Returns:
- See
SizeableUNIT_SYMBOLS for a description of the available units.
-
setLeftUnits
public void setLeftUnits(com.vaadin.flow.component.Unit leftUnits) Sets the unit for the 'left' attribute.- Parameters:
leftUnits- SeeSizeableUNIT_SYMBOLS for a description of the available units.
-
getZIndex
public int getZIndex()Gets the 'z-index' attribute.- Returns:
- the zIndex The z-index attribute
-
toString
-
equals
-
hashCode
public int hashCode()
-