예제 #1
0
 def appendRow(self, data):
     r = len(self.__widgets)+1
     c = 0
     dataIdx = 0
     actualRow = []
     
     for columnData in data:
         widget = None
         if r > 1 and c == 0:
             widget = Button(self.__widgetFrame, text=columnData,
                             width=World.smallButtonWidth(),
                             command= lambda: self.__editRow(data))
         else:
             if dataIdx not in self.__invisibleColumns:
                 widget = Label(self.__widgetFrame, text=columnData)
                 
         if widget != None:                
             widget.grid(row=r, column=c, sticky="ns",
                         padx=World.smallPadSize(), pady=World.smallPadSize())
             actualRow.append(widget)
             c += 1
             
         dataIdx += 1
         
     self.__widgets.append(actualRow)
     self.__data.append(data)
예제 #2
0
    def appendRow(self, data):
        r = len(self.__widgets) + 1
        c = 0
        dataIdx = 0
        actualRow = []

        for columnData in data:
            widget = None
            if r > 1 and c == 0:
                widget = Button(self.__widgetFrame,
                                text=columnData,
                                width=World.smallButtonWidth(),
                                command=lambda: self.__editRow(data))
            else:
                if dataIdx not in self.__invisibleColumns:
                    widget = Label(self.__widgetFrame, text=columnData)

            if widget != None:
                widget.grid(row=r,
                            column=c,
                            sticky="ns",
                            padx=World.smallPadSize(),
                            pady=World.smallPadSize())
                actualRow.append(widget)
                c += 1

            dataIdx += 1

        self.__widgets.append(actualRow)
        self.__data.append(data)
예제 #3
0
 def _createControls(self):
     self.__plusButton = Button(self, text='+', 
                                width=World.smallButtonWidth(),
                                command=self.__appendRow)
     self.__plusButton.grid(row=1, column=0,
                            padx=World.smallPadSize(),
                            pady=World.smallPadSize(),
                            sticky="SW")
예제 #4
0
 def _createControls(self):
     self.__plusButton = Button(self,
                                text='+',
                                width=World.smallButtonWidth(),
                                command=self.__appendRow)
     self.__plusButton.grid(row=1,
                            column=0,
                            padx=World.smallPadSize(),
                            pady=World.smallPadSize(),
                            sticky="SW")
예제 #5
0
    def _createWidgets(self):
        
        r = 0
        c = 0
        self._nameLabel = Label(self, text=World.L("NAME"));
        self._nameLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
        
        c += 1
        self._nameEntry = Entry(self, width=World.defaultEntryWidth())
        self._nameEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
        
        r += 1
        c = 0
        self._barcodeLabel = Label(self, text=World.L("BARCODE"));
        self._barcodeLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
        
        c += 1
        self._barcodeEntry = Entry(self, width=World.defaultEntryWidth())
        self._barcodeEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())

        c = 0
        r += 1
        self._isEndProductLabel = Label(self, text=World.L("IS_END/IS_SEMI"))
        self._isEndProductLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
        
        c += 1
        self._isEndProductEntry = Entry(self, width=World.defaultEntryWidth())
        self._isEndProductEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
        
        
        c = 0
        r += 1
        self._contentLabel = Label(self, text=World.L("CONTENTS"))
        self._contentLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
        
        c += 1
        hd = (World.L('ID'), World.L('NAME'), World.L('%'), World.L('REMARK'))
        self._contentTable = MinuxTable(self, columns=4, header=hd, type=self._rawMaterialContentType)
        # self._contentTable.setInvisibleColumns((1,3, 7))
        self._contentTable.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
        
        c = 0
        r += 1
        self._remarkLabel = Label(self, text=World.L("REMARK"))
        self._remarkLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
        
        c += 1
        self._remarkEntry = Text(self, width=World.textEntryWidth(), height=10)
        self._remarkEntry.grid(row=r, column=c, sticky="WE", padx=World.smallPadSize(), pady=World.smallPadSize())
        
        # Append operation buttons
        c = 0
        r += 1
        AbstractFrame._createWidgets(self, r , c, 2)
