コード例 #1
0
 def __init__(self):
     FormPanel.__init__(
         self, gvsig.getResource(__file__, "sentinelSearchPanel.xml"))
     #self.setPreferredSize(300,700)
     self.params = None
     self.mapControl = None
     self.start = 0
     self.rows = 10
     self.sortby = "ingestiondate%20asc"
     # Init components
     self.lblPreview.setBorder(BorderFactory.createEmptyBorder())
     platformOptions = ["---", "Sentinel-1", "Sentinel-2", "Sentinel-3"]
     for k in platformOptions:
         self.cmbPlatform.addItem(k)
     polarisation = ["---", "HH", "VV", "HV", "VH", "HH HV", "VV VH"]
     for k in polarisation:
         self.cmbPolarisation.addItem(k)
     sensors = ["---", "SM", "IW", "EW", "WV"]
     for k in sensors:
         self.cmbSensor.addItem(k)
     model1 = SpinnerNumberModel(5.0, 0.0, 100.0, 1.0)
     #spin1 = JSpinner(model1)
     self.spnCloud.setModel(model1)
     self.txtInfo.setCaretPosition(0)
     ## Download manager
     self.downloadManager = SentinelDownloadManager(self)
コード例 #2
0
ファイル: stageseditor.py プロジェクト: nacho0605/GSoC
 def __init__(self):
     FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "stageseditor.xml"))
     self.setPreferredSize(1038, 277)
     tableModel = DefaultTableModel(0, 12)
     self.tableStages.setModel(tableModel)
     self.tableStages.getColumnModel().getColumn(0).setHeaderValue("Number")
     self.tableStages.getColumnModel().getColumn(0).setPreferredWidth(50)
     self.tableStages.getColumnModel().getColumn(1).setHeaderValue("Kind")
     self.tableStages.getColumnModel().getColumn(1).setPreferredWidth(35)
     self.tableStages.getColumnModel().getColumn(2).setHeaderValue("Statement")
     self.tableStages.getColumnModel().getColumn(2).setPreferredWidth(425)
     self.tableStages.getColumnModel().getColumn(3).setHeaderValue("Option 1")
     self.tableStages.getColumnModel().getColumn(3).setPreferredWidth(132)
     self.tableStages.getColumnModel().getColumn(4).setHeaderValue("Option 2")
     self.tableStages.getColumnModel().getColumn(4).setPreferredWidth(132)
     self.tableStages.getColumnModel().getColumn(5).setHeaderValue("Option 3")
     self.tableStages.getColumnModel().getColumn(5).setPreferredWidth(132)
     self.tableStages.getColumnModel().getColumn(6).setHeaderValue("Answer")
     self.tableStages.getColumnModel().getColumn(6).setPreferredWidth(50)
     self.tableStages.getColumnModel().getColumn(7).setHeaderValue("Points")
     self.tableStages.getColumnModel().getColumn(7).setPreferredWidth(50)
     self.tableStages.getColumnModel().getColumn(8).setHeaderValue("Xmin")
     self.tableStages.getColumnModel().getColumn(8).setPreferredWidth(132)
     self.tableStages.getColumnModel().getColumn(9).setHeaderValue("Ymin")
     self.tableStages.getColumnModel().getColumn(9).setPreferredWidth(132)
     self.tableStages.getColumnModel().getColumn(10).setHeaderValue("Xmax")
     self.tableStages.getColumnModel().getColumn(10).setPreferredWidth(132)
     self.tableStages.getColumnModel().getColumn(11).setHeaderValue("Ymax")
     self.tableStages.getColumnModel().getColumn(11).setPreferredWidth(132)
     self.tableStages.setAutoResizeMode(JTable.AUTO_RESIZE_OFF)
     self.tableStages.getTableHeader().getDefaultRenderer().setHorizontalAlignment(SwingConstants.CENTER)
     self.tableStages.getTableHeader().setResizingAllowed(0)
     self.tableStages.getTableHeader().setReorderingAllowed(0)
     self.loadStages()
 def __init__(self, importManager):
     FormPanel.__init__(self,
                        getResource(__file__, "comprobartitularidad.xml"))
     self.importManager = importManager
     self.taskStatusController = None
     self.report = self.importManager.createReport()
     self.initComponents()
