def __init__(self, channels, item_model): print "ChannelTree __init__" self.item_model = item_model root = DefaultMutableTreeNode("Root") tree_model = DefaultTreeModel(root) idx = 0 print "channels", channels for channel in channels: node = ChannelTreeNode(channel) tree_model.insertNodeInto(node, root, idx) idx = idx + 1 JTree.__init__(self, tree_model)
def __init__(self,value=None): if value != None: JTree.__init__(self,value) else: JTree.__init__(self) self.initialize()
def __init__(self, value=None): if value != None: JTree.__init__(self, value) else: JTree.__init__(self) self.initialize()