Esempio n. 1
0
    def _explorer_view_factory(self, window, **traits):
        """ Factory method for explorer views. """
        from 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
Esempio n. 2
0
    def _sdomain_service_view_factory(self, window, **traits):
        """ Factory method for sdomain_service views. """
        from pyface.workbench.traits_ui_view import \
            TraitsUIView

        sdomain_service = self._get_sdomain_service(window)
        tui_engine_view = TraitsUIView(obj=sdomain_service,
                                       id='ibvpy.plugins.sdomain_service.sdomain_service',
                                       name='Spatial domain',
                                       window=window,
                                       position='left',
                                       **traits
                                       )
        return tui_engine_view
Esempio n. 3
0
    def _tstepper_service_view_factory(self, window, **traits):
        """ Factory method for tstepper_service views. """
        from pyface.workbench.traits_ui_view import \
            TraitsUIView

        tstepper_service = self._get_tstepper_service(window)
        tui_engine_view = TraitsUIView(obj=tstepper_service,
                                       id='ibvpy.plugins.tstepper_service.tstepper_service',
                                       name='Time stepper',
                                       window=window,
                                       position='left',
                                       **traits
                                       )
        return tui_engine_view
Esempio n. 4
0
    def _ibv_model_service_view_factory(self, window, **traits):
        """ Factory method for ibv_model_service views. """
        from pyface.workbench.traits_ui_view import \
            TraitsUIView

        ibv_model_service = self._get_ibv_model_service(window)
        tui_engine_view = TraitsUIView(
            obj=ibv_model_service,
            id='ibvpy.plugins.ibv_model_service.ibv_model_service',
            name='IBV Model',
            window=window,
            position='left',
            **traits)
        return tui_engine_view
Esempio n. 5
0
    def _rtrace_service_view_factory(self, window, **traits):
        """ Factory method for rtrace_service views. """
        from pyface.workbench.traits_ui_view import \
            TraitsUIView

        rtrace_service = self._get_rtrace_service(window)
        tui_engine_view = TraitsUIView(obj=rtrace_service,
                                       id='ibvpy.plugins.rtrace_service.rtrace_service',
                                       name='Response traces',
                                       window=window,
                                       position='left',
                                       **traits
                                       )
        return tui_engine_view
Esempio n. 6
0
    def _worker_view_factory(self, window, **traits):
        """ Factory method for the current selection of the engine. """

        from 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
Esempio n. 7
0
    def _engine_view_factory(self, window, **traits):
        """ Factory method for engine views. """
        from pyface.workbench.traits_ui_view import \
                TraitsUIView
        from 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
Esempio n. 8
0
    def _current_selection_view_factory(self, window, **traits):
        """ Factory method for the current selection of the engine. """

        from 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
Esempio n. 9
0
 def _cfile_view_factory(self, window, **traits):
     """ Factory method for connectome file views. """
     from 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
Esempio n. 10
0
    def _project_view_factory(self, window, **traits):
        """
        Factory method for project views.

        """
        from pyface.workbench.traits_ui_view import \
                TraitsUIView
        from envisage.ui.single_project.api import \
                            ProjectView

        project_view = ProjectView(application=window.application)
        tui_project_view = TraitsUIView(
            obj=project_view,
            id='envisage.ui.single_project.view.project_view.ProjectView',
            name='Project View',
            window=window,
            position='left',
            **traits)
        return tui_project_view
Esempio n. 11
0
    def _cmp_factory(self, window, **traits):
        """ Factory method for the mapper """

        from 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