コード例 #4
0
    def __init__(self):
        FormPanel.__init__(self, getResource(__file__,
                                             "coordinatecapture.xml"))
        i18n = ToolsLocator.getI18nManager()
        self.setPreferredSize(320, 180)
        self.mapControl = None
        self.previousTool = None
        self.transform = None
        self.crs = None
        self.lastPoint = None
        self.translateUI()

        self.asJComponent().addComponentListener(ClosePanelListener(self))

        self.btnToggleCapture.setText(
            i18n.getTranslation("_Start_points_capture"))
        self.btnClearCRS.setEnabled(False)
        self.btnCRS.setEnabled(False)

        self.__tablemodel = CoordinateStorageModel()
        self.tblPoints.setModel(self.__tablemodel)
        self.btnCopySelectedPoint.setEnabled(False)
        self.btnRenameSelectedPoint.setEnabled(False)
        self.btnDeleteSelectedPoint.setEnabled(False)
        self.btnAddCapturedPoint.setEnabled(False)

        self.tabCapturePoint.setEnabledAt(
            1, self.__tablemodel.isPointStorageAvailable())

        self.tblPoints.getSelectionModel().addListSelectionListener(
            self.tblPoints_selectionChange)
        self.tblPoints.getSelectionModel().setSelectionMode(
            ListSelectionModel.SINGLE_INTERVAL_SELECTION)
コード例 #5
0
 def __init__(self, importManager):
     FormPanel.__init__(self, getResource(__file__,
                                          "createtablespanel.xml"))
     self.importManager = importManager
     self.connectionPicker = None
     self.taskStatusController = None
     self.initComponents()
コード例 #6
0
ファイル: gameeditor.py プロジェクト: nacho0605/GSoC
 def __init__(self):
     FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "gameeditor.xml"))
     self.setPreferredSize(180, 125)
     self.btgEditors = ButtonGroup()
     self.btgEditors.add(self.rdbInfo)
     self.btgEditors.add(self.rdbStages)
     self.btgEditors.add(self.rdbStudents)
     self.rdbInfo.setSelected(1)
 def __init__(self,view):
     FormPanel.__init__(self, getResource(__file__, "filterdata.xml"))
     
     #self.setPreferredSize(300,300)
     self.filterExpresionSwing = None
     self.layer = None
     self.view = view
     self.valuesList = self.lstValues
     self._updateUI()
     mapContext = self.view.getMapContext()
 def __init__(self):
     FormPanel.__init__(self, gvsig.getResource(__file__,
                                                "snappingTool.xml"))
     self.scp = SnapConfigPage()
     self.pnl1.setLayout(BorderLayout())
     self.pnl1.add(self.scp)
     self.pnl1.updateUI()
     i18n = ToolsLocator.getI18nManager()
     self.btnSave.setText(i18n.getTranslation("_Save"))
     self.btnClose.setText(i18n.getTranslation("_Cancel"))
コード例 #9
0
 def __init__(self, importManager):
     FormPanel.__init__(self, getResource(__file__, "importpanel.xml"))
     self.importManager = importManager
     self.connectionPicker = None
     self.taskStatusController = None
     self.currentFile = None
     self.process = None
     self.report = self.importManager.createReport()
     self.cltTransforms = None
     self.cltRules = None
     self.initComponents()
コード例 #10
0
 def showTool(self, title):
   ui = self.view.getProperty("quickdrawingtoolui")
   if ui==None:
     self.view.setProperty("quickdrawingtoolui", self)
     FormPanel.showTool(self, title+' - ' + self.view.getName())
     return
   if ui.asJComponent().isShowing():
     ui.asJComponent().grabFocus()
     return
   FormPanel.showTool(self, title+' - ' + self.view.getName())
   return
 def __init__(self):
     FormPanel.__init__(self,
                        gvsig.getResource(__file__, "CadastralParcels.xml"))
     self.dm = CadastralDownloaderManager(gvsig.currentView(), self)
     #self.cboProvinces.setSelectedIndex(5)
     # Tabla
     self.updateProvincia()
     model = self.tblMunicipalities.getModel()
     model.addColumn("Municipio")
     model.addColumn("Codigo")
     model.addColumn("Fecha")
     self.updateTable()