예제 #6
0
    def _createWidgets(self, r, c, cspan=0):
        buttonFrame = Frame(self)
        buttonFrame.grid(row=r,
                         column=c,
                         columnspan=cspan,
                         sticky=E,
                         padx=World.smallPadSize(),
                         pady=World.smallPadSize())

        self.createButton = Button(buttonFrame,
                                   text=World.L("CREATE"),
                                   state=DISABLED)
        self.createButton.pack(fill=BOTH,
                               expand=1,
                               side=LEFT,
                               padx=World.smallPadSize())

        self.editButton = Button(buttonFrame,
                                 text=World.L("MainWindow.EDIT"),
                                 state=DISABLED)
        self.editButton.pack(fill=BOTH,
                             expand=1,
                             side=LEFT,
                             padx=World.smallPadSize())

        self.saveButton = Button(buttonFrame,
                                 text=World.L("SAVE"),
                                 state=DISABLED)
        self.saveButton.pack(fill=BOTH,
                             expand=1,
                             side=LEFT,
                             padx=World.smallPadSize())

        self.cancelButton = Button(buttonFrame,
                                   text=World.L("CANCEL"),
                                   state=DISABLED)
        self.cancelButton.pack(fill=BOTH,
                               expand=1,
                               side=LEFT,
                               padx=World.smallPadSize())

        self.deleteButton = Button(buttonFrame,
                                   text=World.L("DELETE"),
                                   state=DISABLED)
        self.deleteButton.pack(fill=BOTH,
                               expand=1,
                               side=LEFT,
                               padx=World.smallPadSize())

        self.closeButton = Button(buttonFrame,
                                  text=World.L("CLOSE"),
                                  state=DISABLED)
        self.closeButton.pack(fill=BOTH,
                              expand=1,
                              side=LEFT,
                              padx=World.smallPadSize())
예제 #7
0
 def _createWidgets(self):
     
     r = 0
     c = 0
     self._nameLabel = Label(self, text=World.L("NAME"));
     self._nameLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._nameEntry = Entry(self, width=World.defaultEntryWidth())
     self._nameEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     
     c = 0
     r += 1
     self._groupNrLabel = Label(self, text=World.L("ADDRESS"))
     self._groupNrLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._groupNrEntry = Entry(self, width=World.defaultEntryWidth())
     self._groupNrEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())        
     
     
     c = 0
     r += 1
     self._remarkLabel = Label(self, text=World.L("REMARK"))
     self._remarkLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._remarkEntry = Text(self, width=World.textEntryWidth(), height=10)
     self._remarkEntry.grid(row=r, column=c, sticky="WE", padx=World.smallPadSize(), pady=World.smallPadSize())
     
     # Append operation buttons
     c = 0
     r += 1
     AbstractFrame._createWidgets(self, r , c, 2)
예제 #8
0
    def _createLayout(self):

        self._mainPanedWindow = PanedWindow(orient=HORIZONTAL)
        self._mainPanedWindow.pack(fill=BOTH, expand=1)

        self._leftPanel = Canvas(self._mainPanedWindow, background="pink")
        self._mainPanedWindow.add(self._leftPanel)

        self.noteBookPanel = Notebook(self._mainPanedWindow)
        self._mainPanedWindow.add(self.noteBookPanel)

        buttonFrame = Frame()
        buttonFrame.pack(side=RIGHT,
                         padx=World.smallPadSize(),
                         pady=World.padSize())

        self.exitButton = Button(buttonFrame,
                                 text=World.L("MainWindow.EXIT"),
                                 command=self._onExit)
        self.exitButton.pack(fill=BOTH,
                             expand=1,
                             side=LEFT,
                             padx=World.smallPadSize())
예제 #9
0
 def _createWidgets(self):
     
     r = 0
     c = 0
     self._nameLabel = Label(self, text=World.L("NAME"));
     self._nameLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._nameEntry = Entry(self, width=World.defaultEntryWidth())
     self._nameEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
             
     c = 0
     r += 1
     self._remarkLabel = Label(self, text=World.L("REMARK"))
     self._remarkLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._remarkEntry = Text(self, width=World.textEntryWidth(), height=10)
     self._remarkEntry.grid(row=r, column=c, sticky="WE", padx=World.smallPadSize(), pady=World.smallPadSize())
     
     # Append operation buttons
     c = 0
     r += 1
     AbstractFrame._createWidgets(self, r , c, 2)
