コード例 #1
0
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     InspectorPage.__init__(self, *args, **kwargs)
     # path text.
     path_label = wx.StaticText(self, -1, 'Path')
     path_text = wx.TextCtrl(self, -1, style=wx.TE_READONLY)
     # attributes grid.
     attr_label = wx.StaticText(self, -1, 'Attributes')
     attr_grid = Grid(self, -1, size=(-1, 100))
     attr_grid.CreateGrid(0, 2)
     attr_grid.SetColLabelValue(0, 'Key')
     attr_grid.SetColLabelValue(1, 'Value')
     attr_grid.EnableEditing(False)
     # values (for datasets) grid.
     vals_label = wx.StaticText(self, -1, 'Values')
     vals_grid = Grid(self, -1)
     vals_grid.CreateGrid(0, 0)
     vals_grid.EnableEditing(False)
     self.sizer.Add(path_label, 0, wx.ALL | wx.EXPAND, 5)
     self.sizer.Add(path_text, 0, wx.ALL | wx.EXPAND, 5)
     self.sizer.Add(attr_label, 0, wx.ALL | wx.EXPAND, 5)
     self.sizer.Add(attr_grid, 0, wx.ALL | wx.EXPAND, 5)
     self.sizer.Add(vals_label, 0, wx.ALL | wx.EXPAND, 5)
     self.sizer.Add(vals_grid, 1, wx.ALL | wx.EXPAND, 5)
     self.path_text = path_text
     self.attr_grid = attr_grid
     self.vals_grid = vals_grid
コード例 #2
0
    def __init__(self, *args, **kwargs):
        """Initializer.
        """
        InspectorPage.__init__(self, *args, **kwargs)

        widgets = []

        self.max_num_entry = wx.TextCtrl(
            self, wx.ID_ANY, "10000", style=wx.TE_PROCESS_ENTER)
        self.max_num_entry.Bind(wx.EVT_TEXT_ENTER, self.max_num_entry_updated)
        widgets.extend([
            (wx.StaticText(self, -1, 'Max #'), 0, wx.ALL | wx.EXPAND),
            (self.max_num_entry, 1, wx.ALL | wx.EXPAND)])

        element_array = []
        self.listbox = wx.CheckListBox(
            self, wx.ID_ANY, choices=element_array,
            style=wx.LB_MULTIPLE | wx.LB_HSCROLL | wx.LB_NEEDED_SB | wx.LB_SORT)
        self.listbox.Bind(wx.EVT_CHECKLISTBOX, self.listbox_select)
        widgets.extend([
            (wx.StaticText(self, -1, 'Species'), 0, wx.ALL | wx.EXPAND),
            (self.listbox, 1, wx.ALL | wx.EXPAND)])

        # pack in FlexGridSizer.
        fx_sizer = wx.FlexGridSizer(cols=2, vgap=9, hgap=25)
        fx_sizer.AddMany(widgets)
        fx_sizer.AddGrowableCol(1)
        self.sizer.Add(fx_sizer, 1, wx.EXPAND | wx.ALL, 10)
コード例 #3
0
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     InspectorPage.__init__(self, *args, **kwargs)
     # path text.
     path_label = wx.StaticText(self, -1, 'Path')
     path_text = wx.TextCtrl(self, -1, style=wx.TE_READONLY)
     # attributes grid.
     attr_label = wx.StaticText(self, -1, 'Attributes')
     attr_grid = Grid(self, -1, size=(-1, 100))
     attr_grid.CreateGrid(0, 2)
     attr_grid.SetColLabelValue(0, 'Key')
     attr_grid.SetColLabelValue(1, 'Value')
     attr_grid.EnableEditing(False)
     # values (for datasets) grid.
     vals_label = wx.StaticText(self, -1, 'Values')
     vals_grid = Grid(self, -1)
     vals_grid.CreateGrid(0, 0)
     vals_grid.EnableEditing(False)
     self.sizer.Add(path_label, 0, wx.ALL|wx.EXPAND, 5)
     self.sizer.Add(path_text, 0, wx.ALL|wx.EXPAND, 5)
     self.sizer.Add(attr_label, 0, wx.ALL|wx.EXPAND, 5)
     self.sizer.Add(attr_grid, 0, wx.ALL|wx.EXPAND, 5)
     self.sizer.Add(vals_label, 0, wx.ALL|wx.EXPAND, 5)
     self.sizer.Add(vals_grid, 1, wx.ALL|wx.EXPAND, 5)
     self.path_text = path_text
     self.attr_grid = attr_grid
     self.vals_grid = vals_grid
