Esempio n. 1
0
    def fill_upload_pdb_Frame(self):
        """Fill Frame with neccessary widgets"""
        # -Create Widgets-
        if platform.system() == 'Darwin':
            self.upload_pdb_upload_Button = tk.Button(
                self.upload_pdb_Frame,
                text='Select Structure File',
                command=self.open_pdb_filedialog,
                highlightbackground='#FFF')
        else:
            self.upload_pdb_upload_Button = ctk.Button(
                self.upload_pdb_Frame,
                text='Select Structure File',
                command=self.open_pdb_filedialog,
                style='Path.TButton',
            )

        self.upload_pdb_path_Label = ctk.Label(
            self.upload_pdb_Frame,
            textvariable=self.pdbFilePath_var,
            style='Path.TLabel',
            font=9)
        # Bind geometry change of this widget to updating the wraplength
        self.upload_pdb_path_Label.bind('<Configure>', self.update_wraplengths)

        # -Place Widgets-
        self.upload_pdb_upload_Button.place(**self.UPLOAD_BUTTON)
        self.upload_pdb_path_Label.place(**self.UPLOAD_LABEL)
Esempio n. 2
0
 def fill_upload_chr_Frame(self):
     """Fill Frame with neccessary widgets"""
     # -Create Widgets-
     if platform.system() == 'Darwin':
         self.upload_chr_upload_Button = tk.Button(
             self.upload_chr_Frame,
             text='Select Chrome Driver',
             command=self.open_chr_filedialog,
             highlightbackground='#FFF')
     else:
         self.upload_chr_upload_Button = ctk.Button(
             self.upload_chr_Frame,
             text='Select Chrome Driver',
             command=self.open_chr_filedialog,
             style='Path.TButton',
         )
     self.upload_chr_path_Label = ctk.Label(
         self.upload_chr_Frame,
         textvariable=self.chrFilePath_var,
         style='Path.TLabel',
         font=9)
     # -Place Widgets-
     self.upload_chr_upload_Button.place(**self.UPLOAD_BUTTON)
     self.upload_chr_path_Label.place(**self.UPLOAD_LABEL)
Esempio n. 3
0
 def create_widgets(self):
     """Create window widgets"""
     # -Frames-
     self.options_Frame = tk.Frame(self)
     self.fill_options_Frame()
     self.upload_Frame = tk.Frame(self)
     self.fill_upload_Frame()
     self.protein_Frame = tk.Frame(self)
     self.fill_protein_Frame()
     # -Logo-
     self.logo_Label = tk.Label(self,
                                compound='center',
                                background=self.PRI_BG_COLOR,
                                image=self.logo_img,
                                anchor=tk.CENTER)
     self.logo_Label.image = self.logo_img
     # -Buttons-
     if platform.system() == 'Darwin':
         self.run_Button = tk.Button(self,
                                     text='Select Directory & Run',
                                     font=17,
                                     highlightbackground=self.PRI_BG_COLOR,
                                     command=self.run)
         self.analysis_Button = tk.Button(
             self,
             text='Network Analysis',
             font=13,
             highlightbackground=self.PRI_BG_COLOR,
             command=self.network_analysis)
         self.plot_Button = tk.Button(self,
                                      text='Plot Network',
                                      font=13,
                                      highlightbackground=self.PRI_BG_COLOR,
                                      command=self.plot_network)
     else:
         self.run_Button = ctk.Button(self,
                                      text='Select Directory & Run',
                                      font=17,
                                      command=self.run)
         self.analysis_Button = ctk.Button(self,
                                           text='Network Analysis',
                                           font=13,
                                           command=self.network_analysis)
         self.plot_Button = ctk.Button(self,
                                       text='Plot Network',
                                       font=13,
                                       command=self.plot_network)
     OptionList = [
         '', 'circular', 'kamada_kawai', 'random', 'spectral', 'spring',
         'shell'
     ]
     if platform.system() == 'Darwin':
         self.plot_options = tk.OptionMenu(self, self.layout_type,
                                           *OptionList)
         self.plot_options.configure(
             background=self.PRI_BG_COLOR,
             highlightbackground=self.PRI_BG_COLOR,
             highlightcolor=self.PRI_BG_COLOR,
         )
         self.update_idletasks()
         self.update()
     else:
         self.plot_options = ttk.OptionMenu(self, self.layout_type,
                                            *OptionList)