예제 #10
0
 def _createWidgets(self):
     
     r = 0
     c = 0
     self._nameLabel = Label(self, text=World.L("NAME"));
     self._nameLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._nameEntry = Entry(self, width=World.defaultEntryWidth())
     self._nameEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c = 0
     r += 1
     self._additiveGroupLabel = Label(self, text=World.L("ADDITIVE_GROUP"))
     self._additiveGroupLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     hd = (World.L('ID'), World.L('NAME'))
     self._additiveGroupTable = ChooserTable(self, columns=3, header=hd, type=self._additiveGroupType)
     self._additiveGroupTable.setInvisibleColumns((1,3,4))
     self._additiveGroupTable.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     
     c = 0
     r += 1
     self._eNumberLabel = Label(self, text=World.L("E_NUMBER"))
     self._eNumberLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._eNumberEntry = Entry(self, width=World.defaultEntryWidth())
     self._eNumberEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())        
     
     
     c = 0
     r += 1
     self._remarkLabel = Label(self, text=World.L("REMARK"))
     self._remarkLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._remarkEntry = Text(self, width=World.textEntryWidth(), height=10)
     self._remarkEntry.grid(row=r, column=c, sticky="WE", padx=World.smallPadSize(), pady=World.smallPadSize())
     
     # Append operation buttons
     c = 0
     r += 1
     AbstractFrame._createWidgets(self, r , c, 2)
예제 #11
0
    def __init__(self,
                 master,
                 title='',
                 message='',
                 abortLabel=World.L("ABORT"),
                 saveLabel=World.L("SAVE"),
                 cancelLabel=World.L("CANCEL")):
        tkinter.Toplevel.__init__(self, master)
        self._master = master
        self['bd'] = World.padSize()

        c = 0
        r = 0

        messageLabel = Label(self, text=message)
        messageLabel.grid(row=r,
                          column=c,
                          columnspan=3,
                          padx=World.padSize(),
                          pady=World.padSize())

        r += 1
        abortButton = Button(self,
                             text=abortLabel,
                             command=lambda: self._answer('ABORT'))
        abortButton.grid(row=r,
                         column=c,
                         padx=World.smallPadSize(),
                         pady=World.smallPadSize())
        c += 1
        saveButton = Button(self,
                            text=saveLabel,
                            command=lambda: self._answer('SAVE'))
        saveButton.grid(row=r,
                        column=c,
                        padx=World.smallPadSize(),
                        pady=World.smallPadSize())

        c += 1
        cancelButton = Button(self,
                              text=cancelLabel,
                              command=lambda: self._answer('CANCEL'))
        cancelButton.grid(row=r,
                          column=c,
                          padx=World.smallPadSize(),
                          pady=World.smallPadSize())

        self.center()
        self.resizable(False, False)
        self.setModal()
예제 #12
0
    def _createWidgets(self, r, c, cspan=0):
        buttonFrame = Frame(self)
        buttonFrame.grid(row=r, column=c, columnspan=cspan, sticky=E,
                         padx=World.smallPadSize(), pady=World.smallPadSize())
        
        self.createButton = Button(buttonFrame, text=World.L("CREATE"), state=DISABLED)
        self.createButton.pack(fill=BOTH, expand=1, side=LEFT,  padx=World.smallPadSize())

        self.editButton = Button(buttonFrame, text=World.L("MainWindow.EDIT"), state=DISABLED)
        self.editButton.pack(fill=BOTH, expand=1, side=LEFT,  padx=World.smallPadSize())
        
        self.saveButton = Button(buttonFrame, text=World.L("SAVE"), state=DISABLED)
        self.saveButton.pack(fill=BOTH, expand=1, side=LEFT, padx=World.smallPadSize())

        self.cancelButton = Button(buttonFrame, text=World.L("CANCEL"), state=DISABLED)
        self.cancelButton.pack(fill=BOTH, expand=1, side=LEFT, padx=World.smallPadSize())

        self.deleteButton = Button(buttonFrame, text=World.L("DELETE"), state=DISABLED)
        self.deleteButton.pack(fill=BOTH, expand=1, side=LEFT, padx=World.smallPadSize())

        self.closeButton = Button(buttonFrame, text=World.L("CLOSE"), state=DISABLED)
        self.closeButton.pack(fill=BOTH, expand=1, side=LEFT, padx=World.smallPadSize())
