2006-01-15 03:51:56 +05:30
|
|
|
from _Constants import ObjectTypes
|
|
|
|
|
2006-01-16 19:02:59 +05:30
|
|
|
from _PersonFrame import PersonFrame
|
|
|
|
from _FamilyFrame import FamilyFrame
|
2006-01-15 03:51:56 +05:30
|
|
|
|
|
|
|
|
2006-01-16 19:02:59 +05:30
|
|
|
class ObjectFrameFactory(object):
|
|
|
|
__frame_creators = {ObjectTypes.PERSON: PersonFrame,
|
|
|
|
ObjectTypes.FAMILY: FamilyFrame}
|
2006-01-15 03:51:56 +05:30
|
|
|
|
2006-01-20 16:00:35 +05:30
|
|
|
def get_frame(self,object_type,dbstate,uistate,filter_spec=None):
|
|
|
|
return self.__class__.__frame_creators[object_type](dbstate,uistate,filter_spec)
|
2006-01-15 03:51:56 +05:30
|
|
|
|
|
|
|
|