コード例 #12
0
    def __init__(self):
        fixFormPanelResourceLoader()
        i18nManager = ToolsLocator.getI18nManager()
        i18nManager.addResourceFamily("text",
                                      File(getResource(__file__, "i18n")))

        FormPanel.__init__(self, getResource(__file__, "tabbedtoc.xml"))
        self.tabTOC.setToolTipTextAt(0, "_List_By_Drawing_Order")
        self.tabTOC.setToolTipTextAt(1, "_List_By_Source")
        self.tabTOC.setToolTipTextAt(2, "_List_By_Visibility")
        self.tabTOC.setToolTipTextAt(3, "_List_By_Selection")
        self.__mapContext = None
        self.setPreferredSize(300, 200)
        self.translateUI()
コード例 #13
0
ファイル: gameplayer.py プロジェクト: nacho0605/GSoC
 def __init__(self, gameplayer):
     FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "gameplayer.xml"))
     self.setPreferredSize(400, 175)
     self.pgbGame.setMaximum(len(gameplayer.getQuestions()))
     self.pgbGame.setValue(1)
     self.pgbGame.setString("1/" + str(len(gameplayer.getQuestions())))
     self.pgbGame.setStringPainted(1)
     self.pnlQuestion.setLayout(BorderLayout())
     self.pnlQuestion.setBorder(BorderFactory.createLineBorder(Color.lightGray, 1, 1))
     self.index = 0
     self.questionslist = gameplayer.getQuestions()
     self.viewslist = gameplayer.getViews()
     self.report = Report(gameplayer.getUserRole(), gameplayer.getUserId())
     self.fillPanel(gameplayer.getQuestions()[0])
     self.updateView(gameplayer.getViews()[0])
コード例 #14
0
ファイル: studentseditor.py プロジェクト: nacho0605/GSoC
 def __init__(self):
     FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "studentseditor.xml"))
     self.setPreferredSize(646, 285)
     tableModel = DefaultTableModel(0, 3)
     self.tableStudents.setModel(tableModel)
     self.tableStudents.getColumnModel().getColumn(0).setHeaderValue("Id")
     self.tableStudents.getColumnModel().getColumn(0).setPreferredWidth(154)
     self.tableStudents.getColumnModel().getColumn(1).setHeaderValue("Password")
     self.tableStudents.getColumnModel().getColumn(1).setPreferredWidth(154)
     self.tableStudents.getColumnModel().getColumn(2).setHeaderValue("Name")
     self.tableStudents.getColumnModel().getColumn(2).setPreferredWidth(305)
     self.tableStudents.setAutoResizeMode(JTable.AUTO_RESIZE_OFF)
     self.tableStudents.getTableHeader().getDefaultRenderer().setHorizontalAlignment(SwingConstants.CENTER)
     self.tableStudents.getTableHeader().setResizingAllowed(0)
     self.tableStudents.getTableHeader().setReorderingAllowed(0)
     self.loadStudents()
コード例 #15
0
 def __init__(self, factory):
     MobileFormItemPanel.__init__(self, factory)
     FormPanel.__init__(self, getResource(__file__, "properties.xml"))
     self.__subcombo = SubCombo(self, getattr(self, "lstValues2"),
                                getattr(self, "btnUp2"),
                                getattr(self, "btnDown2"),
                                getattr(self, "btnDelete2"),
                                getattr(self, "btnAdd2"))
     self.__mainCombo = MainCombo(self, self.__subcombo,
                                  getattr(self, "lstValues1"),
                                  getattr(self, "btnUp1"),
                                  getattr(self, "btnDown1"),
                                  getattr(self, "btnDelete1"),
                                  getattr(self, "btnAdd1"))
     self.__mainCombo.setVisible(True)
     self.__subcombo.setVisible(True)
     self.translateUI()