예제 #13
0
    def __init__(self, master,
                 title='',
                 message='',
                 abortLabel=World.L("ABORT"),
                 saveLabel=World.L("SAVE"),
                 cancelLabel=World.L("CANCEL")):
        tkinter.Toplevel.__init__(self, master)
        self._master = master
        self['bd'] = World.padSize()
             
        c = 0
        r = 0
        
        messageLabel = Label(self, text=message)
        messageLabel.grid(row=r, column=c, columnspan=3, 
                          padx=World.padSize(), pady=World.padSize())

        r += 1
        abortButton = Button(self, text=abortLabel,
                             command= lambda:self._answer('ABORT'))
        abortButton.grid(row=r, column=c,
                         padx=World.smallPadSize(), pady=World.smallPadSize())
        c += 1
        saveButton = Button(self, text=saveLabel,
                            command= lambda:self._answer('SAVE'))
        saveButton.grid(row=r, column=c,
                        padx=World.smallPadSize(), pady=World.smallPadSize())

        c += 1
        cancelButton = Button(self, text=cancelLabel,
                              command= lambda:self._answer('CANCEL'))
        cancelButton.grid(row=r, column=c,
                           padx=World.smallPadSize(), pady=World.smallPadSize())
        
        self.center()
        self.resizable(False, False)
        self.setModal()
예제 #14
0
    def __createWidgets(self):
        c = 0
        r = 0        

        idLabel = Label(self, text=World.L("ID"))
        idLabel.grid(row=r, column=c,
                       padx=World.smallPadSize(), pady=World.smallPadSize())
        c += 1
        self.__idEntry = Label(self)
        self.__idEntry.grid(row=r, column=c,
                            padx=World.smallPadSize(), pady=World.smallPadSize())

        r += 1
        c = 0
        nameLabel = Label(self, text=World.L("NAME"))
        nameLabel.grid(row=r, column=c,
                       padx=World.smallPadSize(), pady=World.smallPadSize())
        c += 1
        self.__nameEntry = Entry(self, width=World.defaultEntryWidth())
        self.__nameEntry.grid(row=r, column=c,
                             padx=World.smallPadSize(), pady=World.smallPadSize())

        r += 1
        c = 0
        addressLabel = Label(self, text=World.L("ADDRESS"))
        addressLabel.grid(row=r, column=c,
                           padx=World.smallPadSize(), pady=World.smallPadSize())
        c += 1
        self.__addressEntry = Text(self, width=World.textEntryWidth(), height=4)
        self.__addressEntry.grid(row=r, column=c,
                                 padx=World.smallPadSize(), pady=World.smallPadSize())


        r += 1
        c = 0
        phoneLabel = Label(self, text=World.L("PHONE"))
        phoneLabel.grid(row=r, column=c,
                        padx=World.smallPadSize(), pady=World.smallPadSize())
        c += 1
        self.__phoneEntry = Text(self, width=World.textEntryWidth(), height=4)
        self.__phoneEntry.grid(row=r, column=c,
                              padx=World.smallPadSize(), pady=World.smallPadSize())



        r += 1
        c = 0
        emailLabel = Label(self, text=World.L("EMAIL"))
        emailLabel.grid(row=r, column=c,
                        padx=World.smallPadSize(), pady=World.smallPadSize())
        c += 1
        self.__emailEntry = Text(self, width=World.textEntryWidth(), height=4)
        self.__emailEntry.grid(row=r, column=c,
                              padx=World.smallPadSize(), pady=World.smallPadSize())

        r += 1
        c = 0
        remarkLabel = Label(self, text=World.L("REMARK"))
        remarkLabel.grid(row=r, column=c,
                         padx=World.smallPadSize(), pady=World.smallPadSize())
        c += 1
        self.__remarkEntry = Text(self, width=World.textEntryWidth(), height=10)
        self.__remarkEntry.grid(row=r, column=c,
                               padx=World.smallPadSize(), pady=World.smallPadSize())


        ### BUTTONS ###
        r += 1
        c = 0
        f = Frame(self)
        readyButton = Button(f, text=World.L('READY'),
                             command=self.__sendDataToMaster)
        readyButton.pack(side=LEFT, padx=World.smallPadSize(), pady=World.smallPadSize())

        cancelButton = Button(f, text=World.L('CANCEL'), command=self.destroy)
        cancelButton.pack(side=LEFT, padx=World.smallPadSize(), pady=World.smallPadSize())
        
        deleteButton = Button(f, text=World.L('DELETE'), command=self.__markForDeletion)
        deleteButton.pack(side=LEFT, padx=World.smallPadSize(), pady=World.smallPadSize())
        
        f.grid(row=r, column=c, columnspan=2, sticky=E,
               padx=World.smallPadSize(), pady=World.smallPadSize())
                
        self.center()
        self.resizable(False, False)
