Package muntjac :: Package ui :: Module alignment :: Class Alignment
[hide private]
[frames] | no frames]

Class Alignment

source code

object --+
         |
        Alignment

Class containing information about alignment of a component. Use the pre-instantiated classes.

Instance Methods [hide private]
 
__init__(self, bitMask)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
getBitMask(self)
Returns a bitmask representation of the alignment value.
source code
 
isTop(self)
Checks if component is aligned to the top of the available space.
source code
 
isBottom(self)
Checks if component is aligned to the bottom of the available space.
source code
 
isLeft(self)
Checks if component is aligned to the left of the available space.
source code
 
isRight(self)
Checks if component is aligned to the right of the available space.
source code
 
isMiddle(self)
Checks if component is aligned middle (vertically center) of the available space.
source code
 
isCenter(self)
Checks if component is aligned center (horizontally) of the available space.
source code
 
getVerticalAlignment(self)
Returns string representation of vertical alignment.
source code
 
getHorizontalAlignment(self)
Returns string representation of horizontal alignment.
source code
 
__eq__(self, obj) source code
 
__hash__(self)
hash(x)
source code
 
__str__(self)
str(x)
source code

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

Class Variables [hide private]
  TOP_RIGHT = Alignment((Bits.ALIGNMENT_TOP+ Bits.ALIGNMENT_RIGHT))
  TOP_LEFT = Alignment.TOP_LEFT
  TOP_CENTER = Alignment((Bits.ALIGNMENT_TOP+ Bits.ALIGNMENT_HOR...
  MIDDLE_RIGHT = Alignment((Bits.ALIGNMENT_VERTICAL_CENTER+ Bits...
  MIDDLE_LEFT = Alignment((Bits.ALIGNMENT_VERTICAL_CENTER+ Bits....
  MIDDLE_CENTER = Alignment((Bits.ALIGNMENT_VERTICAL_CENTER+ Bit...
  BOTTOM_RIGHT = Alignment((Bits.ALIGNMENT_BOTTOM+ Bits.ALIGNMEN...
  BOTTOM_LEFT = Alignment((Bits.ALIGNMENT_BOTTOM+ Bits.ALIGNMENT...
  BOTTOM_CENTER = Alignment((Bits.ALIGNMENT_BOTTOM+ Bits.ALIGNME...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, bitMask)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

getBitMask(self)

source code 

Returns a bitmask representation of the alignment value. Used internally by terminal.

Returns:
the bitmask representation of the alignment value

isTop(self)

source code 

Checks if component is aligned to the top of the available space.

Returns:
true if aligned top

isBottom(self)

source code 

Checks if component is aligned to the bottom of the available space.

Returns:
true if aligned bottom

isLeft(self)

source code 

Checks if component is aligned to the left of the available space.

Returns:
true if aligned left

isRight(self)

source code 

Checks if component is aligned to the right of the available space.

Returns:
true if aligned right

isMiddle(self)

source code 

Checks if component is aligned middle (vertically center) of the available space.

Returns:
true if aligned bottom

isCenter(self)

source code 

Checks if component is aligned center (horizontally) of the available space.

Returns:
true if aligned center

getVerticalAlignment(self)

source code 

Returns string representation of vertical alignment.

Returns:
vertical alignment as CSS value

getHorizontalAlignment(self)

source code 

Returns string representation of horizontal alignment.

Returns:
horizontal alignment as CSS value

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

Class Variable Details [hide private]

TOP_CENTER

Value:
Alignment((Bits.ALIGNMENT_TOP+ Bits.ALIGNMENT_HORIZONTAL_CENTER))

MIDDLE_RIGHT

Value:
Alignment((Bits.ALIGNMENT_VERTICAL_CENTER+ Bits.ALIGNMENT_RIGHT))

MIDDLE_LEFT

Value:
Alignment((Bits.ALIGNMENT_VERTICAL_CENTER+ Bits.ALIGNMENT_LEFT))

MIDDLE_CENTER

Value:
Alignment((Bits.ALIGNMENT_VERTICAL_CENTER+ Bits.ALIGNMENT_HORIZONTAL_C\
ENTER))

BOTTOM_RIGHT

Value:
Alignment((Bits.ALIGNMENT_BOTTOM+ Bits.ALIGNMENT_RIGHT))

BOTTOM_LEFT

Value:
Alignment((Bits.ALIGNMENT_BOTTOM+ Bits.ALIGNMENT_LEFT))

BOTTOM_CENTER

Value:
Alignment((Bits.ALIGNMENT_BOTTOM+ Bits.ALIGNMENT_HORIZONTAL_CENTER))