Example #1
0
    def edit_view(self):
        # v = self.traits_view()
        v = View(
            Group(
                Item('reference_detector', editor=EnumEditor(name='detectors')),
                Item('integration_time', label='Integration (s)'),
                label='Magnet Scan',
                show_border=True))

        v.title = self.title
        v.buttons = ['OK', 'Cancel']
        return v
Example #2
0
    def edit_view(self):
        # v = self.traits_view()
        v = View(
            Group(Item('reference_detector',
                       editor=EnumEditor(name='detectors')),
                  Item('integration_time', label='Integration (s)'),
                  label='Magnet Scan',
                  show_border=True))

        v.title = self.title
        v.buttons = ['OK', 'Cancel']
        return v
Example #3
0
    def edit_view(self):
        # v = self.traits_view()
        v = View(
            Group(
                Item("reference_detector", editor=EnumEditor(name="detectors")),
                Item("integration_time", label="Integration (s)"),
                label="Magnet Scan",
                show_border=True,
            )
        )

        v.title = self.title
        v.buttons = ["OK", "Cancel"]
        return v
Example #4
0
    def _view_factory(self):
        editor = myTabularEditor(adapter=self.tabular_adapter(),
                               dclicked='object.dclicked',
                               selected='object.selected',
                               selected_row='object.selected_row',
                               update='update',
#                               auto_update=True,
                               column_clicked='object.column_clicked',
                               editable=False,
                               multi_select=not self.style == 'single',

                               )

        button_grp = self._get_button_grp()
        qgrp = Item('queries', show_label=False,
                    style='custom',
                    height=0.25,
                    editor=ListEditor(mutable=False,
                                      style='custom',
                                      editor=InstanceEditor()),
                     defined_when='style in ["normal","panel"]')
        v = View(
#                 HGroup(Item('multi_select_graph',
#                             defined_when='multi_graphable'
#                             ),
#                             spring, Item('limit')),
                VGroup(
                       CustomLabel('dbstring', color='red'),
                       Item('records',
                          style='custom',
                          editor=editor,
                          show_label=False,
                          height=0.75,
                          width=600,
                          ),

                          qgrp,
                          button_grp,
                    ),
                 resizable=True,
                 handler=SelectorHandler
                 )

        if self.style == 'single':
            v.buttons = ['OK', 'Cancel']
        return v
Example #5
0
    def _view_factory(self):
        editor = myTabularEditor(
            adapter=self.tabular_adapter,
            dclicked="object.dclicked",
            selected="object.selected",
            selected_row="object.selected_row",
            update="update",
            scroll_to_row="scroll_to_row",
            #                               auto_update=True,
            column_clicked="object.column_clicked",
            editable=False,
            multi_select=not self.style == "single",
        )

        button_grp = self._get_button_grp()
        v = View(
            VGroup(
                CustomLabel("id_string", color="red"),
                VSplit(
                    Item(
                        "records",
                        style="custom",
                        editor=editor,
                        show_label=False,
                        height=0.75,
                        # width=600,
                    ),
                    Item(
                        "queries",
                        show_label=False,
                        style="custom",
                        height=0.25,
                        editor=ListEditor(mutable=False, style="custom", editor=InstanceEditor()),
                        defined_when='style in ["normal","panel"]',
                    ),
                ),
                button_grp,
            ),
            resizable=True,
            handler=SelectorHandler,
        )

        if self.style == "single":
            v.buttons = ["OK", "Cancel"]
        return v
Example #6
0
    def _view_factory(self):
        editor = myTabularEditor(
            adapter=self.tabular_adapter(),
            dclicked='object.dclicked',
            selected='object.selected',
            selected_row='object.selected_row',
            update='update',
            scroll_to_row='scroll_to_row',
            #                               auto_update=True,
            column_clicked='object.column_clicked',
            editable=False,
            multi_select=not self.style == 'single',
        )

        button_grp = self._get_button_grp()
        v = View(VGroup(
            CustomLabel('id_string', color='red'),
            VSplit(
                Item(
                    'records',
                    style='custom',
                    editor=editor,
                    show_label=False,
                    height=0.75,
                    width=600,
                ),
                Item('queries',
                     show_label=False,
                     style='custom',
                     height=0.25,
                     editor=ListEditor(mutable=False,
                                       style='custom',
                                       editor=InstanceEditor()),
                     defined_when='style in ["normal","panel"]')),
            button_grp,
        ),
                 resizable=True,
                 handler=SelectorHandler)

        if self.style == 'single':
            v.buttons = ['OK', 'Cancel']
        return v
Example #7
0
    def _view_factory(self):
        editor = myTabularEditor(adapter=self.tabular_adapter,
                                 dclicked='object.dclicked',
                                 selected='object.selected',
                                 selected_row='object.selected_row',
                                 update='update',
                                 scroll_to_row='scroll_to_row',
                                 #                               auto_update=True,
                                 column_clicked='object.column_clicked',
                                 editable=False,
                                 multi_select=not self.style == 'single')

        button_grp = self._get_button_grp()
        v = View(
            VGroup(
                CustomLabel('id_string', color='red'),
                VSplit(
                    Item('records',
                         style='custom',
                         editor=editor,
                         show_label=False,
                         height=0.75,
                         # width=600,
                    )),
                #     Item('queries', show_label=False,
                #          style='custom',
                #          height=0.25,
                #          editor=ListEditor(mutable=False,
                #                            style='custom',
                #                            editor=InstanceEditor()),
                #          defined_when='style in ["normal","panel"]')),
                # button_grp
            ),
            buttons=['OK','Cancel'],
            resizable=True,
            handler=SelectorHandler)

        if self.style == 'single':
            v.buttons = ['OK', 'Cancel']
        return v