':returns: element class by element type ID'

def get_class(self, typeid):

    if (typeid in self._element_cache):
        return self._element_cache[typeid]
    for cls in UIElement.get_classes():
        if (cls.typeid == typeid):
            self._element_cache[typeid] = cls
            return cls
    else:
        self._element_cache[typeid] = NullElement
        return NullElement
