本文整理匯總了Python中Server.postAction方法的典型用法代碼示例。如果您正苦於以下問題:Python Server.postAction方法的具體用法?Python Server.postAction怎麽用?Python Server.postAction使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Server
的用法示例。
在下文中一共展示了Server.postAction方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: createNewServer
# 需要導入模塊: import Server [as 別名]
# 或者: from Server import postAction [as 別名]
def createNewServer(self, wherex, wherey, screenCoordinates = 1):
self.fromClass = None
self.toClass = None
# try the global constraints...
res = self.ASGroot.preCondition(ASG.CREATE)
if res:
self.constraintViolation(res)
self.mode=self.IDLEMODE
return
new_semantic_obj = Server(self)
res = new_semantic_obj.preCondition ( ASGNode.CREATE )
if res: return self.constraintViolation(res)
new_semantic_obj.preAction ( ASGNode.CREATE )
ne = len(self.ASGroot.listNodes["Server"])
if new_semantic_obj.keyword_:
new_semantic_obj.keyword_.setValue(new_semantic_obj.keyword_.toString()+str(ne))
if screenCoordinates:
new_obj = graph_Server(self.UMLmodel.canvasx(wherex), self.UMLmodel.canvasy(wherey), new_semantic_obj)
else: # already in canvas coordinates
new_obj = graph_Server(wherex, wherey, new_semantic_obj)
new_obj.DrawObject(self.UMLmodel, self.editGGLabel)
self.UMLmodel.addtag_withtag("Server", new_obj.tag)
new_semantic_obj.graphObject_ = new_obj
self.ASGroot.addNode(new_semantic_obj)
res = self.ASGroot.postCondition(ASG.CREATE)
if res:
self.constraintViolation(res)
self.mode=self.IDLEMODE
return
res = new_semantic_obj.postCondition(ASGNode.CREATE)
if res:
self.constraintViolation(res)
self.mode=self.IDLEMODE
return
new_semantic_obj.postAction(ASGNode.CREATE)
self.mode=self.IDLEMODE
if self.editGGLabel :
self.statusbar.event(StatusBar.TRANSFORMATION, StatusBar.CREATE)
else:
self.statusbar.event(StatusBar.MODEL, StatusBar.CREATE)
return new_semantic_obj