当前位置: 首页>>代码示例>>Python>>正文


Python Avn.curry方法代码示例

本文整理汇总了Python中Avn.curry方法的典型用法代码示例。如果您正苦于以下问题:Python Avn.curry方法的具体用法?Python Avn.curry怎么用?Python Avn.curry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Avn的用法示例。


在下文中一共展示了Avn.curry方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __createMenuBar

# 需要导入模块: import Avn [as 别名]
# 或者: from Avn import curry [as 别名]
    def __createMenuBar(self):
        self.menubar = Pmw.MenuBar(self.interior(),
            hull_relief='raised',
            hull_borderwidth=1,
            )
        self.menubar.pack(side='top', fill='x')

        self.menubar.addmenu('Help', 'Help actions', side='right')
        self.menubar.addmenuitem('Help', 'command',
            label='Key bindings',
            command=Avn.curry(self.showHelp, EditorTools.Help),
            )
        self.menubar.addmenuitem('Help', 'command',
            label='Usage',
            command=Avn.curry(self.showHelp, HelpEdit),
            )
        self.menubar.addmenu('File', 'Main actions', side='left')
        self.menubar.addmenuitem('File', 'command',
            'Invoke print dialog',
            label = 'Print',
            command=self.showPrintDialog,
            )
        self.menubar.addmenuitem('File', 'separator')
        self.menubar.addmenuitem('File', 'command',
            label = 'Close',
            command=self.close,
            )

        self.menubar.addmenu('Edit', 'Editing actions', side='left')
        self.menubar.addmenuitem('Edit', 'command',
            label = 'Cut',
            command=self.__cut,
            )
        self.menubar.addmenuitem('Edit', 'command',
            label = 'Copy',
            command=self.__copy,
            )
        self.menubar.addmenuitem('Edit', 'command',
            label = 'Paste',
            command=self.__paste,
            )
        self.menubar.addmenuitem('Edit', 'command',
            label = 'Find',
            command=self.__find,
            )
        self.menubar.addmenuitem('Edit', 'command',
            label = 'Undo',
            command=self.__undo,
            )
        self.menubar.addmenuitem('Edit', 'command',
            label = 'Redo',
            command=self.__redo,
            )
开发者ID:KeithLatteri,项目名称:awips2,代码行数:55,代码来源:EditDialog.py

示例2: __init__

# 需要导入模块: import Avn [as 别名]
# 或者: from Avn import curry [as 别名]
    def __init__(self, **kw):
        self.root = Tk()
        self.root.withdraw()
        self.get_option_db()
        Pmw.initialise(self.root, useTkOptionDb=1)
        self.root.title(self.AppName)
        Pmw.MegaWidget.__init__(self, parent=self.root)
        self.root.resizable(0, 0)
        ErrorRedirect.fixlogging(_Logger, self.interior())

        interior = self.interior()
        Busy.instantiate(interior)

        self._img1 = PhotoImage(file=Image1)
        self.slist = Pmw.ScrolledListBox(interior,
            labelpos='n',
            label_image=self._img1,
            listbox_exportselection=0,
            )
        self.slist.pack(side='top', expand='yes', fill='x')
        f = Frame(interior)
        self._img2 = PhotoImage(file=Image2)
        cfg = AvnParser.getGuiCfg()
        self.servers = Pmw.ScrolledListBox(f,
            labelpos='n',
            label_image=self._img2,
            items=cfg['ns'],
            listbox_height=max(4, len(cfg['ns'])),
            listbox_exportselection=0,
            )
        self.servers.pack(side='left', expand='yes', fill='x')
        self.servers.selection_set(0)

        self.bbox = Pmw.ButtonBox(f,
            orient='vertical',
            labelpos='w',
            frame_borderwidth=2,
            frame_relief='groove',
        )
        self.bbox.pack(side='left', expand='yes', fill='x')
        self.bbox.add('TAFs', command=Avn.curry(self.ok, 'TAFs'))
        self.bbox.add('Climate', command=Avn.curry(self.ok, 'Climate'))
        self.bbox.add('Cancel', command=self.cancel)
        self.bbox.setdefault('TAFs')
        self.bbox.alignbuttons()
        f.pack(side='top')

        self.loadForecasters()
        self.prods = 0
        self.pid = 0
        signal.signal(signal.SIGUSR1, self.handler)
        signal.signal(signal.SIGCHLD, self.handler)