コード例 #16
0
 def __init__(self, processPanel, parameters):
   ExportPanel.__init__(self)
   FormPanel.__init__(self, gvsig.getResource(__file__,"exportImagesPanels.xml"))
   # Translate
   toolsSwingManager = ToolsSwingLocator.getToolsSwingManager()
   toolsSwingManager.translate(self.lblFieldImages)
   toolsSwingManager.translate(self.lblImageFormat)
   toolsSwingManager.translate(self.lblOutputPathParameters)
   toolsSwingManager.translate(self.rdbOption1)
   toolsSwingManager.translate(self.rdbOption2)
   toolsSwingManager.translate(self.rdbOption3)
   
   # hay un picker para folder
   self.pickerFolder = None
   self.processPanel = processPanel
   self.params = parameters
   self.store = parameters.getSourceFeatureStore()
   self.initComponents()
    def __init__(self):
        self.prefs = readConfigFile()  # dict of values
        FormPanel.__init__(
            self,
            gvsig.getResource(__file__, "fieldCalculatorToolPreferences.xml"))
        self.i18nManager = ToolsLocator.getI18nManager()
        self.lblOptionLimit.setText(
            self.i18nManager.getTranslation("limit_rows_in_memory"))
        self.chbNoLimit.setText(
            self.i18nManager.getTranslation("without_limit"))
        #self.lblIcon.setIcon(self.load_icon()
        self.lblExplanation.setText("<html>" + self.i18nManager.getTranslation(
            "specifies_the_limit_rows_in_memory_when_the_program_eval_the_expression"
        ) + "</html>")

        # Init
        if self.prefs != None:
            self.initializeDefaults()
コード例 #18
0
 def __init__(self, layer):
     FormPanel.__init__(self, getResource(__file__, "addTimeSupport.xml"))
     self.__starTime = None
     self.__endTime = None
     self.__layer = layer
     toolsSwingManager = ToolsSwingLocator.getToolsSwingManager()
     toolsSwingManager.translate(self.lblLayer)
     toolsSwingManager.translate(self.lblTimeAttribute)
     toolsSwingManager.translate(self.lblTimeAttributeName)
     toolsSwingManager.translate(self.lblRangeOfValues)
     toolsSwingManager.translate(self.lblStarTime)
     toolsSwingManager.translate(self.lblEndTime)
     toolsSwingManager.translate(self.lblParsePattern)
     self.txtLayer.setText(layer.getName())
     self.txtTimeSupportName.setText("TimeSupport")
     featureType = self.__layer.getFeatureStore().getDefaultFeatureType()
     self.fillCombo(self.cboTimeAttribute, featureType)
     self.setPreferredSize(450, 200)
    def __init__(self, layer=None):
        FormPanel.__init__(self,
                           getResource(__file__, "reportbypointpanel3.xml"))
        i18Swing = ToolsSwingLocator.getToolsSwingManager()
        i18Swing.translate(self.lblTableNameToUse)
        i18Swing.translate(self.lblFields)
        i18Swing.translate(self.chkOneRecord)
        i18Swing.translate(self.lblTypeOfReport)

        self.cboTypeReport.removeAllItems()
        i18nManager = ToolsLocator.getI18nManager()

        self.cboTypeReport.addItem(
            ReportFormatType(i18nManager.getTranslation("_By_table"), 0))
        self.cboTypeReport.addItem(
            ReportFormatType(i18nManager.getTranslation("_With_two_columns"),
                             1))

        if layer != None:
            self.setLayer(layer)
 def __init__(self):
     FormPanel.__init__(
         self, gvsig.getResource(__file__, "reportbypointpanelreport.xml"))
     i18Swing = ToolsSwingLocator.getToolsSwingManager()
     self.setPreferredSize(400, 300)
     self.txt = JTextPane()
     self.txt.setEditable(False)
     self.txt.setCaretPosition(0)
     i18Swing.setDefaultPopupMenu(self.txt)
     self.txt.setContentType("text/html")
     self.pane = JScrollPane(self.txt)
     #self.setInitHorizontalScroll()
     self.pane.setVerticalScrollBarPolicy(
         ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS)
     #self.setInitHorizontalScroll()
     #self.pane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS)
     #self.setInitHorizontalScroll()
     self.jplReport.setLayout(BorderLayout())
     self.jplReport.add(self.pane, BorderLayout.CENTER)
     self.setInitHorizontalScroll()
