def buildTopLeftFrame(self): self.topLeftFrame = tk.Frame(self.topWindow) self.packagesListbox = ui.BetterListbox(self.topLeftFrame) self.packagesListbox.displayStringFunction = lambda aPackage: aPackage.name self.packagesListbox.bind("<<ListboxSelect>>", self.packagesSelectionChanged) self.packagesListbox.pack(fill=tk.BOTH, expand=1) self.methodProtocolsListbox = ui.BetterListbox(self.topLeftFrame) self.methodProtocolsListbox.bind("<<ListboxSelect>>", self.methodProtocolsSelectionChanged) self.methodProtocolsListbox.pack(fill=tk.BOTH, expand=1) self.radioButtonFrame = tk.Frame(self.topLeftFrame) tk.Radiobutton( self.radioButtonFrame, text="Instance", #padx = 20, variable=self.side, value='instance').pack(side=tk.LEFT) tk.Radiobutton( self.radioButtonFrame, text="Class", #padx = 20, variable=self.side, value='class').pack(side=tk.LEFT) tk.Checkbutton( self.radioButtonFrame, text="Comment", #padx = 20, variable=self.commentMode).pack(side=tk.LEFT) self.radioButtonFrame.pack(fill=tk.BOTH, expand=1) self.topWindow.add(self.topLeftFrame)
def buildMethodsFrame(self): self.methodsListbox = ui.BetterListbox(self.topWindow) self.methodsListbox.displayStringFunction = lambda aMethod: aMethod.selector self.methodsListbox.displayColorFunction = lambda aMethod: self.displayColorForMethod( aMethod) self.methodsListbox.bind("<<ListboxSelect>>", self.methodsSelectionChanged) self.topWindow.add(self.methodsListbox) self.popupMenu = tk.Menu(self.methodsListbox, tearoff=0) self.addMenuItem(self.popupMenu, "Compare with shadow method", self.onCompareWithShadowMethod) self.methodsListbox.bind("<Button-3>", self.popup) self.bind("<Button-2>", self.popup) #Aqua