开发者ID:KeithLatteri,项目名称:awips2,代码行数:54,代码来源:AvnMenu.py

示例3: method

# 需要导入模块: import Avn [as 别名]
# 或者: from Avn import curry [as 别名]
 def method(self, taf, grids):
     self.setmsg('%s occured in grids but not forecasted',
         ' or '.join(self.args['wx']))
     if 'wx' not in grids or 'pstr' not in grids['wx']:
         return 0
     wx = grids['wx']['pstr']    # only prevailing conditions
     if not Avn.any(self.args['wx'], Avn.curry(_WX, wx)):
         return 0
     if 'wx' not in taf:
         return 1
     if 'pstr' in taf:
         wx = taf['wx']['pstr']
         if Avn.any(self.args['wx'], Avn.curry(_WX, wx)):
             return 0
     if 'ostr' not in taf['wx']:
         return 1
     wx = taf['wx']['ostr']
     return not Avn.any(self.args['wx'], Avn.curry(_WX, wx))
开发者ID:KeithLatteri,项目名称:awips2,代码行数:20,代码来源:GridMonitor.py

示例4: add_month_range_counter

# 需要导入模块: import Avn [as 别名]
# 或者: from Avn import curry [as 别名]
 def add_month_range_counter(self, master):
     w = Pmw.Counter(master,
         labelpos='w',
         label_text='Num Months:',
         entry_width=2,
         entryfield_value=1,
         entryfield_modifiedcommand=self.update,
         )
     w.configure(entryfield_validate=Avn.curry(_int_validator, w, 1, 13))
     return w
开发者ID:KeithLatteri,项目名称:awips2,代码行数:12,代码来源:CigVisDist.py

示例5: add_hour_counter

# 需要导入模块: import Avn [as 别名]
# 或者: from Avn import curry [as 别名]
 def add_hour_counter(self, master):
     w = Pmw.Counter(master,
         labelpos='w',
         label_text='Hour:',
         entry_width=2,
         entryfield_value=time.gmtime().tm_hour,
         entryfield_modifiedcommand=self.update,
         )
     w.configure(entryfield_validate=Avn.curry(_int_validator, w, 0, 24))
     return w
开发者ID:KeithLatteri,项目名称:awips2,代码行数:12,代码来源:CigVisDist.py

示例6: __createCmdBtnBox

# 需要导入模块: import Avn [as 别名]
# 或者: from Avn import curry [as 别名]
 def __createCmdBtnBox(self):
     cmdbtnbox = Pmw.ButtonBox(self.interior(),
         hull_relief='groove',
         hull_bd=2,
         )
     btn = cmdbtnbox.add('Close', command=self.close)
     Balloon().bind(btn, 'Closes this dialog')
     btn = cmdbtnbox.add('Refresh', command=self.__refresh)
     Balloon().bind(btn, 'Refresh display')
     btn = cmdbtnbox.add('View', command=self.__viewFiles)
     Balloon().bind(btn, 'View selected forecasts')
     btn = cmdbtnbox.add('Remove', command=self.__deleteFiles)
     Balloon().bind(btn, 'Delete selected forecasts')
     btn = cmdbtnbox.add('Retransmit', command=self.__send)
     Balloon().bind(btn, 'Resend selected forecasts')
     btn = cmdbtnbox.add('Help',
         command=Avn.curry(self.showHelp, _Help),
         )
     Balloon().bind(btn, 'Show help')
     cmdbtnbox.alignbuttons()
     cmdbtnbox.pack(side='top', expand='no', fill='x')
开发者ID:KeithLatteri,项目名称:awips2,代码行数:23,代码来源:QueueViewer.py

示例7: __init__