コード例 #21
0
    def __init__(self):
        FormPanel.__init__(self, getResource(__file__, "importFields.xml"))
        self.lastTable = None
        i18Swing = ToolsSwingLocator.getToolsSwingManager()
        self.ft1 = None
        self.ft2 = None
        self.blockedNames = []

        i18Swing.translate(self.lblImportFields)
        i18Swing.translate(self.lblTable1)
        i18Swing.translate(self.lblField1)
        i18Swing.translate(self.lblTable2)
        i18Swing.translate(self.lblField2)

        swm = DALSwingLocator.getSwingManager()

        self.pickerFields1 = swm.createAttributeDescriptorPickerController(
            self.cmbField1)
        self.pickerFields2 = swm.createAttributeDescriptorPickerController(
            self.cmbField2)
        self.messageController = ToolsSwingLocator.getToolsSwingManager(
        ).createMessageBarController(self.lblMessage, 10000)

        allDocuments = self.getAllValidDocuments(None)
        if len(allDocuments) < 2:
            logger("Not able to find 2 tables to execute the tool",
                   LOGGER_INFO)
            return
        self.cmbTable1.setModel(DefaultComboBoxModel(allDocuments))
        self.cmbTable1.setSelectedIndex(0)
        self.cmbTable1_change()
        self.ft1 = self.cmbTable1.getSelectedItem().getFeatureStore(
        ).getDefaultFeatureType()
        self.ft2 = self.cmbTable2.getSelectedItem().getFeatureStore(
        ).getDefaultFeatureType()

        self.pickerFields1.setFeatureType(self.ft1)
        self.pickerFields2.setFeatureType(self.ft2)
        self.setLayer(self.cmbTable2.getSelectedItem())
        self.regenerateTranslator()
コード例 #22
0
    def __init__(self):
        #self.btnSectionAdd_click = TraceFunction(self.btnSectionAdd_click, "btnSectionAdd_click")
        #self.btnFormAdd_click = TraceFunction(self.btnFormAdd_click, "btnFormAdd_click")
        #self.btnFormDelete_click = TraceFunction(self.btnFormDelete_click, "btnFormDelete_click")
        #self.setForm = TraceFunction(self.setForm)
        #self.setSection = TraceFunction(self.setSection)
        #self.setSections = TraceFunction(self.setSections)
        #self.updateSectionFromUI = TraceFunction(self.updateSectionFromUI)
        #self.updateListOfFormItems = TraceFunction(self.updateListOfFormItems)

        FormPanel.__init__(self, getResource(__file__, "designer.xml"))
        self.setPreferredSize(700, 500)
        self.__sections = None
        self.__lastItem = None
        self.__lastItemPanel = None
        self.__currentSection = None
        self.__currentForm = None
        self.__lastPath = getDataFolder()
        self.newSections()
        self.tblPreviewForm.getParent().getParent().setBorder(None)
        self.tblPreviewForm.getParent().getParent().setViewportBorder(None)
        self.translateUI()
