com.vaadin.ui
Class AbsoluteLayout.ComponentPosition

java.lang.Object
  extended by com.vaadin.ui.AbsoluteLayout.ComponentPosition
All Implemented Interfaces:
Serializable
Enclosing class:
AbsoluteLayout

public class AbsoluteLayout.ComponentPosition
extends Object
implements Serializable

The CompontPosition class represents a components position within the absolute layout. It contains the attributes for left, right, top and bottom and the units used to specify them.

See Also:
Serialized Form

Constructor Summary
AbsoluteLayout.ComponentPosition()
           
 
Method Summary
 Sizeable.Unit getBottomUnits()
          Gets the unit for the 'bottom' attribute
 Float getBottomValue()
          Gets the 'bottom' attributes value using current units.
 String getCSSString()
          Converts the internal values into a valid CSS string.
 Sizeable.Unit getLeftUnits()
          Gets the unit for the 'left' attribute
 Float getLeftValue()
          Gets the 'left' attributes value using current units.
 Sizeable.Unit getRightUnits()
          Gets the unit for the 'right' attribute
 Float getRightValue()
          Gets the 'right' attributes value in current units.
 Sizeable.Unit getTopUnits()
          Gets the unit for the 'top' attribute
 Float getTopValue()
          Gets the 'top' attributes value in current units.
 int getZIndex()
          Gets the 'z-index' attribute.
 void setBottom(Float bottomValue, Sizeable.Unit bottomUnits)
          Sets the 'bottom' attribute; distance from the bottom of the component to the bottom edge of the layout.
 void setBottomUnits(Sizeable.Unit bottomUnits)
          Sets the unit for the 'bottom' attribute
 void setBottomValue(Float bottomValue)
          Sets the 'bottom' attribute value (distance from the bottom of the component to the bottom edge of the layout).
 void setCSSString(String css)
          Sets the position attributes using CSS syntax.
 void setLeft(Float leftValue, Sizeable.Unit leftUnits)
          Sets the 'left' attribute; distance from the left of the component to the left edge of the layout.
 void setLeftUnits(Sizeable.Unit leftUnits)
          Sets the unit for the 'left' attribute
 void setLeftValue(Float leftValue)
          Sets the 'left' attribute value (distance from the left of the component to the left edge of the layout).
 void setRight(Float rightValue, Sizeable.Unit rightUnits)
          Sets the 'right' attribute; distance from the right of the component to the right edge of the layout.
 void setRightUnits(Sizeable.Unit rightUnits)
          Sets the unit for the 'right' attribute
 void setRightValue(Float rightValue)
          Sets the 'right' attribute value (distance from the right of the component to the right edge of the layout).
 void setTop(Float topValue, Sizeable.Unit topUnits)
          Sets the 'top' attribute; distance from the top of the component to the top edge of the layout.
 void setTopUnits(Sizeable.Unit topUnits)
          Sets the unit for the 'top' attribute
 void setTopValue(Float topValue)
          Sets the value of the 'top' attribute; distance from the top of the component to the top edge of the layout.
 void setZIndex(int zIndex)
          Sets the 'z-index' attribute; the visual stacking order
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbsoluteLayout.ComponentPosition

public AbsoluteLayout.ComponentPosition()
Method Detail

setCSSString

public void setCSSString(String css)
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 -

getCSSString

public String getCSSString()
Converts the internal values into a valid CSS string.

Returns:
A valid CSS string

setTop

public void setTop(Float topValue,
                   Sizeable.Unit topUnits)
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' attribute
topUnits - The unit of the 'top' attribute. See UNIT_SYMBOLS for a description of the available units.

setRight

public void setRight(Float rightValue,
                     Sizeable.Unit rightUnits)
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' attribute
rightUnits - The unit of the 'right' attribute. See UNIT_SYMBOLS for a description of the available units.

setBottom

public void setBottom(Float bottomValue,
                      Sizeable.Unit bottomUnits)
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' attribute
units - The unit of the 'bottom' attribute. See UNIT_SYMBOLS for a description of the available units.

setLeft

public void setLeft(Float leftValue,
                    Sizeable.Unit leftUnits)
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' attribute
units - 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

public void setTopValue(Float topValue)
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

public Float getTopValue()
Gets the 'top' attributes value in current units.

Returns:
The value of the 'top' attribute, null if not set
See Also:
getTopUnits()

getRightValue

public Float getRightValue()
Gets the 'right' attributes value in current units.

Returns:
The value of the 'right' attribute, null if not set
See Also:
getRightUnits()

setRightValue

public void setRightValue(Float rightValue)
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:
#setRightUnits(int)

getBottomValue

public Float getBottomValue()
Gets the 'bottom' attributes value using current units.

Returns:
The value of the 'bottom' attribute, null if not set
See Also:
getBottomUnits()

setBottomValue

public void setBottomValue(Float bottomValue)
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:
#setBottomUnits(int)

getLeftValue

public Float getLeftValue()
Gets the 'left' attributes value using current units.

Returns:
The value of the 'left' attribute, null if not set
See Also:
getLeftUnits()

setLeftValue

public void setLeftValue(Float leftValue)
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:
#setLeftUnits(int)

getTopUnits

public Sizeable.Unit getTopUnits()
Gets the unit for the 'top' attribute

Returns:
See Sizeable UNIT_SYMBOLS for a description of the available units.

setTopUnits

public void setTopUnits(Sizeable.Unit topUnits)
Sets the unit for the 'top' attribute

Parameters:
topUnits - See Sizeable UNIT_SYMBOLS for a description of the available units.

getRightUnits

public Sizeable.Unit getRightUnits()
Gets the unit for the 'right' attribute

Returns:
See Sizeable UNIT_SYMBOLS for a description of the available units.

setRightUnits

public void setRightUnits(Sizeable.Unit rightUnits)
Sets the unit for the 'right' attribute

Parameters:
rightUnits - See Sizeable UNIT_SYMBOLS for a description of the available units.

getBottomUnits

public Sizeable.Unit getBottomUnits()
Gets the unit for the 'bottom' attribute

Returns:
See Sizeable UNIT_SYMBOLS for a description of the available units.

setBottomUnits

public void setBottomUnits(Sizeable.Unit bottomUnits)
Sets the unit for the 'bottom' attribute

Parameters:
bottomUnits - See Sizeable UNIT_SYMBOLS for a description of the available units.

getLeftUnits

public Sizeable.Unit getLeftUnits()
Gets the unit for the 'left' attribute

Returns:
See Sizeable UNIT_SYMBOLS for a description of the available units.

setLeftUnits

public void setLeftUnits(Sizeable.Unit leftUnits)
Sets the unit for the 'left' attribute

Parameters:
leftUnits - See Sizeable UNIT_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

public String toString()
Overrides:
toString in class Object


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.