# 需要导入模块: import Avn [as 别名]
# 或者: from Avn import curry [as 别名]
    def __init__(self, parent, **kw):
        AvnDialog.Dialog.__init__(self, parent, **kw)

        # from AvnDialog
        self.createMessageBar(self.interior(), True)

        frame = Frame(self.interior())
        self.products = Pmw.ComboBox(frame,
            label_text='Products',
            labelpos='n',
            dropdown=0,
            scrolledlist_vscrollmode='static',
            listbox_width=16,
            entryfield_entry_width=16,
            listbox_exportselection=0,
            selectioncommand=self.listIdents,
            )
        self.products.grid(row=0, column=0, sticky='news')
        btn = Button(frame, text='Delete', command=self.__deleteProduct)
        btn.grid(row=1, column=0, sticky='news')
        frame.grid_rowconfigure(0, weight=1)
        frame.grid_rowconfigure(1, weight=0)
        frame.pack(side='left', expand='yes', fill='both')
        frame = Frame(self.interior())
        self.idents = Pmw.ComboBox(frame,
            label_text='Idents',
            labelpos='n',
            dropdown=0,
            scrolledlist_vscrollmode='static',
            listbox_width=4,
            entryfield_entry_width=4,
            listbox_exportselection=0,
            )
        self.idents.grid(row=0, column=0, sticky='news')
        btn = Button(frame, text='Delete', command=self.__deleteIdent)
        btn.grid(row=1, column=0, sticky='news')
        Balloon().bind(btn, 'Delete selected id from list')
        frame.grid_rowconfigure(0, weight=1)
        frame.grid_rowconfigure(1, weight=0)
        frame.pack(side='left', expand='yes', fill='both', padx=5)
        bbox = Pmw.ButtonBox(self.interior(),
            orient='vertical',
            hull_borderwidth=2,
            hull_relief='groove',
            pady=1,
            )
        btn = bbox.add('Save', command=self.__save)
        Balloon().bind(btn, 'Saves route info to a file')
        btn = bbox.add('Verify', command=self.verify)
        Balloon().bind(btn, 'Verifies existence of all relevant files')
        btn = bbox.add('Default', command=self.__setDefault)
        Balloon().bind(btn, 'Makes selected product default one')
        btn = bbox.add('Close', command=self.close)
        Balloon().bind(btn, 'Closes this dialog')
        btn = bbox.add('Help', command=Avn.curry(self.showHelp, _Help))
        Balloon().bind(btn, 'Shows help')
        bbox.alignbuttons()
        bbox.pack(side='top', expand='no')
        self.pil = Pmw.EntryField(self.interior(),
            labelpos='n',
            label_text='Work PIL',
            entry_width=9,
            validate={'validator': 'alphabetic', 'minstrict': 0, \
                'min': 8, 'max': 9}
            )
        self.pil.pack(side='top', expand='no')

        self.initialiseoptions(_Editor)
        self.setGeometry()
开发者ID:KeithLatteri,项目名称:awips2,代码行数:71,代码来源:ProductDialog.py

示例8: __init__

# 需要导入模块: import Avn [as 别名]
# 或者: from Avn import curry [as 别名]
    def __init__(self, parent, **kw):
        AvnDialog.Dialog.__init__(self, parent, **kw)

        self.title('Trigger Editor')
        self.wm_iconname(newName='TEditor')

        # from AvnDialog
        self.createMessageBar(self.interior(), True)

        self.__getAfosIds()
        self.__getTriggerFile()
        self.ids = AvnParser.getAllSiteIds()
        # add CCFP entries
        self.ids.update({'ccfp': ['01', '02', '03']})
        numrows = max([len(self.ids.get(tag, [])) for tag in self.Items]) + 10

        interior = self.interior()
        frame = Frame(interior, relief='ridge', bd=2)
        bbox = Pmw.ButtonBox(frame)
        btn = bbox.add('Update', command=self.__update)
        Balloon().bind(btn, 'Updates missing values using the afos2awips file')
        btn = bbox.add('Make', command=self.__make)
        Balloon().bind(btn, 
            'Creates trigger file and updates watchwarn table')
        btn = bbox.add('Close', command=self.close)
        Balloon().bind(btn, 'Closes this dialog')
        btn = bbox.add('Help', command=Avn.curry(self.showHelp, _Help))
        Balloon().bind(btn, 'Shows help')
        bbox.alignbuttons()
        bbox.grid(row=0, column=0, columnspan=len(self.Items), sticky='news')
        self.item = dict.fromkeys(self.Items)
        validator = {'validator': 'alphanumeric', 'min': 8, 'max': 9, \
            'minstrict': 0}
        for n, tag in enumerate(self.Items):
            sf = Pmw.ScrolledFrame(frame,
                labelpos='n',
                label_text=tag.upper(),
                horizflex='elastic',
                )
            self.item[tag] = []
            
            for k in range(numrows):
                entry = Pmw.EntryField(sf.interior(),
                    labelpos='w',
                    label_text='',
                    label_anchor='e',
                    label_width=6,
                    entry_width=9,
                    validate=validator,
                    )
                entry.grid(row=k, column=0, sticky='news')
                self.item[tag].append(entry)
            w = entry.component('entry').winfo_reqwidth() + \
                entry.component('label').winfo_reqwidth() + \
                sf.component('vertscrollbar').winfo_reqwidth()
            sf.configure(clipper_width=w)
            sf.grid(row=1, column=n, sticky='news')
        frame.pack(side='top', expand='yes', fill='x')

        self.initialiseoptions(Editor)
        self.setGeometry()
