本文整理汇总了Python中albow.Tree类的典型用法代码示例。如果您正苦于以下问题:Python Tree类的具体用法?Python Tree怎么用?Python Tree使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Tree类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, *args, **kwargs):
styles = kwargs.get('styles', {})
self.update_draw_bullets_methods(styles)
global map_types_item
self.map_types_item = setup_map_types_item(item_types_map)
Tree.__init__(self, *args, **kwargs)
for t in self.item_types:
if 'create_%s'%t.__name__ in globals().keys():
setattr(self, 'create_%s'%t.__name__, globals()['create_%s'%t.__name__])
示例2: add_child
def add_child(self, types_item=None):
if types_item is None:
parent = self.selected_item
p_type = parent[7]
if p_type == TAG_List:
k = parent[9].list_type
v = None
for key, value in item_types_map.items():
if globals().get(key.__name__.upper(), -1) == k:
v = value
break
if v is None:
return
types_item = {v[0]: (key, v[1], v[2])}
Tree.add_child(self, types_item)
示例3: click_item
def click_item(self, *args, **kwargs):
Tree.click_item(self, *args, **kwargs)
if self._parent and self.selected_item:
self._parent.update_side_panel(self.selected_item)
示例4: _draw_closed_bullet
def _draw_closed_bullet(self, *args, **kwargs):
return Tree.draw_closed_bullet(self, *args, **kwargs)
示例5: _draw_opened_bullet
def _draw_opened_bullet(self, *args, **kwargs):
return Tree.draw_opened_bullet(self, *args, **kwargs)