コード例 #23
0
  def __init__(self):
    FormPanel.__init__(self,getResource(__file__,"quickDrawingTool2.xml"))

    self.view = gvsig.currentView()
    mapContext = self.view.getMapContext()
    envi = mapContext.getViewPort().getEnvelope()
    if envi is None:
      newEnvelope = createEnvelope(pointMin=createPoint2D(0,0),pointMax=createPoint2D(40,10))
       
      mapContext.getViewPort().setEnvelope(newEnvelope)
    self.mapControl = gvsig.currentView().getWindowOfView().getMapControl()
    if self.mapControl!=None:
      changeListener = QDTChangeLister(self)
      self.mapControl.addChangeToolListener(changeListener)
    #print "add focus.."
    #self.asJComponent().addFocusListener(QDTFocusListener(self, self.view))
    # comprobar si es la misma vista
    #print "..end focus"
    
    self.state = self.view.getProperty("quickdrawingstate")
    
    if self.state != None and self.state.layer==None:
      self.state = None
      
    if self.state == None:
      self.state = QuickDrawingState()
      self.state.createLayer()
      self.view.setProperty("quickdrawingstate", self.state)
    drawLayer = mapContext.getGraphicsLayer(DEFAULT_DRAW_LAYER)
    if drawLayer==None:
      self.state.layer.setProjection(mapContext.getProjection())
      mapContext.setGraphicsLayer(DEFAULT_DRAW_LAYER, self.state.layer)
      mapContext.invalidate()
    
    self.translateUI()
    self.initUI()

    uiValuesFromState = self.state.getUIValuesFromState()
    self.setUIValues(uiValuesFromState)
    def __init__(self):
        FormPanel.__init__(self, getResource(__file__, "fechadecierre.xml"))

        toolsSwingManager = ToolsSwingLocator.getToolsSwingManager()

        self.workspace = DALLocator.getDataManager().getDatabaseWorkspace(
            'ARENA2_DB')

        self.fechaPicker = toolsSwingManager.createDatePickerController(
            self.txtFechaDeCierre, self.btnFechaDeCierre)
        if self.workspace == None:
            self.fechaPicker.setEnabled(False)
            self.btnGuardar.setEnabled(False)
        else:
            fechaDeCierre = self.workspace.get(
                'CEGESEV.accidentes.fecha_de_cierre')
            if fechaDeCierre == None:
                self.fechaPicker.set(None)
            else:
                fechaDeCierre = SimpleDateFormat("dd/MM/yyyy").parse(
                    fechaDeCierre)
                self.fechaPicker.coerceAndSet(fechaDeCierre)

        self.setPreferredSize(350, 100)
    def __init__(self, store, taskStatus=None, defaultField=None):
        FormPanel.__init__(
            self, gvsig.getResource(__file__, "fieldCalculatorTool.xml"))
        self.store = store
        self.taskStatus = taskStatus
        self.dialog = None
        ## Prepare bind taskTool
        if taskStatus != None:
            self.fcTaskStatus = ToolsSwingLocator.getTaskStatusSwingManager(
            ).createJTaskStatus()
            self.fcTaskStatus.setShowRemoveTaskButton(False)
            self.fcTaskStatus.bind(self.taskStatus)
        else:
            self.fcTaskStatus = None
        i18nManager = ToolsLocator.getI18nManager()

        # Update
        self.lblField.setText(i18nManager.getTranslation("_update_field"))

        # Expression
        ## Sample feature
        sampleFeature = None
        try:
            sampleFeature = store.getFeatureSelection().first()
            if sampleFeature == None:
                sampleFeature = store.first()
        except:
            logger("Not able to create Sample Feature for FieldCalculatorTool",
                   LOGGER_WARN)

        ## Set builder
        self.expBuilder = ExpressionEvaluatorSwingLocator.getManager(
        ).createJExpressionBuilder()
        if sampleFeature != None:
            dataManager = DALLocator.getDataManager()
            featureSymbolTable = dataManager.createFeatureSymbolTable()
            featureSymbolTable.setFeature(sampleFeature)
            self.expBuilder.setPreviewSymbolTable(
                featureSymbolTable.createParent())

        self.expBuilderStore = DALSwingLocator.getSwingManager(
        ).createFeatureStoreElement(self.store)
        self.expBuilder.addElement(self.expBuilderStore)

        #swingManager = ExpressionEvaluatorSwingLocator.getManager()
        #element = swingManager.createElement(
        #            DataSwingManager.FEATURE_STORE_EXPRESSION_ELEMENT,
        #            self.expBuilder,
        #            self.store)
        #self.expBuilder.addElement(element)

        # Task status
        if self.fcTaskStatus != None:
            self.pnlTaskStatus.setLayout(BorderLayout())
            self.pnlTaskStatus.add(self.fcTaskStatus.asJComponent())
            self.pnlTaskStatus.updateUI()

        # Filter picker
        self.expFilter = ExpressionEvaluatorSwingLocator.getManager(
        ).createExpressionPickerController(self.txtExp, self.btnExp)

        #swingManager = ExpressionEvaluatorSwingLocator.getManager()
        #element = swingManager.createElement(
        #            DataSwingManager.FEATURE_STORE_EXPRESSION_ELEMENT,
        #            self.expFilter,
        #            self.store)
        #self.expFilter.addElement(element)

        self.expFilterStore = DALSwingLocator.getSwingManager(
        ).createFeatureStoreElement(self.store)
        self.expFilter.addElement(self.expFilterStore)
        #self.expFilterStore.setFeatureStore(self.store)

        # Combo filter type
        options = {
            0: i18nManager.getTranslation("_use_selection"),
            1: i18nManager.getTranslation("_use_filter"),
            2: i18nManager.getTranslation("_use_all")
        }
        for op in options:
            self.cmbTypeFilter.addItem(TypeFilterCombo(options[op], op))

        if self.store.getSelection().getSize() != 0:
            self.cmbTypeFilter.setSelectedIndex(0)
        else:
            self.cmbTypeFilter.setSelectedIndex(2)

        # Combo picker field
        #self.cmbField.addItem(None)
        self.pickerField = DALSwingLocator.getSwingManager(
        ).createAttributeDescriptorPickerController(self.cmbField)
        ftype = self.store.getDefaultFeatureType()
        self.pickerField.setFeatureType(ftype)
        #noneElement=ListElement("",None)
        #self.cmbField.getModel().addElement(noneElement)

        if defaultField != None:
            self.pickerField.set(defaultField)
        else:
            self.pickerField.set(None)

        # Add history and bookmarks
        self.bookmarks = ToolsLocator.getBookmarksAndHistoryManager(
        ).getBookmarksGroup("fieldCalculatorTool")
        self.history = ToolsLocator.getBookmarksAndHistoryManager(
        ).getHistoryGroup("fieldCalculatorTool")

        self.bookmarksController = ToolsSwingLocator.getToolsSwingManager(
        ).createBookmarksController(self.bookmarks, self.btnBookmarks)
        self.historyController = ToolsSwingLocator.getToolsSwingManager(
        ).createHistoryController(self.history, self.btnHistory)

        #self.historyController.setFilter(None)

        self.historyController.addActionListener(
            BookmarksAndHistoryListener(self))
        self.bookmarksController.addActionListener(
            BookmarksAndHistoryListener(self))

        # Init defaults
        self.cmbField_change()
        self.cmbTypeFilter_change()

        self.pnl1.setLayout(BorderLayout())
        self.pnl1.add(self.expBuilder.asJComponent())
        self.pnl1.updateUI()