开发者ID:KeithLatteri,项目名称:awips2,代码行数:63,代码来源:TriggerEditor.py

示例9: __createPage

# 需要导入模块: import Avn [as 别名]
# 或者: from Avn import curry [as 别名]
    def __createPage(self, name):
        page = self.editpager.add(name, tab_width=10)
        self.slist[name] = Pmw.ScrolledListBox(page,
            labelpos='nw',
            label_text='  %-24s %-32s %s' % ('Color', 'Method', 'Message'),
            vscrollmode='static',
            hscrollmode='dynamic',
            listbox_exportselection=0,
            selectioncommand=self.__editCurrent,
            )
        self.slist[name].pack(side='top', expand='yes', fill='both')
        
        frame = Frame(page, relief='ridge', bd=2)
        sf = self.methods[name] = Pmw.ScrolledFrame(frame,
            labelpos='n',
            label_text='Available methods',
            horizflex='elastic',
            )
        # create sorted list of methods
        tmp = [(k.__name__, k) for k in _Module[name].__dict__.values() \
            if type(k) == type(MonitorP.Rule) and issubclass(k, MonitorP.Rule)]
        tmp.sort()
        sfi = self.methods[name].interior()
        for label, klass in tmp:
            btn = Button(sfi, 
                text=label, 
                command=Avn.curry(self.__editNew, name, klass),
            )
            btn.pack(side='top', expand='yes', fill='x')
            Balloon().bind(btn, klass.__doc__)
        w = sf.component('label').winfo_reqwidth() + \
            sf.component('vertscrollbar').winfo_reqwidth()
        sf.configure(clipper_width=w)
        sf.pack(side='left', expand='yes', fill='y', pady=5)
        group = Pmw.Group(frame, tag_text='Rule Editor')
        bbox = Pmw.ButtonBox(group.interior(),
            labelpos='n',
            label_text='',
            frame_borderwidth=2,
            frame_relief='groove',
            )
        btn = bbox.add('Add', command=self.__add)
        Balloon().bind(btn, 'Adds new rule')
        btn = bbox.add('Replace', command=self.__replace)
        Balloon().bind(btn, 'Replaces currently selected rule')
        btn = bbox.add('Remove', command=self.__remove)
        Balloon().bind(btn, 'Removes selected rule')
        bbox.alignbuttons()
        bbox.pack(side='top', expand='yes', fill='x', padx=5)

        f = Frame(group.interior())
        self.label[name] = Label(f, text='Method')
        self.label[name].pack(side='left', padx=5)
        self.tkUnique[name] = IntVar()
        cb = Checkbutton(f,
            text='Unique',
            variable=self.tkUnique[name],
            )
        cb.pack(side='right', padx=5)
        self.type[name] = Pmw.OptionMenu(f,
            labelpos='w',
            label_text='Type',
            items=('vsby', 'wind', 'sky', 'wx', 'cat'),
            )
        self.type[name].pack(side='right', padx=5)
        self.severity[name] = Pmw.OptionMenu(f,
            labelpos='w',
            label_text='Severity',
            items=self.color[2:],
            )
        self.severity[name].pack(side='right', padx=5)
        f.pack(side='top', expand='yes', fill='x')
        self.msg[name] = Pmw.EntryField(group.interior(),
            labelpos='nw',
            label_text='Message',
            entry_width=72,
            )
        self.msg[name].pack(side='top', expand='yes', fill='x', padx=5)
        f = Frame(group.interior())
        self.arg[name] = [None]*4
        for n in range(4):
            self.arg[name][n] = Pmw.EntryField(f,
                labelpos='w',
                label_text='arg',
                entry_width=16,
                )   
            self.arg[name][n].grid(row=0, column=n, padx=5, pady=5)
            self.arg[name][n].grid_remove()
        f.pack(side='top', expand='yes', fill='x')
        self.doc[name] = Label(group.interior(), 
            text='', 
            justify='left', 
            height=4,
            )
        self.doc[name].pack(side='top', expand='yes', fill='both')
        group.pack(side='left', expand='yes', fill='both', padx=5, pady=5)
        frame.pack(side='top', expand='yes', fill='both')