예제 #15
0
    def __createWidgets(self):
        c = 0
        r = 0

        idLabel = Label(self, text=World.L("ID"))
        idLabel.grid(row=r,
                     column=c,
                     padx=World.smallPadSize(),
                     pady=World.smallPadSize())
        c += 1
        self.__idEntry = Label(self)
        self.__idEntry.grid(row=r,
                            column=c,
                            padx=World.smallPadSize(),
                            pady=World.smallPadSize())

        r += 1
        c = 0
        nameLabel = Label(self, text=World.L("NAME"))
        nameLabel.grid(row=r,
                       column=c,
                       padx=World.smallPadSize(),
                       pady=World.smallPadSize())
        c += 1
        self.__nameEntry = Entry(self, width=World.defaultEntryWidth())
        self.__nameEntry.grid(row=r,
                              column=c,
                              padx=World.smallPadSize(),
                              pady=World.smallPadSize())

        r += 1
        c = 0
        addressLabel = Label(self, text=World.L("ADDRESS"))
        addressLabel.grid(row=r,
                          column=c,
                          padx=World.smallPadSize(),
                          pady=World.smallPadSize())
        c += 1
        self.__addressEntry = Text(self,
                                   width=World.textEntryWidth(),
                                   height=4)
        self.__addressEntry.grid(row=r,
                                 column=c,
                                 padx=World.smallPadSize(),
                                 pady=World.smallPadSize())

        r += 1
        c = 0
        phoneLabel = Label(self, text=World.L("PHONE"))
        phoneLabel.grid(row=r,
                        column=c,
                        padx=World.smallPadSize(),
                        pady=World.smallPadSize())
        c += 1
        self.__phoneEntry = Text(self, width=World.textEntryWidth(), height=4)
        self.__phoneEntry.grid(row=r,
                               column=c,
                               padx=World.smallPadSize(),
                               pady=World.smallPadSize())

        r += 1
        c = 0
        emailLabel = Label(self, text=World.L("EMAIL"))
        emailLabel.grid(row=r,
                        column=c,
                        padx=World.smallPadSize(),
                        pady=World.smallPadSize())
        c += 1
        self.__emailEntry = Text(self, width=World.textEntryWidth(), height=4)
        self.__emailEntry.grid(row=r,
                               column=c,
                               padx=World.smallPadSize(),
                               pady=World.smallPadSize())

        r += 1
        c = 0
        remarkLabel = Label(self, text=World.L("REMARK"))
        remarkLabel.grid(row=r,
                         column=c,
                         padx=World.smallPadSize(),
                         pady=World.smallPadSize())
        c += 1
        self.__remarkEntry = Text(self,
                                  width=World.textEntryWidth(),
                                  height=10)
        self.__remarkEntry.grid(row=r,
                                column=c,
                                padx=World.smallPadSize(),
                                pady=World.smallPadSize())

        ### BUTTONS ###
        r += 1
        c = 0
        f = Frame(self)
        readyButton = Button(f,
                             text=World.L('READY'),
                             command=self.__sendDataToMaster)
        readyButton.pack(side=LEFT,
                         padx=World.smallPadSize(),
                         pady=World.smallPadSize())

        cancelButton = Button(f, text=World.L('CANCEL'), command=self.destroy)
        cancelButton.pack(side=LEFT,
                          padx=World.smallPadSize(),
                          pady=World.smallPadSize())

        deleteButton = Button(f,
                              text=World.L('DELETE'),
                              command=self.__markForDeletion)
        deleteButton.pack(side=LEFT,
                          padx=World.smallPadSize(),
                          pady=World.smallPadSize())

        f.grid(row=r,
               column=c,
               columnspan=2,
               sticky=E,
               padx=World.smallPadSize(),
               pady=World.smallPadSize())

        self.center()
        self.resizable(False, False)
