Exemplo n.º 1
0
 def addLayer(self, layer):
     "A thread safe call to -> IS3View.addLayer"
     if (Globals.isThreadUnsafe()):
         func = Action[IGraphicsLayer](self.view.addLayer)
         dispatcher.Invoke(func, layer)
     else:
         self.view.addLayer(layer)
Exemplo n.º 2
0
 def addLocalTiledLayer(self, file, id):
     "A thread safe call to -> IS3View.addLocalTiledLayer"
     if (Globals.isThreadUnsafe()):
         func = Action[str, str](self.view.addLocalTiledLayer)
         dispatcher.Invoke(func, file, id)
     else:
         self.view.addLocalTiledLayer(file, id)
Exemplo n.º 3
0
 def setRenderer(self, renderer):
     "A thread safe call to -> IS3GraphicsLayer.setRenderer"
     if (Globals.isThreadUnsafe()):
         func = Action[IRenderer](self.layer.setRenderer)
         dispatcher.Invoke(func, renderer)
     else:
         self.layer.setRenderer(renderer)
Exemplo n.º 4
0
 def addGraphic(self, graphic):
     "A thread safe call to -> IS3GraphicsLayer.addGraphic"
     if (Globals.isThreadUnsafe()):
         func = Action[IGraphic](self.layer.addGraphic)
         dispatcher.Invoke(func, graphic)
     else:
         self.layer.addGraphic(graphic)
Exemplo n.º 5
0
 def addLocalTiledLayer(self, file, id):
     "A thread safe call to -> IS3View.addLocalTiledLayer"
     if (Globals.isThreadUnsafe()):
         func = Action[str, str](self.view.addLocalTiledLayer)
         dispatcher.Invoke(func, file, id)
     else:
         self.view.addLocalTiledLayer(file, id)
Exemplo n.º 6
0
 def addGraphic(self, graphic):
     "A thread safe call to -> IS3GraphicsLayer.addGraphic"
     if (Globals.isThreadUnsafe()):
         func = Action[IGraphic](self.layer.addGraphic)
         dispatcher.Invoke(func, graphic)
     else:
         self.layer.addGraphic(graphic)
Exemplo n.º 7
0
 def addLayer(self, layer):
     "A thread safe call to -> IS3View.addLayer"
     if (Globals.isThreadUnsafe()):
         func = Action[IGraphicsLayer](self.view.addLayer)
         dispatcher.Invoke(func, layer)
     else:
         self.view.addLayer(layer)
Exemplo n.º 8
0
 def setRenderer(self, renderer):
     "A thread safe call to -> IS3GraphicsLayer.setRenderer"
     if (Globals.isThreadUnsafe()):
         func = Action[IRenderer](self.layer.setRenderer)
         dispatcher.Invoke(func, renderer)
     else:
         self.layer.setRenderer(renderer)
Exemplo n.º 9
0
 def addGdbLayer(self, layerDef, gdbFile, start = 0, maxFeatures = 0):
     "A thread safe call to -> IS3View.addGdbLayer"
     if (Globals.isThreadUnsafe()):
         func = Func[LayerDef, str, int, int, Task[IGraphicsLayer]](self.view.addGdbLayer)
         layer = dispatcher.Invoke(func, layerDef, gdbFile, start, maxFeatures)
     else:
         layer = self.view.addGdbLayer(layerDef, gdbFile, start, maxFeatures)
     layerWrapper = GraphicsLayerWrapper(layer.Result)
     return layerWrapper
Exemplo n.º 10
0
 def addView(emap, canClose = True):
     "A thread safe call to -> mainframe.addView(emap, canclose)"
     if (Globals.isThreadUnsafe()):
         func = Func[EngineeringMap, bool, Task[IView]](mainframe.addView)
         view = dispatcher.Invoke(func, emap, canClose)
     else:
         view = mainframe.addView(emap, canClose)
     viewWrapper = ViewWrapper(view.Result)
     return viewWrapper
Exemplo n.º 11
0
 def addView(emap, canClose=True):
     "A thread safe call to -> mainframe.addView(emap, canclose)"
     if (Globals.isThreadUnsafe()):
         func = Func[EngineeringMap, bool, Task[IView]](mainframe.addView)
         view = dispatcher.Invoke(func, emap, canClose)
     else:
         view = mainframe.addView(emap, canClose)
     viewWrapper = ViewWrapper(view.Result)
     return viewWrapper
Exemplo n.º 12
0
 def addShpLayer(self, layerDef, shpFile, start=0, maxFeatures=0):
     "A thread safe call to -> IS3View.addShpLayer"
     if (Globals.isThreadUnsafe()):
         func = Func[LayerDef, str, int, int,
                     Task[IGraphicsLayer]](self.view.addShpLayer)
         layer = dispatcher.Invoke(func, layerDef, shpFile, start,
                                   maxFeatures)
     else:
         self.view.addShpLayer(layerDef, shpFile, start, maxFeatures)
     layerWrapper = GraphicsLayerWrapper(layer.Result)
     return layerWrapper
Exemplo n.º 13
0
 def loadDomainPanels():
     "A thread safe call to -> mainframe.loadDomainPanels()"
     if (Globals.isThreadUnsafe()):
         dispatcher.Invoke(mainframe.loadDomainPanels)
     else:
         mainframe.loadDomainPanels()
Exemplo n.º 14
0
 def selectByRect(self):
     "A thread safe call to -> IS3View.selectByRect"
     if (Globals.isThreadUnsafe()):
         dispatcher.Invoke(self.view.selectByRect)
     else:
         self.view.selectByRect()
Exemplo n.º 15
0
 def loadDomainPanels():
     "A thread safe call to -> mainframe.loadDomainPanels()"
     if (Globals.isThreadUnsafe()):
         dispatcher.Invoke(mainframe.loadDomainPanels)
     else:
         mainframe.loadDomainPanels()
Exemplo n.º 16
0
 def selectByRect(self):
     "A thread safe call to -> IS3View.selectByRect"
     if (Globals.isThreadUnsafe()):
         dispatcher.Invoke(self.view.selectByRect)
     else:
         self.view.selectByRect()