开发者ID:KeithLatteri,项目名称:awips2,代码行数:99,代码来源:RuleEditor.py

示例10: __init__

# 需要导入模块: import Avn [as 别名]
# 或者: from Avn import curry [as 别名]
    def __init__(self, parent, **kw):
        AvnDialog.Dialog.__init__(self, parent, **kw)
        self.title(Avn.Name + ' Monitoring Criteria')

        self._editor = dict.fromkeys(_Monitors)
        # for each page
        self.slist = {}
        self.methods = {}
        self.active_rules = {}
        self.current_rule = None
        self.label = {}
        self.severity = {}
        self.type = {}
        self.tkUnique = {}
        self.msg = {}
        self.arg = {}
        self.doc = {}
        try:
            self.color = AvnParser.getGuiCfg()['colors']
        except Exception:
            # use default values
            self.color = ['green3', 'grey', 'pale green', \
                'yellow', 'orange', 'red', 'purple']
            _Logger.error('Cannot access etc/gui.cfg')

        # from AvnDialog
        self.createMessageBar(self.interior(), True)

        interior = self.interior()
        frame = Frame(interior, relief='ridge', bd=2)
        self.siteentry = Pmw.EntryField(frame,
            labelpos='w',
            label_text='Site Id',
            entry_width=4,
            validate={'validator': 'alphabetic',
                'min': 0, 'max': 4},
            command=self.load,
            )
        self.siteentry.pack(side='left', expand='no', padx=5)
        bbox = Pmw.ButtonBox(frame)
        btn = bbox.add('Load', command=self.load)
        Balloon().bind(btn, 'Retrieves rule set for selected site')
        btn = bbox.add('Save', command=self.__save)
        Balloon().bind(btn, 'Saves rule set to a file')
        btn = bbox.add('Close', command=self.close)
        Balloon().bind(btn, 'Closes this dialog')
        btn = bbox.add('Delete', command=self.__delete)
        Balloon().bind(btn, 'Deletes site-specific rules')
        btn = bbox.add('Help', command=Avn.curry(self.showHelp, _Help))
        Balloon().bind(btn, 'Shows help')
        bbox.alignbuttons()
        bbox.pack(side='right', expand='no')
        frame.pack(side='top', expand='yes', fill='both')
        self.editpager = Pmw.NoteBook(interior,
            raisecommand=self.load,
            )
        self.editpager.pack(side='top', fill='both', expand='yes')
        for name in _Monitors:
            self.__createPage(name)
        self.editpager.setnaturalsize()

        self.initialiseoptions(Editor)
        self.setGeometry()
        self._ready = True
开发者ID:KeithLatteri,项目名称:awips2,代码行数:66,代码来源:RuleEditor.py

示例11: __init__

