from ASG_Buttons import * from ButtonConfig import * from ATOM3Enum import * from ATOM3List import * from ATOM3Float import * from ATOM3Integer import * from ATOM3Attribute import * from ATOM3Constraint import * from ATOM3String import * from ATOM3BottomType import * from ATOM3Boolean import * from ATOM3Appearance import * from ATOM3Link import * def myTest(self, rootNode): rootNode.Formalism_Name.setValue('myTest') rootNode.RowSize.setValue(1) rootNode.Formalism_File.setValue('tests/myTest_MM.py') self.globalPrecondition(rootNode) self.objaTest=ButtonConfig(self) self.objaTest.Contents.Text.setValue('New aTest') self.objaTest.Contents.Image.setValue('') self.objaTest.Contents.lastSelected= 'Text' self.objaTest.Drawing_Mode.setValue(1) self.objaTest.Action.setValue(('ActionButton1', (['Python', 'OCL'], 1), (['PREcondition', 'POSTcondition'], 1),(['EDIT', 'SAVE', 'CREATE', 'CONNECT', 'DELETE', 'DISCONNECT', 'TRANSFORM', 'SELECT', 'DRAG', 'DROP', 'MOVE OBJECT'], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), '# This method has as parameters:\n# - wherex : X Position in window coordinates where the user clicked.\n# - wherey : Y Position in window coordinates where the user clicked.\nnewPlace = self.createNewaTest (self, wherex, wherey)\n')) self.objaTest.graphClass_= graph_ButtonConfig if self.genGraphics: from graph_ButtonConfig import * new_obj = graph_ButtonConfig(10, 10,self.objaTest) new_obj.DrawObject(self.UMLmodel) self.UMLmodel.addtag_withtag('ButtonConfig', new_obj.tag) else: new_obj = None self.objaTest.graphObject_ = new_obj rootNode.addNode(self.objaTest) self.globalAndLocalPostcondition(self.objaTest, rootNode) self.globalPrecondition(rootNode) self.objaRel=ButtonConfig(self) self.objaRel.Contents.Text.setValue('New aRel') self.objaRel.Contents.Image.setValue('') self.objaRel.Contents.lastSelected= 'Text' self.objaRel.Drawing_Mode.setValue(1) self.objaRel.Action.setValue(('ActionButton1', (['Python', 'OCL'], 1), (['PREcondition', 'POSTcondition'], 1),(['EDIT', 'SAVE', 'CREATE', 'CONNECT', 'DELETE', 'DISCONNECT', 'TRANSFORM', 'SELECT', 'DRAG', 'DROP', 'MOVE OBJECT'], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), '# This method has as parameters:\n# - wherex : X Position in window coordinates where the user clicked.\n# - wherey : Y Position in window coordinates where the user clicked.\nnewPlace = self.createNewaRel (self, wherex, wherey)\n')) self.objaRel.graphClass_= graph_ButtonConfig if self.genGraphics: from graph_ButtonConfig import * new_obj = graph_ButtonConfig(135, 10,self.objaRel) new_obj.DrawObject(self.UMLmodel) self.UMLmodel.addtag_withtag('ButtonConfig', new_obj.tag) else: new_obj = None self.objaRel.graphObject_ = new_obj rootNode.addNode(self.objaRel) self.globalAndLocalPostcondition(self.objaRel, rootNode) newfunction = myTest loadedMMName = 'Buttons'