コード例 #4
0
    def __init__(self, *args, **kwargs):
        """Initializer.
        """
        InspectorPage.__init__(self, *args, **kwargs)

        widgets = []

        self.max_num_entry = wx.TextCtrl(self,
                                         wx.ID_ANY,
                                         "10000",
                                         style=wx.TE_PROCESS_ENTER)
        self.max_num_entry.Bind(wx.EVT_TEXT_ENTER, self.max_num_entry_updated)
        widgets.extend([(wx.StaticText(self, -1,
                                       'Max #'), 0, wx.ALL | wx.EXPAND),
                        (self.max_num_entry, 1, wx.ALL | wx.EXPAND)])

        element_array = []
        self.listbox = wx.CheckListBox(self,
                                       wx.ID_ANY,
                                       choices=element_array,
                                       style=wx.LB_MULTIPLE | wx.LB_HSCROLL
                                       | wx.LB_NEEDED_SB | wx.LB_SORT)
        self.listbox.Bind(wx.EVT_CHECKLISTBOX, self.listbox_select)
        widgets.extend([(wx.StaticText(self, -1,
                                       'Species'), 0, wx.ALL | wx.EXPAND),
                        (self.listbox, 1, wx.ALL | wx.EXPAND)])

        # pack in FlexGridSizer.
        fx_sizer = wx.FlexGridSizer(cols=2, vgap=9, hgap=25)
        fx_sizer.AddMany(widgets)
        fx_sizer.AddGrowableCol(1)
        self.sizer.Add(fx_sizer, 1, wx.EXPAND | wx.ALL, 10)
コード例 #5
0
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     InspectorPage.__init__(self, *args, **kwargs)
     n_data_label = wx.StaticText(self, -1, 'Number of data')
     n_data = wx.TextCtrl(self,
                          -1,
                          "%s" % self.target.n_data,
                          style=wx.TE_READONLY)
     cursor_label = wx.StaticText(self, -1, 'Current Index')
     cursor_spin = wx.SpinCtrl(self,
                               -1,
                               min=0,
                               max=self.target.n_data,
                               initial=self.target.index_cursor)
     self.Bind(wx.EVT_SPINCTRL, self.OnCursorSpin)
     data_label = wx.StaticText(self, -1, 'Selected data')
     data_text = wx.TextCtrl(self,
                             -1,
                             "%s" % self.target.selected_data,
                             style=wx.TE_READONLY)
     self.sizer.Add(n_data_label, 0, wx.ALL | wx.EXPAND, 5)
     self.sizer.Add(n_data, 0, wx.ALL | wx.EXPAND, 5)
     self.sizer.Add(cursor_label, 0, wx.ALL | wx.EXPAND, 5)
     self.sizer.Add(cursor_spin, 0, wx.ALL | wx.EXPAND, 5)
     self.sizer.Add(data_label, 0, wx.ALL | wx.EXPAND, 5)
     self.sizer.Add(data_text, 0, wx.ALL | wx.EXPAND, 5)
     self.n_data = n_data
     self.cursor_spin = cursor_spin
     self.data_text = data_text
コード例 #6
0
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     InspectorPage.__init__(self, *args, **kwargs)
     glob_pattern_label = wx.StaticText(self, -1, 'Glob pattern')
     glob_pattern = wx.TextCtrl(self, -1, "%s" % self.target.glob_pattern)
     self.Bind(wx.EVT_TEXT, self.OnGlobPatternText, glob_pattern)
     self.sizer.Add(glob_pattern_label, 0, wx.ALL | wx.EXPAND, 5)
     self.sizer.Add(glob_pattern, 0, wx.ALL | wx.EXPAND, 5)
     self.glob_pattern = glob_pattern
コード例 #7
0
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     InspectorPage.__init__(self, *args, **kwargs)
     glob_pattern_label = wx.StaticText(self, -1, 'Glob pattern')
     glob_pattern = wx.TextCtrl(self, -1, "%s" %self.target.glob_pattern)
     self.Bind(wx.EVT_TEXT, self.OnGlobPatternText, glob_pattern)
     self.sizer.Add(glob_pattern_label, 0, wx.ALL|wx.EXPAND, 5)
     self.sizer.Add(glob_pattern, 0, wx.ALL|wx.EXPAND, 5)
     self.glob_pattern = glob_pattern
