Exemplo n.º 1
0
    def _explorer_view_factory(self, window, **traits):
        """ Factory method for explorer views. """
        from enthought.pyface.workbench.traits_ui_view import \
                TraitsUIView

        explorer = self._get_explorer(window)
        tui_engine_view = TraitsUIView(obj=explorer,
                                       id='explorer3d.Explorer3D',
                                       name='Explorer3D',
                                       window=window,
                                       position='left',
                                       **traits)
        return tui_engine_view
Exemplo n.º 2
0
    def _worker_view_factory(self, window, **traits):
        """ Factory method for the current selection of the engine. """

        from enthought.pyface.workbench.traits_ui_view import \
                TraitsUIView

        worker = window.get_service(Worker)
        tui_worker_view = TraitsUIView(obj=worker,
                                       view='view',
                                       id='user_mayavi.Worker.view',
                                       name='Custom Mayavi2 View',
                                       window=window,
                                       position='left',
                                       **traits)
        return tui_worker_view
Exemplo n.º 3
0
    def _engine_view_factory(self, window, **traits):
        """ Factory method for engine views. """
        from enthought.pyface.workbench.traits_ui_view import \
                TraitsUIView
        from enthought.mayavi.core.ui.engine_view import \
                            EngineView

        engine_view = EngineView(engine=self._get_engine(window))
        tui_engine_view = TraitsUIView(obj=engine_view,
                                       id=ENGINE_VIEW,
                                       name='Mayavi',
                                       window=window,
                                       position='left',
                                       **traits)
        return tui_engine_view
Exemplo n.º 4
0
    def _current_selection_view_factory(self, window, **traits):
        """ Factory method for the current selection of the engine. """

        from enthought.pyface.workbench.traits_ui_view import \
                TraitsUIView

        engine = self._get_engine(window)
        tui_engine_view = TraitsUIView(obj=engine,
                                       view='current_selection_view',
                                       id=CURRENT_SELECTION_VIEW,
                                       name='Mayavi object editor',
                                       window=window,
                                       position='bottom',
                                       relative_to=ENGINE_VIEW,
                                       **traits)
        return tui_engine_view
Exemplo n.º 5
0
    def _cfile_view_factory(self, window, **traits):
        """ Factory method for connectome file views. """
        from enthought.pyface.workbench.traits_ui_view import \
                TraitsUIView

        from cviewer.plugins.cff2.ui.cff_view import CFFView

        cfile = self._get_cff_service()
        cfile._workbenchwin = window
        cff_view = CFFView(cfile=cfile)
        tui_engine_view = TraitsUIView(obj=cff_view,
                                       id=CFFVIEW,
                                       name='Connectome File View',
                                       window=window,
                                       position='left',
                                       **traits)
        return tui_engine_view
Exemplo n.º 6
0
    def _cmp_factory(self, window, **traits):
        """ Factory method for the mapper """

        from enthought.pyface.workbench.traits_ui_view import TraitsUIView

        try:
            from cmp.gui import CMPGUI
            mycmp = CMPGUI()
        except:
            return
        
        tui_engine_view = TraitsUIView(obj=mycmp,
                                       id=CMPVIEW,
                                       name='Connectome Mapper',
                                       window=window,
                                       position='right',
                                       #relative_to=ENGINE_VIEW,
                                       **traits
                                       )
        return tui_engine_view