예제 #16
0
    def _createWidgets(self):

        r = 0
        c = 0
        self._nameLabel = Label(self, text=World.L("NAME"))
        self._nameLabel.grid(row=r,
                             column=c,
                             sticky=W,
                             padx=World.smallPadSize(),
                             pady=World.smallPadSize())

        c += 1
        self._nameEntry = Entry(self, width=World.defaultEntryWidth())
        self._nameEntry.grid(row=r,
                             column=c,
                             sticky=W,
                             padx=World.smallPadSize(),
                             pady=World.smallPadSize())

        c = 0
        r += 1
        self._isCompositeLabel = Label(self, text=World.L("IS_COMPOSITE"))
        self._isCompositeLabel.grid(row=r,
                                    column=c,
                                    sticky=W,
                                    padx=World.smallPadSize(),
                                    pady=World.smallPadSize())

        c += 1
        self._isCompositeEntry = Entry(self, width=World.defaultEntryWidth())
        self._isCompositeEntry.grid(row=r,
                                    column=c,
                                    sticky=W,
                                    padx=World.smallPadSize(),
                                    pady=World.smallPadSize())

        c = 0
        r += 1
        self._contentLabel = Label(self, text=World.L("CONTENTS"))
        self._contentLabel.grid(row=r,
                                column=c,
                                sticky=W,
                                padx=World.smallPadSize(),
                                pady=World.smallPadSize())

        c += 1
        hd = (World.L('ID'), World.L('NAME'), World.L('%'), World.L('REMARK'))
        self._contentTable = MinuxTable(self,
                                        columns=4,
                                        header=hd,
                                        type=self._rawMaterialContentType)
        # self._contentTable.setInvisibleColumns((1,3, 7))
        self._contentTable.grid(row=r,
                                column=c,
                                sticky=W,
                                padx=World.smallPadSize(),
                                pady=World.smallPadSize())

        c = 0
        r += 1
        self._remarkLabel = Label(self, text=World.L("REMARK"))
        self._remarkLabel.grid(row=r,
                               column=c,
                               sticky=W,
                               padx=World.smallPadSize(),
                               pady=World.smallPadSize())

        c += 1
        self._remarkEntry = Text(self, width=World.textEntryWidth(), height=10)
        self._remarkEntry.grid(row=r,
                               column=c,
                               sticky="WE",
                               padx=World.smallPadSize(),
                               pady=World.smallPadSize())

        # Append operation buttons
        c = 0
        r += 1
        AbstractFrame._createWidgets(self, r, c, 2)
예제 #17
0
 def _createWidgets(self):
     
     r = 0
     c = 0
     self._nameLabel = Label(self, text=World.L("NAME"));
     self._nameLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._nameEntry = Entry(self, width=World.defaultEntryWidth())
     self._nameEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c = 0
     r += 1
     self._regNumberLabel = Label(self, text=World.L("REG_NUMBER"))
     self._regNumberLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._regNumberEntry = Entry(self, width=World.defaultEntryWidth())
     self._regNumberEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
            
     c = 0
     r += 1
     self._bankAccountLabel = Label(self, text=World.L("BANK_ACCOUNT_NUMBER"))
     self._bankAccountLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._bankAccountEntry = Entry(self, width=World.defaultEntryWidth())
     self._bankAccountEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c = 0
     r += 1
     self._headCityLabel = Label(self, text=World.L("LOCATION"))
     self._headCityLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._headCityEntry = Entry(self, width=World.defaultEntryWidth())
     self._headCityEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c = 0
     r += 1
     self._headZipLabel = Label(self, text=World.L("ZIP"))
     self._headZipLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._headZipEntry = Entry(self, width=8)
     self._headZipEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c = 0
     r += 1
     self._headAddressLabel = Label(self, text=World.L("ADDRESS"))
     self._headAddressLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._headAddressEntry = Entry(self, width=World.defaultEntryWidth())
     self._headAddressEntry.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     
     c = 0
     r += 1
     self._contactLabel = Label(self, text=World.L("CONTACTS"))
     self._contactLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     hd = (World.L('ID'), World.L('NAME'), World.L('ADDRESS'),
           World.L('PHONE'), World.L('EMAIL'))
     self._contactTable = MinuxTable(self, columns=6, header=hd, type=self._personType)
     self._contactTable.setInvisibleColumns((1,3, 7))
     self._contactTable.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c = 0
     r += 1
     self._remarkLabel = Label(self, text=World.L("REMARK"))
     self._remarkLabel.grid(row=r, column=c, sticky=W, padx=World.smallPadSize(), pady=World.smallPadSize())
     
     c += 1
     self._remarkEntry = Text(self, width=World.textEntryWidth(), height=10)
     self._remarkEntry.grid(row=r, column=c, sticky="WE", padx=World.smallPadSize(), pady=World.smallPadSize())
     
     # Append operation buttons
     c = 0
     r += 1
     AbstractFrame._createWidgets(self, r , c, 2)
