Exemplo n.º 1
0
    def __init__(self,
                 title,
                 varList,
                 varDict=None,
                 parent=None,
                 dataMgr=None,
                 modal=1,
                 runCB=None,
                 argList=[],
                 cmdLineVarDict=None):

        self.__varDict = varDict
        if self.__varDict is None:
            self.__varDict = {}
        self.__callbackResult = None

        # build widgetList
        widgetList = buildWidgetList(varList)

        # Construct the dialog
        self.__dialog = ValuesDialog.openDialog(title, widgetList, dataMgr)
        #self.__dialog = ValuesDialog(title,widgetList)

        # since ValuesDialog blocks on open() we can set status and varDict here
        values = JUtil.javaMapToPyDict(self.__dialog.getValues(),
                                       self.__convertJavaObjToPyWrapper)

        self.__varDict.update(values)

        from com.raytheon.uf.viz.python.swt import ButtonConstant
        self.__selectionStatus = str(
            ButtonConstant.getButton(self.__dialog.getReturnCode()))
Exemplo n.º 2
0
    def getVtecRecords(self, reqInfo={}):
        import JUtil
        from com.raytheon.uf.common.dataplugin.events.hazards.request import GetHazardActiveTableRequest
        from com.raytheon.uf.common.serialization.comm import RequestRouter

        request = VtecInteroperabilityActiveTableRequest()
        request.setSiteID(self.siteID)
        request.setPractice(not self.operationalMode)

        response = RequestRouter.route(request)
        if not response.isSuccess():
            # Notify a client that an error has occurred and halt product generation.
            raise Exception(response.getExceptionText())

        vtecMapList = []
        for i in range(response.getResults().size()):
            jVtecMap = response.getResults().get(i)
            vtecMap = JUtil.javaMapToPyDict(jVtecMap)
            if vtecMap is not None:
                vtecMapList.append(vtecMap)
        return vtecMapList
Exemplo n.º 3
0
    def __init__(self, title, varList, varDict=None, parent=None,
                 dataMgr=None, modal=1, runCB=None, argList=[],
                 cmdLineVarDict=None):

        self.__varDict = varDict    
        if self.__varDict is None:
            self.__varDict = {}
        self.__callbackResult = None
        
        # build widgetList
        widgetList = buildWidgetList(varList)

        # Construct the dialog
        self.__dialog = ValuesDialog.openDialog(title, widgetList, dataMgr)
        #self.__dialog = ValuesDialog(title,widgetList)
        
        # since ValuesDialog blocks on open() we can set status and varDict here
        values = JUtil.javaMapToPyDict(self.__dialog.getValues(), self.__convertJavaObjToPyWrapper)
        
        self.__varDict.update(values)
        
        from com.raytheon.uf.viz.python.swt import ButtonConstant
        self.__selectionStatus = str(ButtonConstant.getButton(self.__dialog.getReturnCode()))