Package muntjac :: Package ui :: Module layout :: Class IAlignmentHandler
[hide private]
[frames] | no frames]

Class IAlignmentHandler

source code

object --+
         |
        IAlignmentHandler
Known Subclasses:

IAlignmentHandler is most commonly an advanced ILayout that can align its components.

Instance Methods [hide private]
 
setComponentAlignment(self, *args)
Set alignment for one contained component in this layout.
source code
 
getComponentAlignment(self, childComponent)
Returns the current Alignment of given component.
source code

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

Class Variables [hide private]
  ALIGNMENT_LEFT = 1
  ALIGNMENT_RIGHT = 2
  ALIGNMENT_TOP = 4
  ALIGNMENT_BOTTOM = 8
  ALIGNMENT_HORIZONTAL_CENTER = 16
  ALIGNMENT_VERTICAL_CENTER = 32
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setComponentAlignment(self, *args)

source code 

Set alignment for one contained component in this layout. Alignment is calculated as a bit mask of the two passed values or predefined alignments from Alignment class.

Example:

    layout.setComponentAlignment(myComponent, Alignment.TOP_RIGHT)
Parameters:
  • args - tuple of the form
    • (childComponent, horizontalAlignment, verticalAlignment)
      1. the component to align within it's layout cell.
      2. the horizontal alignment for the child component (left, center, right). Use ALIGNMENT constants.
      3. the vertical alignment for the child component (top, center, bottom). Use ALIGNMENT constants.
    • (childComponent, alignment)
      1. the component to align within it's layout cell.
      2. the Alignment value to be set

Deprecated: Use setComponentAlignment instead

getComponentAlignment(self, childComponent)

source code 

Returns the current Alignment of given component.

Returns:
the Alignment