예제 #18
0
    def __init__(self, master):
        tkinter.Toplevel.__init__(self, master)
        World.LOG().info("Login process started.")
        self.protocol("WM_DELETE_WINDOW", master._onExit)
        self['bd'] = World.padSize()
             
        c = 0
        r = 0        
        
        titleLabel = Label(self, text=World.L("LoginDialog.TITLE"))
        titleLabel.grid(row=r, column=c, columnspan=2, 
                        padx=World.padSize(), pady=World.padSize())

        r += 1
        nameLabel = Label(self, text=World.L("USERNAME"))
        nameLabel.grid(row=r, column=c,
                       padx=World.smallPadSize(), pady=World.smallPadSize())
        c += 1
        self._nameEntry = Entry(self)
        self._nameEntry.grid(row=r, column=c,
                             padx=World.smallPadSize(), pady=World.smallPadSize())

        r += 1
        c = 0
        passwordLabel = Label(self, text=World.L("PASSWORD"))
        passwordLabel.grid(row=r, column=c,
                           padx=World.smallPadSize(), pady=World.smallPadSize())
        c += 1
        self._passwordEntry = Entry(self)
        self._passwordEntry.grid(row=r, column=c,
                                 padx=World.smallPadSize(), pady=World.smallPadSize())

        r += 1
        c = 0
        loginButton = Button(self, text=World.L('LOGIN'),
                             command=lambda: master._onSuccessfulLogin(self))
        loginButton.grid(row=r, column=c,
                         padx=World.smallPadSize(), pady=World.smallPadSize())
        c += 1
        exitButton = Button(self, text=World.L('EXIT'), command=master._onExit)
        exitButton.grid(row=r, column=c,
                        padx=World.smallPadSize(), pady=World.smallPadSize())
        
        self.center()
        self.resizable(False, False)
        self.setModal()
예제 #19
0
    def __createWidgets(self):
        c = 0
        r = 0

        idLabel = Label(self, text=World.L("ID"))
        idLabel.grid(row=r,
                     column=c,
                     padx=World.smallPadSize(),
                     pady=World.smallPadSize())
        c += 1
        self.__idEntry = Label(self)
        self.__idEntry.grid(row=r,
                            column=c,
                            padx=World.smallPadSize(),
                            pady=World.smallPadSize())

        r += 1
        c = 0
        nameLabel = Label(self, text=World.L("NAME"))
        nameLabel.grid(row=r,
                       column=c,
                       padx=World.smallPadSize(),
                       pady=World.smallPadSize())
        c += 1
        f = Frame(self)
        scrollBar = Scrollbar(f)
        scrollBar.pack(side=RIGHT, fill=Y)
        self._nameListBox = Listbox(f,
                                    yscrollcommand=scrollBar.set,
                                    selectmode=SINGLE)
        self._nameListBox.pack(fill=BOTH, side=LEFT, expand=1)
        scrollBar.config(command=self._nameListBox.yview)
        f.grid(row=r,
               column=c,
               padx=World.smallPadSize(),
               pady=World.smallPadSize())

        ### BUTTONS ###
        r += 1
        c = 0
        f = Frame(self)
        readyButton = Button(f,
                             text=World.L('READY'),
                             command=self.__sendDataToMaster)
        readyButton.pack(side=LEFT,
                         padx=World.smallPadSize(),
                         pady=World.smallPadSize())

        cancelButton = Button(f, text=World.L('CANCEL'), command=self.destroy)
        cancelButton.pack(side=LEFT,
                          padx=World.smallPadSize(),
                          pady=World.smallPadSize())

        f.grid(row=r,
               column=c,
               columnspan=2,
               sticky=E,
               padx=World.smallPadSize(),
               pady=World.smallPadSize())

        self.center()
        self.resizable(False, False)
