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-19 21:33:09 +05:30
|
|
|
def get_frame(self,object_type,dbstate,uistate):
|
|
|
|
return self.__class__.__frame_creators[object_type](dbstate,uistate)
|
2006-01-15 03:51:56 +05:30
|
|
|
|
|
|
|
|