コード例 #26
0
ファイル: studentscreator.py プロジェクト: nacho0605/GSoC
 def __init__(self):
     FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "studentscreator.xml"))
     self.setPreferredSize(520, 167)
コード例 #27
0
 def __init__(self):
     FormPanel.__init__(self,
                        gvsig.getResource(__file__, "exportMapTiles.xml"))
 def __init__(self, store, simplifiedPanel):
   FormPanel.__init__(self,getResource(__file__,"SearchConditionPanelAccidente.xml"))
   self.store = store
   self.simplifiedPanel = simplifiedPanel
   i18n = ToolsLocator.getI18nManager()
   self.initComponents()
コード例 #29
0
ファイル: questionbase.py プロジェクト: nacho0605/GSoC
 def __init__(self, formfile, question):
   FormPanel.__init__(self, formfile)
   self.question = question
   self.lblNumber.setText(str(self.question.number))
   self.lblQuestion.setText(self.question.question)
コード例 #30
0
 def __init__(self):
     FormPanel.__init__(self,gvsig.getResource(__file__, "toolFinder.xml"))
     self.listController = None
     self.initUI()
     self.updateControls()
コード例 #31
0
 def __init__(self, model):
   FormPanel.__init__(self,gvsig.getResource(__file__,"testJtree.xml"))
   self.jtreePanel.setModel(model)
   self.exp = ""
