def __init__(self,parent,parameters): BaseDialog.__init__(self,parent,parameters.id(),parameters.label(),(700,300)) self.thePersonaName = '' self.theVariable = '' self.theModalQualifier = '' self.theCharacteristic = '' self.theGrounds = [] self.theWarrant = [] self.theBacking = [] self.theRebuttal = [] self.isCreate = True self.theId = -1 self.panel = 0 self.inPersona = False if (parameters.__class__.__name__ == 'PersonaCharacteristicDialogParameters'): self.inPersona = True if (self.inPersona): self.thePersonaName = parameters.persona() self.theVariable = parameters.behaviouralVariable() self.commitVerb = 'Add' mainSizer = wx.BoxSizer(wx.VERTICAL) self.panel = PersonaCharacteristicNotebook(self,self.thePersonaName) mainSizer.Add(self.panel,1,wx.EXPAND) mainSizer.Add(self.buildCommitButtonSizer(PERSONACHARACTERISTIC_BUTTONCOMMIT_ID,True),0,wx.CENTER) self.SetSizer(mainSizer) wx.EVT_BUTTON(self,PERSONACHARACTERISTIC_BUTTONCOMMIT_ID,self.onCommit)
def __init__(self,parent,winId,winLabel,initSize,dimIconFile): BaseDialog.__init__(self,parent,winId,winLabel,initSize) b = Borg() self.dbProxy = b.dbProxy self.theDimensionName = DimensionNameIdentifier.dimensionName(self.__class__.__name__) self.selectedLabel = "" self.selectedIdx = -1 dimIcon = wx.Icon(b.imageDir + '/' + dimIconFile,wx.BITMAP_TYPE_PNG) self.SetIcon(dimIcon)
def __init__(self, parent, winId, winLabel, initSize, dimIconFile): BaseDialog.__init__(self, parent, winId, winLabel, initSize) b = Borg() self.dbProxy = b.dbProxy self.theDimensionName = DimensionNameIdentifier.dimensionName( self.__class__.__name__) self.selectedLabel = "" self.selectedIdx = -1 dimIcon = wx.Icon(b.iconDir + '/' + dimIconFile, wx.BITMAP_TYPE_PNG) self.SetIcon(dimIcon)
def __init__(self,parent,parameters): BaseDialog.__init__(self,parent,parameters.id(),parameters.label(),(700,800)) b = Borg() self.dbProxy = b.dbProxy self.theTaskId = -1 self.theName = '' self.theTags = [] self.theShortCode = '' self.theObjective = '' self.isAssumption = False self.theAuthor = '' self.theEnvironmentProperties = [] self.panel = 0 self.buildControls(parameters) self.theCommitVerb = 'Create'
def __init__(self, parent, parameters): BaseDialog.__init__(self, parent, parameters.id(), parameters.label(), (700, 800)) b = Borg() self.dbProxy = b.dbProxy self.theTaskId = -1 self.theName = '' self.theTags = [] self.theShortCode = '' self.theObjective = '' self.isAssumption = False self.theAuthor = '' self.theEnvironmentProperties = [] self.panel = 0 self.buildControls(parameters) self.theCommitVerb = 'Create'
def __init__(self,parent,objt): BaseDialog.__init__(self,parent,-1,'Edit Reference Contribution',(475,250)) self.theSource = objt.source() self.theDestination = objt.destination() self.theMeansEnd = objt.meansEnd() self.theContribution = objt.contribution() mainSizer = wx.BoxSizer(wx.VERTICAL) self.panel = ReferenceContributionPanel(self) mainSizer.Add(self.panel,1,wx.EXPAND) self.SetSizer(mainSizer) wx.EVT_BUTTON(self,REFERENCECONTRIBUTION_BUTTONCOMMIT_ID,self.onCommit) if (objt.meansEnd() != ''): self.theCommitVerb = 'Create' self.SetLabel = 'Create Reference Contribution' else: self.theCommitVerb = 'Edit' self.panel.load(objt)
def __init__(self, parent, parameters): BaseDialog.__init__(self, parent, parameters.id(), parameters.label(), (700, 300)) self.thePersonaName = '' self.theVariable = '' self.theModalQualifier = '' self.theCharacteristic = '' self.theGrounds = [] self.theWarrant = [] self.theBacking = [] self.theRebuttal = [] self.isCreate = True self.theId = -1 self.panel = 0 self.inPersona = False if (parameters.__class__.__name__ == 'PersonaCharacteristicDialogParameters'): self.inPersona = True if (self.inPersona): self.thePersonaName = parameters.persona() self.theVariable = parameters.behaviouralVariable() self.commitVerb = 'Add' mainSizer = wx.BoxSizer(wx.VERTICAL) self.panel = PersonaCharacteristicNotebook(self, self.thePersonaName) mainSizer.Add(self.panel, 1, wx.EXPAND) mainSizer.Add( self.buildCommitButtonSizer( armid.PERSONACHARACTERISTIC_BUTTONCOMMIT_ID, True), 0, wx.CENTER) self.SetSizer(mainSizer) wx.EVT_BUTTON(self, armid.PERSONACHARACTERISTIC_BUTTONCOMMIT_ID, self.onCommit)
def __init__(self,parent,conName = '',fromComponent = '',fromRole='',fromInterface = '',toComponent = '',toInterface ='',toRole='',assetName='',pName = '',arName = ''): BaseDialog.__init__(self,parent,PATTERNSTRUCTURE_ID,'Add Structure',(400,350)) b = Borg() self.dbProxy = b.dbProxy self.theConnectorName = conName self.theFromComponent = fromComponent self.theFromRole = fromRole self.theFromInterface = fromInterface self.theToComponent = toComponent self.theToInterface = toInterface self.theToRole = toRole self.theAssetName = assetName self.theProtocolName = pName self.theAccessRight = arName mainSizer = wx.BoxSizer(wx.VERTICAL) assets = self.dbProxy.getDimensionNames('template_asset') components = self.dbProxy.getDimensionNames('component') interfaces = self.dbProxy.getDimensionNames('interface') protocols = self.dbProxy.getDimensionNames('protocol') accessRights = self.dbProxy.getDimensionNames('access_right') mainSizer.Add(self.buildTextSizer('Name',(87,30),CONNECTOR_TEXTNAME_ID),0,wx.EXPAND) fromSizer = wx.BoxSizer(wx.HORIZONTAL) mainSizer.Add(fromSizer,0,wx.EXPAND) fromSizer.Add(self.buildComboSizerList('From',(87,30),CONNECTOR_COMBOFROMNAME_ID,components),1,wx.EXPAND) fromSizer.Add(self.buildComboSizerList('Interface',(87,30),CONNECTOR_COMBOFROMINTERFACE_ID,interfaces),1,wx.EXPAND) fromSizer.Add(self.buildTextSizer('Role',(87,30),CONNECTOR_TEXTFROMROLE_ID),1,wx.EXPAND) toSizer = wx.BoxSizer(wx.HORIZONTAL) mainSizer.Add(toSizer,0,wx.EXPAND) toSizer.Add(self.buildComboSizerList('To',(87,30),CONNECTOR_COMBOTONAME_ID,components),1,wx.EXPAND) toSizer.Add(self.buildComboSizerList('Interface',(87,30),CONNECTOR_COMBOTOINTERFACE_ID,interfaces),1,wx.EXPAND) toSizer.Add(self.buildTextSizer('Role',(87,30),CONNECTOR_TEXTTOROLE_ID),1,wx.EXPAND) mainSizer.Add(self.buildComboSizerList('Asset',(87,30),CONNECTOR_COMBOASSET_ID,assets),0,wx.EXPAND) metricsSizer = wx.BoxSizer(wx.HORIZONTAL) mainSizer.Add(metricsSizer,0,wx.EXPAND) metricsSizer.Add(self.buildComboSizerList('Protocol',(87,30),CONNECTOR_COMBOPROTOCOL_ID,protocols),1,wx.EXPAND) metricsSizer.Add(self.buildComboSizerList('Access Right',(87,30),CONNECTOR_COMBOACCESSRIGHT_ID,accessRights),1,wx.EXPAND) mainSizer.Add(wx.StaticText(self,-1),1,wx.EXPAND) mainSizer.Add(self.buildAddCancelButtonSizer(CONNECTOR_BUTTONCOMMIT_ID),0,wx.ALIGN_CENTER) self.SetSizer(mainSizer) wx.EVT_BUTTON(self,CONNECTOR_BUTTONCOMMIT_ID,self.onCommit) self.commitLabel = 'Add' if (len(self.theConnectorName) > 0): self.commitLabel = 'Edit' self.SetLabel('Edit Connector') conNameCtrl = self.FindWindowById(CONNECTOR_TEXTNAME_ID) fromNameCtrl = self.FindWindowById(CONNECTOR_COMBOFROMNAME_ID) fromRoleCtrl = self.FindWindowById(CONNECTOR_TEXTFROMROLE_ID) fromIfCtrl = self.FindWindowById(CONNECTOR_COMBOFROMINTERFACE_ID) toNameCtrl = self.FindWindowById(CONNECTOR_COMBOTONAME_ID) toIfCtrl = self.FindWindowById(CONNECTOR_COMBOTOINTERFACE_ID) toRoleCtrl = self.FindWindowById(CONNECTOR_TEXTTOROLE_ID) assetCtrl = self.FindWindowById(CONNECTOR_COMBOASSET_ID) pCtrl = self.FindWindowById(CONNECTOR_COMBOPROTOCOL_ID) arCtrl = self.FindWindowById(CONNECTOR_COMBOACCESSRIGHT_ID) buttonCtrl = self.FindWindowById(CONNECTOR_BUTTONCOMMIT_ID) conNameCtrl.SetValue(self.theConnectorName) fromNameCtrl.SetStringSelection(self.theFromComponent) fromRoleCtrl.SetValue(self.theFromRole) fromIfCtrl.SetStringSelection(self.theFromInterface) toNameCtrl.SetStringSelection(self.theToComponent) toIfCtrl.SetStringSelection(self.theToInterface) toRoleCtrl.SetValue(self.theToRole) assetCtrl.SetStringSelection(self.theAssetName) pCtrl.SetStringSelection(self.theProtocolName) arCtrl.SetStringSelection(self.theAccessRight) buttonCtrl.SetLabel('Edit')