# 需要导入模块: import Avn [as 别名]
# 或者: from Avn import curry [as 别名]
    def __init__(self, parent, **kw):
        AvnDialog.Dialog.__init__(self, parent, **kw)
        self.title(Avn.Name + ' Weather Plot')

        self.cfg = AvnParser.getPlotCfg()
        if not self.cfg:
            raise SystemExit
        self._viewer = {}
        for v in self.cfg['viewers']:
            self._viewer[v.tag] = v.module.Plot(**v.args)
        self.ident = None

        # from AvnDialog
        self.createMessageBar(self.interior(), True)
        
        # time selection dialog
        self.timeselector = TimeSelector(self.interior(), self.cfg['viewers'],
            master=self.interior())

        # GUI
        f = Frame(self.interior())

        self.siteids = Pmw.ComboBox(f,
            label_text='Site ID:',
            labelpos='w',
            entry_width=5,
            selectioncommand=self.update,
            )
        self.siteids.pack(side='left', padx=5)

        btnbox = Pmw.ButtonBox(f)
        btn = btnbox.add('Display', command=self.draw)
        Balloon().bind(btn, 'Draws weather')
        btn = btnbox.add('Times', command=self.timeselector.display)
        Balloon().bind(btn, 'Displays time selection dialog')
        btn = btnbox.add('Print', command=self.print_)
        Balloon().bind(btn, 'Saves window image to a file')
        btn = btnbox.add('Close', command=self.close)
        Balloon().bind(btn, 'Closes this dialog')
        btn = btnbox.add('Help', command=Avn.curry(self.showHelp, _Help))
        Balloon().bind(btn, 'Shows help')
        btnbox.pack(side='right')
        self.counter = Pmw.Counter(f,
            labelpos='w',
            label_text='zoom',
            entry_width=1,
            entryfield_value=1,
            entryfield_validate={'validator': 'integer', 'min': 1, 'max': 3},
            )
        self.counter.pack(side='right', padx=5)
        f.pack(side='top', expand='yes', fill='x')      
        f = Frame(self.interior())
        self.chkbtns = Pmw.RadioSelect(f,
            buttontype='checkbutton',
            orient='horizontal',
            labelpos='w',
            label_text='Data Sources',
            hull_borderwidth=2,
            hull_relief='ridge',
            )
        self.chkbtns.pack(side='left', expand='yes', fill='x', padx=5)
        for v in self.cfg['viewers']:
            self.chkbtns.add(v.tag, text=v.label, background=v.args['color'])
        self.chkbtns.setvalue(self.cfg['selected'])
        f.pack(side='top', expand='yes', fill='x')      
        self.date = Label(self.interior(), text='')
        self.date.pack(side='top', expand='no', padx=5)

        self.sf = Pmw.ScrolledFrame(self.interior(),
            usehullsize=1,
            hscrollmode='static',
            vscrollmode='static',
            )
        kwds = {'relief': 'sunken', 'background': 'gray90', 
            'font': 'fixed', 'border': 2}
        f = self.sf.interior()
        self.graph = {}
        h = 0
        for item in ['cig', 'vsby', 'wind']:
            label = Label(f, text=item.upper())
            label.pack(side='top')
            h += label.winfo_reqheight()+4
            self.graph[item] = GraphWidget.Graph(f, self.Width, 
                self.Height[item], **kwds)
            self.graph[item].pack(side='top', fill='both', expand='yes')
            h += self.Height[item]+4
        self.sf.pack(side='left', expand='yes', fill='both')
        h += self.sf.component('horizscrollbar').winfo_reqheight()
        w = self.Width+self.sf.component('vertscrollbar').winfo_reqwidth()
        self.sf.configure(hull_height=h, hull_width=w)

        self.initialiseoptions(WxPlot)
        self.setGeometry()
开发者ID:KeithLatteri,项目名称:awips2,代码行数:95,代码来源:WxPlot.py

示例12: __init__