コード例 #32
0
 def __init__(self, factory):
     MobileFormItemPanel.__init__(self, factory)
     FormPanel.__init__(self, getResource(__file__, "preview.xml"))
コード例 #33
0
 def __init__(self):
     FormPanel.__init__(self)
     self.load((__file__, "logindialog.xml"))
     self.setPreferredSize(640, 400)
     self._cancelled = True
コード例 #34
0
ファイル: infoeditor.py プロジェクト: nacho0605/GSoC
 def __init__(self):
     FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "infoeditor.xml"))
     self.setPreferredSize(715, 120)
     self.loadInfo()
コード例 #35
0
ファイル: gameinfo.py プロジェクト: nacho0605/GSoC
 def __init__(self, gameinfo):
     FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "gameinfo.xml"))
     self.setPreferredSize(715, 120)
     self.lblMutableName.setText(gameinfo.getName())
     self.lblMutableDescription.setText(gameinfo.getDescription())
     self.gameinfo = gameinfo
コード例 #36
0
ファイル: testplayerpanel.py プロジェクト: nacho0605/GSoC
 def showWindow(self, title=None):
   self.__fillQuestions()
   self.test.log("Running test for user '%s'." % self.test.getUser().getName())
   FormPanel.showWindow(self, self.test.getName())
コード例 #37
0
ファイル: testplayerpanel.py プロジェクト: nacho0605/GSoC
 def __init__(self, test):
   FormPanel.__init__(self)
   self.test = test
   self.load(os.path.join(os.path.dirname(__file__),"testplayerpanel.xml"))
   self.setPreferredSize(500,450)
コード例 #38
0
ファイル: question.py プロジェクト: nacho0605/GSoC
 def __init__(self, formfile, question):
     FormPanel.__init__(self, formfile)
     self.lblStatement.setText(question.getStatement())
コード例 #39
0
ファイル: studentsdeleter.py プロジェクト: nacho0605/GSoC
 def __init__(self):
     FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "studentsdeleter.xml"))
     self.setPreferredSize(520, 165)
     self.loadIds()
コード例 #40
0
ファイル: infoupdater.py プロジェクト: nacho0605/GSoC
 def __init__(self):
     FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "infoupdater.xml"))
     self.setPreferredSize(750, 130)
     self.txtName.setEnabled(0)
     self.txtDescription.setEnabled(0)
コード例 #41
0
 def __init__(self):
     FormPanel.__init__(self, getResource(__file__, "helloworld.xml"))
コード例 #42
0
ファイル: stagesupdater.py プロジェクト: nacho0605/GSoC
 def __init__(self):
     FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "stagesupdater.xml"))
     self.setPreferredSize(718, 495)
     self.loadNumbers()
コード例 #43
0
ファイル: studentsupdater.py プロジェクト: nacho0605/GSoC
 def __init__(self):
     FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "studentsupdater.xml"))
     self.setPreferredSize(543, 165)
     self.txtPassword.setEnabled(0)
     self.txtName.setEnabled(0)
     self.loadIds()
コード例 #44
0
ファイル: stagescreator.py プロジェクト: nacho0605/GSoC
 def __init__(self):
     FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "stagescreator.xml"))
     self.setPreferredSize(620, 500)
     self.loadKinds()
コード例 #45
0
 def __init__(self, factory):
     MobileFormItemPanel.__init__(self, factory)
     FormPanel.__init__(self, getResource(__file__, "properties.xml"))
     self.translateUI()
コード例 #46
0
ファイル: stagesdeleter.py プロジェクト: nacho0605/GSoC
 def __init__(self):
     FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "stagesdeleter.xml"))
     self.setPreferredSize(620, 463)
     self.loadNumbers()