Ejemplo n.º 1
0
class ScanMapperPage(HIGVBox):
    def __init__(self):
        HIGVBox.__init__(self)
        self.__parser = None
        self.__radialnet = None
        self.__created = False

    def create_widgets(self):
        if self.__created:
            self.__toolbar.enable_tools()
            self.update_graph()
            return

        self.set_spacing(0)
        self.__hbox = HIGHBox(spacing=0)

        # Create RadialNet
        self.__radialnet = RadialNet(LAYOUT_WEIGHTED)
        self.__radialnet.set_no_show_all(True)

        self.__radialnet.set_empty()
        self.update_graph()
        self.__radialnet.show()

        # Create Controlors

        self.__control = ControlWidget(self.__radialnet)
        self.__control_sw = HIGScrolledWindow()
        self.__control_sw.set_no_show_all(True)
        self.__control_sw.add_with_viewport(self.__control)
        self.__control_sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)

        self.__fisheye = ControlFisheye(self.__radialnet)
        self.__fisheye.set_no_show_all(True)
        self.__toolbar = Toolbar(self.__radialnet, self, self.__control_sw,
                                 self.__fisheye)
        self.__toolbar.disable_tools()

        self.__hbox._pack_expand_fill(self.__radialnet)
        self.__hbox._pack_noexpand_nofill(self.__control_sw)

        self._pack_noexpand_nofill(self.__toolbar)
        self._pack_expand_fill(self.__hbox)
        self._pack_noexpand_nofill(self.__fisheye)

        self.show_all()
        self.__created = True

    def update_graph(self):
        self.__graph = GraphBuilder()
        self.__graph.make(self.__parser)
        self.__radialnet.set_graph(self.__graph)

    def set_parse(self, parse):
        self.__parser = parse
        if self.__radialnet is not None:
            self.__radialnet.set_graph(self.__graph)
Ejemplo n.º 2
0
    def create_widgets(self):
        if self.__created:
            self.__toolbar.enable_tools()
            self.update_graph()
            return

        self.set_spacing(0)
        self.__hbox = HIGHBox(spacing=0)

        # Create RadialNet
        self.__radialnet = RadialNet(LAYOUT_WEIGHTED)
        self.__radialnet.set_no_show_all(True)

        self.__radialnet.set_empty()
        self.update_graph()
        self.__radialnet.show()

        # Create Controlors

        self.__control = ControlWidget(self.__radialnet)
        self.__control_sw = HIGScrolledWindow()
        self.__control_sw.set_no_show_all(True)
        self.__control_sw.add_with_viewport(self.__control)
        self.__control_sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)

        self.__fisheye = ControlFisheye(self.__radialnet)
        self.__fisheye.set_no_show_all(True)
        self.__toolbar = Toolbar(self.__radialnet, self, self.__control_sw,
                                 self.__fisheye)
        self.__toolbar.disable_tools()

        self.__hbox._pack_expand_fill(self.__radialnet)
        self.__hbox._pack_noexpand_nofill(self.__control_sw)

        self._pack_noexpand_nofill(self.__toolbar)
        self._pack_expand_fill(self.__hbox)
        self._pack_noexpand_nofill(self.__fisheye)

        self.show_all()
        self.__created = True
Ejemplo n.º 3
0
    def create_widgets(self):
        if self.__created:
            self.__toolbar.enable_tools()
            self.update_graph()
            return

        self.set_spacing(0)
        self.__hbox = HIGHBox(spacing=0)
        
        
        # Create RadialNet
        self.__radialnet = RadialNet(LAYOUT_WEIGHTED)
        self.__radialnet.set_no_show_all(True)
        
        self.__radialnet.set_empty()
        self.update_graph()
        self.__radialnet.show()
        
        
        # Create Controlors
        

        self.__control = ControlWidget(self.__radialnet)
        self.__control_sw = HIGScrolledWindow()
        self.__control_sw.set_no_show_all(True)
        self.__control_sw.add_with_viewport(self.__control)
        self.__control_sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)

        self.__fisheye = ControlFisheye(self.__radialnet)
        self.__fisheye.set_no_show_all(True)
        self.__toolbar = Toolbar(self.__radialnet,
                                        self,
                                        self.__control_sw,
                                        self.__fisheye)
        self.__toolbar.disable_tools()
        
        
        
        self.__hbox._pack_expand_fill(self.__radialnet)
        self.__hbox._pack_noexpand_nofill(self.__control_sw)
        
        self._pack_noexpand_nofill(self.__toolbar)
        self._pack_expand_fill(self.__hbox)
        self._pack_noexpand_nofill(self.__fisheye)
        
        self.show_all()
        self.__created = True
Ejemplo n.º 4
0
class ScanMapperPage(HIGVBox):
    def __init__(self):
        HIGVBox.__init__(self)
        self.__parser = None 
        self.__radialnet = None
        self.__created = False
        
    def create_widgets(self):
        if self.__created:
            self.__toolbar.enable_tools()
            self.update_graph()
            return

        self.set_spacing(0)
        self.__hbox = HIGHBox(spacing=0)
        
        
        # Create RadialNet
        self.__radialnet = RadialNet(LAYOUT_WEIGHTED)
        self.__radialnet.set_no_show_all(True)
        
        self.__radialnet.set_empty()
        self.update_graph()
        self.__radialnet.show()
        
        
        # Create Controlors
        

        self.__control = ControlWidget(self.__radialnet)
        self.__control_sw = HIGScrolledWindow()
        self.__control_sw.set_no_show_all(True)
        self.__control_sw.add_with_viewport(self.__control)
        self.__control_sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)

        self.__fisheye = ControlFisheye(self.__radialnet)
        self.__fisheye.set_no_show_all(True)
        self.__toolbar = Toolbar(self.__radialnet,
                                        self,
                                        self.__control_sw,
                                        self.__fisheye)
        self.__toolbar.disable_tools()
        
        
        
        self.__hbox._pack_expand_fill(self.__radialnet)
        self.__hbox._pack_noexpand_nofill(self.__control_sw)
        
        self._pack_noexpand_nofill(self.__toolbar)
        self._pack_expand_fill(self.__hbox)
        self._pack_noexpand_nofill(self.__fisheye)
        
        self.show_all()
        self.__created = True
    def update_graph(self):
        self.__graph = GraphBuilder()
        self.__graph.make(self.__parser)
        self.__radialnet.set_graph(self.__graph)
    def set_parse(self, parse):
        self.__parser = parse
        if self.__radialnet is not None:
            self.__radialnet.set_graph(self.__graph)