Package muntjac :: Package ui :: Module alignment_utils :: Class AlignmentUtils
[hide private]
[frames] | no frames]

Class AlignmentUtils

source code

object --+
         |
        AlignmentUtils

Helper class for setting alignments using a short notation.

Supported notation is:


Deprecated: replaced by Alignment.

Instance Methods [hide private]

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

Class Methods [hide private]
 
addMapping(cls, alignment, *values) source code
 
setComponentAlignment(cls, parent, component, alignment)
Set the alignment for the component using short notation.
source code
 
parseAlignment(cls, alignmentString, alignment)
Parse alignmentString which contains one alignment (horizontal or vertical) and return and updated version of the passed alignment where the alignment in one direction has been changed.
source code
Class Variables [hide private]
  _horizontalMask = 19
  _verticalMask = 44
  _alignmentStrings = {'b': 8, 'bottom': 8, 'c': 16, 'center': 1...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setComponentAlignment(cls, parent, component, alignment)
Class Method

source code 

Set the alignment for the component using short notation.

Parameters:
  • parent
  • component
  • alignment - String containing one or two alignment strings. If short notation "r", "t", etc is used valid strings include "r", "rt", "tr", "t". If the longer notation is used the alignments should be separated by a space e.g. "right", "right top", "top right", "top". It is valid to mix short and long notation but they must be separated by a space e.g. "r top".
Raises:
  • ValueError

parseAlignment(cls, alignmentString, alignment)
Class Method

source code 

Parse alignmentString which contains one alignment (horizontal or vertical) and return and updated version of the passed alignment where the alignment in one direction has been changed. If the passed alignmentString is unknown an exception is thrown

Raises:
  • ValueError

Class Variable Details [hide private]

_alignmentStrings

Value:
{'b': 8,
 'bottom': 8,
 'c': 16,
 'center': 16,
 'l': 1,
 'left': 1,
 'm': 32,
 'middle': 32,
...