コード例 #8
0
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     InspectorPage.__init__(self, *args, **kwargs)
     label = wx.StaticText(self, -1, 'URI')
     text = wx.TextCtrl(self, -1, '', style=wx.TE_READONLY)
     self.uri_text = text
     h_sizer = wx.BoxSizer(wx.HORIZONTAL)
     h_sizer.Add(label, 0, wx.EXPAND | wx.ALL, 0)
     h_sizer.Add(text, 1, wx.EXPAND | wx.ALL, 0)
     # self.sizer comes from parent.
     self.sizer.Add(h_sizer, 0, wx.EXPAND | wx.ALL, 10)
コード例 #9
0
ファイル: page.py プロジェクト: ecell/ecell4-vis
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     InspectorPage.__init__(self, *args, **kwargs)
     label = wx.StaticText(self, -1, 'URI')
     text = wx.TextCtrl(self, -1, '', style=wx.TE_READONLY)
     self.uri_text = text
     h_sizer = wx.BoxSizer(wx.HORIZONTAL)
     h_sizer.Add(label, 0, wx.EXPAND|wx.ALL, 0)
     h_sizer.Add(text, 1, wx.EXPAND|wx.ALL, 0)
     # self.sizer comes from parent.
     self.sizer.Add(h_sizer, 0, wx.EXPAND|wx.ALL, 10)
コード例 #10
0
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     InspectorPage.__init__(self, *args, **kwargs)
     widgets = []
     # create inspector fields for common h5py.File attributes.
     for prop_name in self.PROP_NAMES:
         label = wx.StaticText(self, -1, prop_name.capitalize())
         text_ctrl = wx.TextCtrl(self, -1, '', style=wx.TE_READONLY)
         setattr(self, prop_name, text_ctrl)
         widgets.extend([(label, 0, wx.ALL | wx.EXPAND),
                         (text_ctrl, 1, wx.ALL | wx.EXPAND)])
     # pack in FlexGridSizer.
     fx_sizer = wx.FlexGridSizer(cols=2, vgap=5, hgap=5)
     fx_sizer.AddMany(widgets)
     fx_sizer.AddGrowableCol(1)
     self.sizer.Add(fx_sizer, 1, wx.EXPAND | wx.ALL, 10)
コード例 #11
0
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     InspectorPage.__init__(self, *args, **kwargs)
     widgets = []
     # create inspector fields for common h5py.File attributes.
     for prop_name in self.PROP_NAMES:
         label = wx.StaticText(self, -1, prop_name.capitalize())
         text_ctrl = wx.TextCtrl(self, -1, '', style=wx.TE_READONLY)
         setattr(self, prop_name, text_ctrl)
         widgets.extend([
             (label, 0, wx.ALL|wx.EXPAND),
             (text_ctrl, 1, wx.ALL|wx.EXPAND)])
     # pack in FlexGridSizer.
     fx_sizer = wx.FlexGridSizer(cols=2, vgap=5, hgap=5)
     fx_sizer.AddMany(widgets)
     fx_sizer.AddGrowableCol(1)
     self.sizer.Add(fx_sizer, 1, wx.EXPAND|wx.ALL, 10)
コード例 #12
0
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     InspectorPage.__init__(self, *args, **kwargs)
     n_data_label = wx.StaticText(self, -1, 'Number of data')
     n_data = wx.TextCtrl(self, -1, "%s" %self.target.n_data, style=wx.TE_READONLY)
     cursor_label = wx.StaticText(self, -1, 'Current Index')
     cursor_spin = wx.SpinCtrl(self, -1, min=0, max=self.target.n_data, initial=self.target.index_cursor)
     self.Bind(wx.EVT_SPINCTRL, self.OnCursorSpin)
     data_label = wx.StaticText(self, -1, 'Selected data')
     data_text = wx.TextCtrl(self, -1, "%s" %self.target.selected_data, style=wx.TE_READONLY)
     self.sizer.Add(n_data_label, 0, wx.ALL|wx.EXPAND, 5)
     self.sizer.Add(n_data, 0, wx.ALL|wx.EXPAND, 5)
     self.sizer.Add(cursor_label, 0, wx.ALL|wx.EXPAND, 5)
     self.sizer.Add(cursor_spin, 0, wx.ALL|wx.EXPAND, 5)
     self.sizer.Add(data_label, 0, wx.ALL|wx.EXPAND, 5)
     self.sizer.Add(data_text, 0, wx.ALL|wx.EXPAND, 5)
     self.n_data = n_data
     self.cursor_spin = cursor_spin
     self.data_text = data_text
コード例 #13
0
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     InspectorPage.__init__(self, *args, **kwargs)
     self.init_ui()
コード例 #14
0
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     InspectorPage.__init__(self, *args, **kwargs)
     self.init_ui()