# 需要导入模块: import Avn [as 别名]
# 或者: from Avn import curry [as 别名]
    def __init__(self, parent, **kw):
        AvnDialog.Dialog.__init__(self, parent, **kw)

        self.title('TAF Site Info Editor')
        self.wm_iconname(newName='SEditor')

        # from AvnDialog
        self.createMessageBar(self.interior(), True)

        interior = self.interior()
        frame = Frame(interior, relief='ridge', bd=2)
        self.site = Pmw.EntryField(frame,
                                   labelpos='w',
                                   label_text='Site Id',
                                   entry_width=4,
                                   validate={'validator': 'alphanumeric',
                                             'min': 4, 'max': 4, 'minstrict': 0},
                                   command=self.__load,
                                   )
        self.site.pack(side='left', expand='no', padx=5)
        bbox = Pmw.ButtonBox(frame)
        btn = bbox.add('Load', command=self.__load)
        Balloon().bind(btn, 'Retrieves data for selected site')
        btn = bbox.add('Update', command=self.__update)
        Balloon().bind(btn, 'Retrieves site info from fxa data files')
        btn = bbox.add('Save', command=self.__save)
        Balloon().bind(btn, 'Saves site info to a file')
        btn = bbox.add('Close', command=self.close)
        Balloon().bind(btn, 'Closes this dialog')
        btn = bbox.add('Help', command=Avn.curry(self.showHelp, _Help))
        Balloon().bind(btn, 'Shows help')
        bbox.alignbuttons()
        bbox.pack(side='right', expand='no')
        frame.pack(side='top', expand='yes', fill='x')

        frame = Frame(interior)
        headers = group = Pmw.Group(frame, tag_text='TAF Headers')
        self.wmo = Pmw.EntryField(group.interior(),
                                  labelpos='w',
                                  label_text='WMO',
                                  entry_width=12,
                                  validate=_validateWMO
                                  )
        self.wmo.grid(row=0, column=0, sticky='ew', padx=5)
        self.afos = Pmw.EntryField(group.interior(),
                                   labelpos='w',
                                   label_text='AFOS',
                                   entry_width=9,
                                   validate=_validateAFOS
                                   )
        self.afos.grid(row=0, column=1, sticky='ew', padx=5)
        group.pack(side='left', expand='yes', fill='x', pady=5)

        group = Pmw.Group(frame, tag_text='TAF Duration')
        self.tafDuration = Pmw.EntryField(group.interior(),
                                          labelpos='w',
                                          label_text='Hours',
                                          entry_width=2,
                                          validate=_validateTafduration)
        self.tafDuration.grid(row=0,column=1, sticky='ew', padx=5)
        group.pack(side='right', expand='yes', fill='x', pady=5)
        frame.pack(side='top', expand='yes', fill='x')

        group = Pmw.Group(interior, tag_text='Thresholds')
        self.vsby = Pmw.EntryField(group.interior(),
                                   labelpos='w',
                                   label_text='Visibility',
                                   entry_width=24,
                                   validate=_validateVsby,
                                   )
        self.vsby.grid(row=0, column=0, sticky='ew', padx=5)
        self.cig = Pmw.EntryField(group.interior(),
                                  labelpos='w',
                                  label_text='Ceiling',
                                  entry_width=24,
                                  validate=_validateCig,
                                  )
        self.cig.grid(row=0, column=1, sticky='ew', padx=5)
        self.radar_hgt = Pmw.EntryField(group.interior(),
                                        labelpos='w',
                                        label_text='Radar Cutoff',
                                        entry_width=24,
                                        validate=_validateHeight,
                                        )
        self.radar_hgt.grid(row=1, column=0, sticky='ew', padx=5)
        self.profiler_hgt = Pmw.EntryField(group.interior(),
                                           labelpos='w',
                                           label_text='Profiler Cutoff',
                                           entry_width=24,
                                           validate=_validateHeight,
                                           )
        self.profiler_hgt.grid(row=1, column=1, sticky='ew', padx=5)
        Pmw.alignlabels([self.vsby, self.cig, self.radar_hgt, \
                         self.profiler_hgt])
        group.pack(side='top', expand='yes', fill='x', pady=5)

        group = Pmw.Group(interior, tag_text='Geography')
        self.lat = Pmw.EntryField(group.interior(),
                                  labelpos='w',
                                  label_text='Latitude',
#.........这里部分代码省略.........
开发者ID:KeithLatteri,项目名称:awips2,代码行数:103,代码来源:SiteInfoEditor.py


注:本文中的Avn.curry方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。