Package muntjac :: Package ui :: Module absolute_layout :: Class ComponentPosition
[hide private]
[frames] | no frames]

Class ComponentPosition

source code

object --+
         |
        ComponentPosition

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.

Instance Methods [hide private]
 
__init__(self, layout)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
setCSSString(self, css)
Sets the position attributes using CSS syntax.
source code
 
parseCssUnit(self, string)
Parses a string and checks if a unit is found.
source code
 
getCSSString(self)
Converts the internal values into a valid CSS string.
source code
 
setTop(self, topValue, topUnits)
Sets the 'top' attribute; distance from the top of the component to the top edge of the layout.
source code
 
setRight(self, rightValue, rightUnits)
Sets the 'right' attribute; distance from the right of the component to the right edge of the layout.
source code
 
setBottom(self, bottomValue, bottomUnits)
Sets the 'bottom' attribute; distance from the bottom of the component to the bottom edge of the layout.
source code
 
setLeft(self, leftValue, leftUnits)
Sets the 'left' attribute; distance from the left of the component to the left edge of the layout.
source code
 
setZIndex(self, zIndex)
Sets the 'z-index' attribute; the visual stacking order
source code
 
setTopValue(self, topValue)
Sets the value of the 'top' attribute; distance from the top of the component to the top edge of the layout.
source code
 
getTopValue(self)
Gets the 'top' attributes value in current units.
source code
 
getRightValue(self)
Gets the 'right' attributes value in current units.
source code
 
setRightValue(self, rightValue)
Sets the 'right' attribute value (distance from the right of the component to the right edge of the layout).
source code
 
getBottomValue(self)
Gets the 'bottom' attributes value using current units.
source code
 
setBottomValue(self, bottomValue)
Sets the 'bottom' attribute value (distance from the bottom of the component to the bottom edge of the layout).
source code
 
getLeftValue(self)
Gets the 'left' attributes value using current units.
source code
 
setLeftValue(self, leftValue)
Sets the 'left' attribute value (distance from the left of the component to the left edge of the layout).
source code
 
getTopUnits(self)
Gets the unit for the 'top' attribute
source code
 
setTopUnits(self, topUnits)
Sets the unit for the 'top' attribute
source code
 
getRightUnits(self)
Gets the unit for the 'right' attribute
source code
 
setRightUnits(self, rightUnits)
Sets the unit for the 'right' attribute
source code
 
getBottomUnits(self)
Gets the unit for the 'bottom' attribute
source code
 
setBottomUnits(self, bottomUnits)
Sets the unit for the 'bottom' attribute
source code
 
getLeftUnits(self)
Gets the unit for the 'left' attribute
source code
 
setLeftUnits(self, leftUnits)
Sets the unit for the 'left' attribute
source code
 
getZIndex(self)
Gets the 'z-index' attribute.
source code
 
toString(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, layout)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

setCSSString(self, css)

source code 

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;")

parseCssUnit(self, string)

source code 

Parses a string and checks if a unit is found. If a unit is not found from the string the unit pixels is used.

Parameters:
  • string - The string to parse the unit from
Returns:
The found unit

getCSSString(self)

source code 

Converts the internal values into a valid CSS string.

Returns:
A valid CSS string

setTop(self, topValue, topUnits)

source code 

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(self, rightValue, rightUnits)

source code 

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(self, bottomValue, bottomUnits)

source code 

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
  • bottomUnits - The unit of the 'bottom' attribute. See UNIT_SYMBOLS for a description of the available units.

setLeft(self, leftValue, leftUnits)

source code 

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
  • leftUnits - The unit of the 'left' attribute. See UNIT_SYMBOLS for a description of the available units.

setZIndex(self, zIndex)

source code 

Sets the 'z-index' attribute; the visual stacking order

Parameters:
  • zIndex - The z-index for the component.

setTopValue(self, topValue)

source code 

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(self)

source code 

Gets the 'top' attributes value in current units.

Returns:
The value of the 'top' attribute, null if not set

See Also: getTopUnits

getRightValue(self)

source code 

Gets the 'right' attributes value in current units.

Returns:
The value of the 'right' attribute, null if not set

See Also: getRightUnits

setRightValue(self, rightValue)

source code 

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

getBottomValue(self)

source code 

Gets the 'bottom' attributes value using current units.

Returns:
The value of the 'bottom' attribute, null if not set

See Also: getBottomUnits

setBottomValue(self, bottomValue)

source code 

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

getLeftValue(self)

source code 

Gets the 'left' attributes value using current units.

Returns:
The value of the 'left' attribute, null if not set

See Also: getLeftUnits

setLeftValue(self, leftValue)

source code 

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

getTopUnits(self)

source code 

Gets the unit for the 'top' attribute

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

setTopUnits(self, topUnits)

source code 

Sets the unit for the 'top' attribute

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

getRightUnits(self)

source code 

Gets the unit for the 'right' attribute

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

setRightUnits(self, rightUnits)

source code 

Sets the unit for the 'right' attribute

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

getBottomUnits(self)

source code 

Gets the unit for the 'bottom' attribute

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

setBottomUnits(self, bottomUnits)

source code 

Sets the unit for the 'bottom' attribute

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

getLeftUnits(self)

source code 

Gets the unit for the 'left' attribute

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

setLeftUnits(self, leftUnits)

source code 

Sets the unit for the 'left' attribute

Parameters:
  • leftUnits - See ISizeable UNIT_SYMBOLS for a description of the available units.

getZIndex(self)

source code 

Gets the 'z-index' attribute.

Returns:
the zIndex The z-index attribute