'Set the scheme to display. Populates the scene with nodes and links
already in the scheme. Any further change to the scheme will be
reflected in the scene.
Parameters
scheme : :class:`~.scheme.Scheme`'

def set_scheme(self, scheme):

    if (self.scheme is not None):
        self.clear_scene()
    log.info(("Setting    scheme    '%s'    on    '%s'" % (scheme, self)))
    self.scheme = scheme
    if (self.scheme is not None):
        self.scheme.node_added.connect(self.add_node)
        self.scheme.node_removed.connect(self.remove_node)
        self.scheme.link_added.connect(self.add_link)
        self.scheme.link_removed.connect(self.remove_link)
        self.scheme.annotation_added.connect(self.add_annotation)
        self.scheme.annotation_removed.connect(self.remove_annotation)
        self.scheme.node_state_changed.connect(self.on_widget_state_change)
        self.scheme.channel_state_changed.connect(self.on_link_state_change)
        self.scheme.topology_changed.connect(self.on_scheme_change)
    for node in scheme.nodes:
        self.add_node(node)
    for link in scheme.links:
        self.add_link(link)
    for annot in scheme.annotations:
        self.add_annotation(annot)