예제 #20
0
    def _createWidgets(self):

        r = 0
        c = 0
        self._nameLabel = Label(self, text=World.L("NAME"))
        self._nameLabel.grid(row=r,
                             column=c,
                             sticky=W,
                             padx=World.smallPadSize(),
                             pady=World.smallPadSize())

        c += 1
        self._nameEntry = Entry(self, width=World.defaultEntryWidth())
        self._nameEntry.grid(row=r,
                             column=c,
                             sticky=W,
                             padx=World.smallPadSize(),
                             pady=World.smallPadSize())

        c = 0
        r += 1
        self._regNumberLabel = Label(self, text=World.L("REG_NUMBER"))
        self._regNumberLabel.grid(row=r,
                                  column=c,
                                  sticky=W,
                                  padx=World.smallPadSize(),
                                  pady=World.smallPadSize())

        c += 1
        self._regNumberEntry = Entry(self, width=World.defaultEntryWidth())
        self._regNumberEntry.grid(row=r,
                                  column=c,
                                  sticky=W,
                                  padx=World.smallPadSize(),
                                  pady=World.smallPadSize())

        c = 0
        r += 1
        self._bankAccountLabel = Label(self,
                                       text=World.L("BANK_ACCOUNT_NUMBER"))
        self._bankAccountLabel.grid(row=r,
                                    column=c,
                                    sticky=W,
                                    padx=World.smallPadSize(),
                                    pady=World.smallPadSize())

        c += 1
        self._bankAccountEntry = Entry(self, width=World.defaultEntryWidth())
        self._bankAccountEntry.grid(row=r,
                                    column=c,
                                    sticky=W,
                                    padx=World.smallPadSize(),
                                    pady=World.smallPadSize())

        c = 0
        r += 1
        self._headCityLabel = Label(self, text=World.L("LOCATION"))
        self._headCityLabel.grid(row=r,
                                 column=c,
                                 sticky=W,
                                 padx=World.smallPadSize(),
                                 pady=World.smallPadSize())

        c += 1
        self._headCityEntry = Entry(self, width=World.defaultEntryWidth())
        self._headCityEntry.grid(row=r,
                                 column=c,
                                 sticky=W,
                                 padx=World.smallPadSize(),
                                 pady=World.smallPadSize())

        c = 0
        r += 1
        self._headZipLabel = Label(self, text=World.L("ZIP"))
        self._headZipLabel.grid(row=r,
                                column=c,
                                sticky=W,
                                padx=World.smallPadSize(),
                                pady=World.smallPadSize())

        c += 1
        self._headZipEntry = Entry(self, width=8)
        self._headZipEntry.grid(row=r,
                                column=c,
                                sticky=W,
                                padx=World.smallPadSize(),
                                pady=World.smallPadSize())

        c = 0
        r += 1
        self._headAddressLabel = Label(self, text=World.L("ADDRESS"))
        self._headAddressLabel.grid(row=r,
                                    column=c,
                                    sticky=W,
                                    padx=World.smallPadSize(),
                                    pady=World.smallPadSize())

        c += 1
        self._headAddressEntry = Entry(self, width=World.defaultEntryWidth())
        self._headAddressEntry.grid(row=r,
                                    column=c,
                                    sticky=W,
                                    padx=World.smallPadSize(),
                                    pady=World.smallPadSize())

        c = 0
        r += 1
        self._contactLabel = Label(self, text=World.L("CONTACTS"))
        self._contactLabel.grid(row=r,
                                column=c,
                                sticky=W,
                                padx=World.smallPadSize(),
                                pady=World.smallPadSize())

        c += 1
        hd = (World.L('ID'), World.L('NAME'), World.L('ADDRESS'),
              World.L('PHONE'), World.L('EMAIL'))
        self._contactTable = MinuxTable(self,
                                        columns=6,
                                        header=hd,
                                        type=self._personType)
        self._contactTable.setInvisibleColumns((1, 3, 7))
        self._contactTable.grid(row=r,
                                column=c,
                                sticky=W,
                                padx=World.smallPadSize(),
                                pady=World.smallPadSize())

        c = 0
        r += 1
        self._remarkLabel = Label(self, text=World.L("REMARK"))
        self._remarkLabel.grid(row=r,
                               column=c,
                               sticky=W,
                               padx=World.smallPadSize(),
                               pady=World.smallPadSize())

        c += 1
        self._remarkEntry = Text(self, width=World.textEntryWidth(), height=10)
        self._remarkEntry.grid(row=r,
                               column=c,
                               sticky="WE",
                               padx=World.smallPadSize(),
                               pady=World.smallPadSize())

        # Append operation buttons
        c = 0
        r += 1
        AbstractFrame._createWidgets(self, r, c, 2)