def getPosition(self, component):
        """Gets the position of a component in the layout. Returns C{None}
        if component is not attached to the layout.

        @param component:
                   The component which position is needed
        @return: An instance of ComponentPosition containing the position
                of the component, or null if the component is not enclosed
                in the layout.
        """
        if component.getParent() != self:
            return None
        elif component in self._componentToCoordinates:
            return self._componentToCoordinates.get(component)
        else:
            coords = ComponentPosition(self)
            self._componentToCoordinates[component] = coords
            return coords
dataset/ETHPy150Open rwl/muntjac/muntjac/ui/absolute_layout.py/AbsoluteLayout.getPosition/original