parameters: (self, attrconf, **args)
docstring: Figures out what widget container, containing a set of widgets,
          would be the most aprobriate to represent this attribute.
docstring_summary: Figures out what widget container, containing a set of widgets,
          would be the most aprobriate to represent this attribute.
docstring_tokens: Figures out what widget container containing a set of widgets would be the most aprobriate to represent this attribute .
function: def get_widgetcontainer(self, attrconf, **args):
          """
          Figures out what widget container, containing a set of widgets,
          would be the most aprobriate to represent this attribute.
          """
          # print '\n\nScalarPanel.get_widgetcontainer',attrconf.attrname
  
          # config=self.obj.get_config(attr)
          # get type list (full depth)
          # t=attrconfig.get_default()
  
          # take top level type
          # tt=t[0]
          tt = type(attrconf.get_default())
  
          # get metatype
          mt = attrconf.get_metatype()
  
          # print ' default,mt,tt',attrconf.get_default(),type(attrconf.get_default()),mt,tt,mt in METATYPES_LINKSTYLE
  
          # if config.has_key('choices'):
          #    # pop up with a choices list
          #    return ChoiceWidgetContainer(self,attr,**args)
  
          # check if this is an id within a referenced object
          # if mt=='id':
          #    return IdWidgetContainer(self,attr,**args)
          #
          # check  if widgets for metatypes are availlable
          # elif mt=='color':
          #    #print '  ->WidgetContainer'
          #    return ColorWidgetContainer(self,attr,**args)
  
          # elif mt=='pentype':
          #    return PentypeContainer(self,attr,**args)
  
          if mt in METATYPES_LINKSTYLE:
              return ObjWidgetContainer(self, attrconf, **args)
  
          elif mt == 'color':
              return ColorWidgetContainer(self, attrconf, **args)
  
          elif (mt == 'list') & hasattr(attrconf, 'choices'):
              return ChecklistWidgetContainer(self, attrconf, **args)
  
          elif (mt == 'list'):
              return ListWidgetContainer(self, attrconf, **args)
  
          elif hasattr(attrconf, 'choices'):
              return ChoiceWidgetContainer(self, attrconf, **args)
  
          elif mt == 'filepath':
              return FilepathWidgetContainer(self, attrconf, **args)
  
          elif mt == 'filepaths':
              return FilepathsWidgetContainer(self, attrconf, **args)
  
          elif mt == 'dirpath':
              return DirpathWidgetContainer(self, attrconf, **args)
          elif mt == 'datetime':
              return DatetimeWidgetContainer(self, attrconf, **args)
  
          # elif mt == 'number':
          if tt in (types.IntType, types.LongType):
              return IntegerWidgetContainer(self, attrconf, **args)
          elif tt in (types.FloatType, types.ComplexType):
              return NumericWidgetContainer(self, attrconf, **args)
  
          # check now native types
  
          elif tt in (types.BooleanType,):
              return BooleanWidgetContainer(self, attrconf, **args)
  
          elif tt in STRINGTYPES:
              return TextWidgetContainer(self, attrconf, **args)
  
          # elif tt in (types.InstanceType,types.ClassType):
          #    return ObjWidgetContainer(self,attrconf,**args)
  
          elif tt in (types.ListType, types.TupleType):
              return ListWidgetContainer(self, attrconf, **args)
  
          else:
              # else means use a the base class that can display anything
              return WidgetContainer(self, attrconf, **args)
function_tokens: def get_widgetcontainer ( self , attrconf , * * args ) : # print '\n\nScalarPanel.get_widgetcontainer',attrconf.attrname # config=self.obj.get_config(attr) # get type list (full depth) # t=attrconfig.get_default() # take top level type # tt=t[0] tt = type ( attrconf . get_default ( ) ) # get metatype mt = attrconf . get_metatype ( ) # print ' default,mt,tt',attrconf.get_default(),type(attrconf.get_default()),mt,tt,mt in METATYPES_LINKSTYLE # if config.has_key('choices'): #    # pop up with a choices list #    return ChoiceWidgetContainer(self,attr,**args) # check if this is an id within a referenced object # if mt=='id': #    return IdWidgetContainer(self,attr,**args) # # check  if widgets for metatypes are availlable # elif mt=='color': #    #print '  ->WidgetContainer' #    return ColorWidgetContainer(self,attr,**args) # elif mt=='pentype': #    return PentypeContainer(self,attr,**args) if mt in METATYPES_LINKSTYLE : return ObjWidgetContainer ( self , attrconf , * * args ) elif mt == 'color' : return ColorWidgetContainer ( self , attrconf , * * args ) elif ( mt == 'list' ) & hasattr ( attrconf , 'choices' ) : return ChecklistWidgetContainer ( self , attrconf , * * args ) elif ( mt == 'list' ) : return ListWidgetContainer ( self , attrconf , * * args ) elif hasattr ( attrconf , 'choices' ) : return ChoiceWidgetContainer ( self , attrconf , * * args ) elif mt == 'filepath' : return FilepathWidgetContainer ( self , attrconf , * * args ) elif mt == 'filepaths' : return FilepathsWidgetContainer ( self , attrconf , * * args ) elif mt == 'dirpath' : return DirpathWidgetContainer ( self , attrconf , * * args ) elif mt == 'datetime' : return DatetimeWidgetContainer ( self , attrconf , * * args ) # elif mt == 'number': if tt in ( types . IntType , types . LongType ) : return IntegerWidgetContainer ( self , attrconf , * * args ) elif tt in ( types . FloatType , types . ComplexType ) : return NumericWidgetContainer ( self , attrconf , * * args ) # check now native types elif tt in ( types . BooleanType , ) : return BooleanWidgetContainer ( self , attrconf , * * args ) elif tt in STRINGTYPES : return TextWidgetContainer ( self , attrconf , * * args ) # elif tt in (types.InstanceType,types.ClassType): #    return ObjWidgetContainer(self,attrconf,**args) elif tt in ( types . ListType , types . TupleType ) : return ListWidgetContainer ( self , attrconf , * * args ) else : # else means use a the base class that can display anything return WidgetContainer ( self , attrconf , * * args )