当前位置: 首页>>代码示例>>Python>>正文


Python WidgetFactory.buildAddCancelButtonSizer方法代码示例

本文整理汇总了Python中WidgetFactory.buildAddCancelButtonSizer方法的典型用法代码示例。如果您正苦于以下问题:Python WidgetFactory.buildAddCancelButtonSizer方法的具体用法?Python WidgetFactory.buildAddCancelButtonSizer怎么用?Python WidgetFactory.buildAddCancelButtonSizer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WidgetFactory的用法示例。


在下文中一共展示了WidgetFactory.buildAddCancelButtonSizer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: buildControls

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def buildControls(self,parameters):
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    associationSizer = wx.BoxSizer(wx.VERTICAL)
    mainSizer.Add(associationSizer,0,wx.EXPAND)
    environments = self.dbProxy.getDimensionNames('environment')
    assets = []
    navs = ['0','1','-1']

    associationTypes = []
    associationTypes = ['Inheritance','Association','Aggregation','Composition','Dependency']
    multiplicityTypes = ['1','*','1..*']

    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Environment',(87,30),CLASSASSOCIATION_COMBOENVIRONMENT_ID,environments),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Head',(87,30),CLASSASSOCIATION_COMBOHEADASSET_ID,assets),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Navigation',(87,30),CLASSASSOCIATION_COMBOHEADNAV_ID,navs),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Adornment',(87,30),CLASSASSOCIATION_COMBOHEADTYPE_ID,associationTypes),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'nry',(87,30),CLASSASSOCIATION_COMBOHEADMULTIPLICITY_ID,multiplicityTypes),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildTextSizer(self,'Role',(87,30),CLASSASSOCIATION_TEXTHEADROLE_ID),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildTextSizer(self,'Role',(87,30),CLASSASSOCIATION_TEXTTAILROLE_ID),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'nry',(87,30),CLASSASSOCIATION_COMBOTAILMULTIPLICITY_ID,multiplicityTypes),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Adornment',(87,30),CLASSASSOCIATION_COMBOTAILTYPE_ID,associationTypes),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Navigation',(87,30),CLASSASSOCIATION_COMBOTAILNAV_ID,navs),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Tail',(87,30),CLASSASSOCIATION_COMBOTAILASSET_ID,assets),0,wx.EXPAND)
    mainSizer.Add(wx.StaticText(self,-1),1,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,CLASSASSOCIATION_BUTTONCOMMIT_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    wx.EVT_BUTTON(self,CLASSASSOCIATION_BUTTONCOMMIT_ID,self.onCommit)
    wx.EVT_COMBOBOX(self,CLASSASSOCIATION_COMBOENVIRONMENT_ID,self.onEnvironmentChange)
开发者ID:InvalidToken,项目名称:CAIRIS,代码行数:31,代码来源:ClassAssociationDialog.py

示例2: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def __init__(self,parent,taskName,personaName,duration,frequency,demands,goalSupport):
    wx.Dialog.__init__(self,parent,TASKPERSONA_ID,'Add Task Persona',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(400,400))
    self.theDuration = ''
    self.theFrequency = ''
    self.theDemands = ''
    self.theGoalSupport = ''
    mainSizer = wx.BoxSizer(wx.VERTICAL)

    suPropertyValues = ['High Help','Medium Help','Low Help','None','Low Hindrance','Medium Hindrance','High Hindrance']
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Task',(87,30),COUNTERMEASURETASKPERSONA_TEXTTASK_ID,isReadOnly = True),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Persona',(87,30),COUNTERMEASURETASKPERSONA_TEXTPERSONA_ID,isReadOnly = True),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Duration',(87,30),COUNTERMEASURETASKPERSONA_COMBODURATION_ID,suPropertyValues),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Frequency',(87,30),COUNTERMEASURETASKPERSONA_COMBOFREQUENCY_ID,suPropertyValues),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Demands',(87,30),COUNTERMEASURETASKPERSONA_COMBODEMANDS_ID,suPropertyValues),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Goal Conflict',(87,30),COUNTERMEASURETASKPERSONA_COMBOGOALSUPPORT_ID,suPropertyValues),0,wx.EXPAND)
    mainSizer.Add(wx.StaticText(self,-1),1,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,COUNTERMEASURETASKPERSONA_BUTTONADD_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    wx.EVT_BUTTON(self,COUNTERMEASURETASKPERSONA_BUTTONADD_ID,self.onAdd)
   
    taskCtrl = self.FindWindowById(COUNTERMEASURETASKPERSONA_TEXTTASK_ID)
    taskCtrl.SetValue(taskName)
    personaCtrl = self.FindWindowById(COUNTERMEASURETASKPERSONA_TEXTPERSONA_ID)
    personaCtrl.SetValue(personaName)
    durCtrl = self.FindWindowById(COUNTERMEASURETASKPERSONA_COMBODURATION_ID)
    durCtrl.SetStringSelection(duration)
    freqCtrl = self.FindWindowById(COUNTERMEASURETASKPERSONA_COMBOFREQUENCY_ID)
    freqCtrl.SetStringSelection(frequency)
    demCtrl = self.FindWindowById(COUNTERMEASURETASKPERSONA_COMBODEMANDS_ID)
    demCtrl.SetStringSelection(demands)
    gsupCtrl = self.FindWindowById(COUNTERMEASURETASKPERSONA_COMBOGOALSUPPORT_ID)
    gsupCtrl.SetStringSelection(goalSupport)
开发者ID:InvalidToken,项目名称:CAIRIS,代码行数:35,代码来源:CountermeasureTaskPersonaDialog.py

示例3: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def __init__(self,parent,assets,reqName= '',reqDesc = '',reqType = '',reqRationale = '',reqFC ='',reqAsset =''):
    wx.Dialog.__init__(self,parent,PATTERNREQUIREMENT_ID,'Add Pattern Requirement',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(400,475))
    self.theTemplateAssets = assets
    self.theRequirementName = reqName
    self.theRequirementDescription = reqDesc
    self.theRequirementType = reqType
    self.theRequirementRationale = reqRationale
    self.theRequirementFitCriterion = reqFC
    self.theRequirementAsset = reqAsset
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    
    mainSizer.Add(RequirementNotebook(self,self.theTemplateAssets),1,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,PATTERNREQUIREMENT_BUTTONCOMMIT_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    wx.EVT_BUTTON(self,PATTERNREQUIREMENT_BUTTONCOMMIT_ID,self.onCommit)
    self.commitLabel = 'Add'
    if (len(self.theRequirementDescription) > 0):
      self.commitLabel = 'Edit'
      self.SetLabel('Edit Requirement')
      typeCtrl = self.FindWindowById(PATTERNREQUIREMENT_COMBOTYPE_ID)
      typeCtrl.SetStringSelection(self.theRequirementType)
      assetCtrl = self.FindWindowById(PATTERNREQUIREMENT_COMBOASSET_ID)
      assetCtrl.SetStringSelection(self.theRequirementAsset)
      nameCtrl = self.FindWindowById(PATTERNREQUIREMENT_TEXTNAME_ID)
      nameCtrl.SetValue(self.theRequirementName)
      descCtrl = self.FindWindowById(PATTERNREQUIREMENT_TEXTDESCRIPTION_ID)
      descCtrl.SetValue(self.theRequirementDescription)
      rationaleCtrl = self.FindWindowById(PATTERNREQUIREMENT_TEXTRATIONALE_ID)
      rationaleCtrl.SetValue(self.theRequirementRationale)
      fcCtrl = self.FindWindowById(PATTERNREQUIREMENT_TEXTFITCRITERION_ID)
      fcCtrl.SetValue(self.theRequirementFitCriterion)
      buttonCtrl = self.FindWindowById(PATTERNREQUIREMENT_BUTTONCOMMIT_ID)
      buttonCtrl.SetLabel('Edit')
开发者ID:InvalidToken,项目名称:CAIRIS,代码行数:36,代码来源:RequirementDialog.py

示例4: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def __init__(self,parent,setPersonas,currentEnvironmentName,dp,pName='',pDur='',pFreq='',pDem='',pGsup=''):
    wx.Dialog.__init__(self,parent,TASKPERSONA_ID,'Add Task Persona',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(400,300))
    self.theName = pName
    self.theDuration = pDur
    self.theFrequency = pFreq
    self.theDemands = pDem
    self.theGoalSupport = pGsup
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    personaList = dp.getDimensionNames('persona',currentEnvironmentName)

    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Name',(87,30),TASKPERSONA_COMBONAME_ID,personaList),0,wx.EXPAND)
    suList = ['None','Low','Medium','High']
    durationList = ['Seconds','Minutes','Hours or longer']
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Duration',(87,30),TASKPERSONA_COMBODURATION_ID,durationList),0,wx.EXPAND)
    freqList = ['Hourly or more','Daily - Weekly','Monthly or less']
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Frequency',(87,30),TASKPERSONA_COMBOFREQUENCY_ID,freqList),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Demands',(87,30),TASKPERSONA_COMBODEMANDS_ID,suList),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Goal Conflict',(87,30),TASKPERSONA_COMBOGOALSUPPORT_ID,suList),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,TASKPERSONA_BUTTONADD_ID),0,wx.ALIGN_CENTER)
    if (self.theName != ''):
      self.SetLabel('Edit Task Persona')
      nameCtrl = self.FindWindowById(TASKPERSONA_COMBONAME_ID)
      nameCtrl.SetValue(self.theName)
      durCtrl = self.FindWindowById(TASKPERSONA_COMBODURATION_ID)
      durCtrl.SetStringSelection(self.theDuration)
      freqCtrl = self.FindWindowById(TASKPERSONA_COMBOFREQUENCY_ID)
      freqCtrl.SetStringSelection(self.theFrequency)
      demCtrl = self.FindWindowById(TASKPERSONA_COMBODEMANDS_ID)
      demCtrl.SetStringSelection(self.theDemands)
      gsupCtrl = self.FindWindowById(TASKPERSONA_COMBOGOALSUPPORT_ID)
      gsupCtrl.SetStringSelection(self.theGoalSupport)
    self.SetSizer(mainSizer)

    wx.EVT_BUTTON(self,TASKPERSONA_BUTTONADD_ID,self.onAdd)
开发者ID:InvalidToken,项目名称:CAIRIS,代码行数:36,代码来源:TaskPersonaDialog.py

示例5: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def __init__(self,parent,firstName = '',surname='',affiliation='',role=''):
    wx.Dialog.__init__(self,parent,CONTRIBUTORENTRY_ID,'Add Contributor',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(500,300))
    self.theFirstName = firstName
    self.theSurname = surname
    self.theAffiliation = affiliation
    self.theRole = role
    mainSizer = wx.BoxSizer(wx.VERTICAL)

    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Firstname',(87,30),CONTRIBUTORENTRY_TEXTFIRSTNAME_ID),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Surname',(87,30),CONTRIBUTORENTRY_TEXTSURNAME_ID),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Affiliation',(87,30),CONTRIBUTORENTRY_TEXTAFFILIATION_ID),0,wx.EXPAND)
    participantRoles = ['Participant','Facilitator','Scribe']
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Role',(87,30),CONTRIBUTORENTRY_COMBOROLE_ID,participantRoles),0,wx.EXPAND)
    mainSizer.Add(wx.StaticText(self,-1),1,wx.EXPAND)

    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,CONTRIBUTORENTRY_BUTTONCOMMIT_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    wx.EVT_BUTTON(self,CONTRIBUTORENTRY_BUTTONCOMMIT_ID,self.onCommit)
    self.commitLabel = 'Add'
    if (len(self.theFirstName) > 0):
      self.commitLabel = 'Edit'
      self.SetLabel('Edit Contributor')
      firstNameCtrl = self.FindWindowById(CONTRIBUTORENTRY_TEXTFIRSTNAME_ID)
      firstNameCtrl.SetValue(self.theFirstName)
      surnameCtrl = self.FindWindowById(CONTRIBUTORENTRY_TEXTSURNAME_ID)
      surnameCtrl.SetValue(self.theSurname)
      affiliationCtrl = self.FindWindowById(CONTRIBUTORENTRY_TEXTAFFILIATION_ID)
      affiliationCtrl.SetValue(self.theAffiliation)
      roleCtrl = self.FindWindowById(CONTRIBUTORENTRY_COMBOROLE_ID)
      roleCtrl.SetStringSelection(self.theRole)
      buttonCtrl = self.FindWindowById(CONTRIBUTORENTRY_BUTTONCOMMIT_ID)
      buttonCtrl.SetLabel('Edit')
开发者ID:AntonP1337,项目名称:cairis,代码行数:35,代码来源:ContributorEntryDialog.py

示例6: buildControls

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def buildControls(self,parameters):
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    associationSizer = wx.BoxSizer(wx.HORIZONTAL)
    mainSizer.Add(WidgetFactory.buildCheckSizer(self,'Alternative',GOALASSOCIATION_CHECKALTERNATIVE_ID,False),0,wx.EXPAND)
    mainSizer.Add(associationSizer,0,wx.EXPAND)
    environments = self.dbProxy.getDimensionNames('environment')
    goals = []
    associationTypes = ['and','or','conflict','responsible','obstruct','resolve']
    goalDimensions = ['goal','requirement','countermeasure','obstacle']
    subGoalDimensions = ['goal','requirement','role','task','usecase','countermeasure','domainproperty','obstacle','threat','vulnerability']

    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Environment',(87,30),GOALASSOCIATION_COMBOENVIRONMENT_ID,environments),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Dimension',(87,30),GOALASSOCIATION_COMBOGOALDIM_ID,goalDimensions),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Goal',(87,30),GOALASSOCIATION_COMBOGOAL_ID,goals),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Type',(87,30),GOALASSOCIATION_COMBOATYPE_ID,associationTypes),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Dimension',(87,30),GOALASSOCIATION_COMBOSUBGOALDIM_ID,subGoalDimensions),0,wx.EXPAND)
    associationSizer.Add(WidgetFactory.buildComboSizerList(self,'Sub-Goal',(87,30),GOALASSOCIATION_COMBOSUBGOAL_ID,goals),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildMLTextSizer(self,'Rationale',(87,60),GOALASSOCIATION_TEXTRATIONALE_ID),1,wx.EXPAND,1,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,GOALASSOCIATION_BUTTONCOMMIT_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    wx.EVT_BUTTON(self,GOALASSOCIATION_BUTTONCOMMIT_ID,self.onCommit)
    wx.EVT_COMBOBOX(self,GOALASSOCIATION_COMBOENVIRONMENT_ID,self.onEnvironmentChange)
    wx.EVT_COMBOBOX(self,GOALASSOCIATION_COMBOGOALDIM_ID,self.onGoalDimChange)
    wx.EVT_COMBOBOX(self,GOALASSOCIATION_COMBOSUBGOALDIM_ID,self.onSubGoalDimChange)
开发者ID:AntonP1337,项目名称:cairis,代码行数:27,代码来源:GoalAssociationDialog.py

示例7: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def __init__(self,parent,fromName = '',toName = '',rType = ''):
    wx.Dialog.__init__(self,parent,CODERELATIONSHIP_ID,'Add Code Relationship',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(400,200))

    self.rtLookup = {'==':'associated','=>':'implies','<>':'conflict','[]':'part-of'}
    self.lookupRt = {'':'','associated':'==','implies':'=>','conflict':'<>','part-of':'[]'}

    self.theFromName = fromName
    self.theToName = toName
    self.theRelationship = self.lookupRt[rType]
    self.commitLabel = 'Add'
    mainSizer = wx.BoxSizer(wx.VERTICAL)


    b = Borg()
    codeList = b.dbProxy.getDimensionNames('code')
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'From',(87,30),CODERELATIONSHIP_COMBOFROMCODE_ID,codeList),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'To',(87,30),CODERELATIONSHIP_COMBOTOCODE_ID,codeList),0,wx.EXPAND)
    rtList = ['==','=>','<>','[]']
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Relationship',(87,30),CODERELATIONSHIP_COMBORTTYPE_ID,rtList),0,wx.EXPAND)
    mainSizer.Add(wx.StaticText(self,-1,''),1,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,CODERELATIONSHIP_BUTTONADD_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)
    wx.EVT_BUTTON(self,CODERELATIONSHIP_BUTTONADD_ID,self.onCommit)

    if self.theFromName != '':
      fromCtrl = self.FindWindowById(CODERELATIONSHIP_COMBOFROMCODE_ID)
      toCtrl = self.FindWindowById(CODERELATIONSHIP_COMBOTOCODE_ID)
      rtCtrl = self.FindWindowById(CODERELATIONSHIP_COMBORTTYPE_ID)
      fromCtrl.SetValue(self.theFromName)
      toCtrl.SetValue(self.theToName)
      rtCtrl.SetValue(self.theRelationship)
开发者ID:AntonP1337,项目名称:cairis,代码行数:33,代码来源:CodeRelationshipDialog.py

示例8: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def __init__(self,parent,dp,envName,assetProperties,headNav = 0,headAdornment = '',headNry = '',headRole='',tailRole='',tailNry='',tailAdornment='',tailNav = 0,tailName = ''):
    wx.Dialog.__init__(self,parent,ASSETASSOCIATION_ID,'Add Asset Association',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(400,500))
    self.dbProxy = dp
    self.theAssetProperties = assetProperties
    self.theCurrentEnvironment = envName
    self.theHeadNav = int(headNav)
    self.theHeadAdornment = headAdornment
    self.theHeadNry = headNry
    self.theHeadRole = headRole
    self.theTailRole = tailRole
    self.theTailNry = tailNry
    self.theTailAdornment = tailAdornment
    self.theTailNav = int(tailNav)
    self.theTailName = tailName
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    assets = self.dbProxy.environmentAssets(self.theCurrentEnvironment)
    associationTypes = ['Inheritance','Association','Aggregation','Composition','Dependency']
    multiplicityTypes = ['1','*','1..*']
    navs = ['0','1','-1']

    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Navigation',(87,30),ASSETASSOCIATION_COMBOHEADNAV_ID,navs),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Adornment',(87,30),ASSETASSOCIATION_COMBOHEADTYPE_ID,associationTypes),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'nry',(87,30),ASSETASSOCIATION_COMBOHEADMULTIPLICITY_ID,multiplicityTypes),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Role',(87,30),ASSETASSOCIATION_TEXTHEADROLE_ID),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Role',(87,30),ASSETASSOCIATION_TEXTTAILROLE_ID),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'nry',(87,30),ASSETASSOCIATION_COMBOTAILMULTIPLICITY_ID,multiplicityTypes),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Adornment',(87,30),ASSETASSOCIATION_COMBOTAILTYPE_ID,associationTypes),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Navigation',(87,30),ASSETASSOCIATION_COMBOTAILNAV_ID,navs),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Tail',(87,30),ASSETASSOCIATION_COMBOTAILASSET_ID,assets),0,wx.EXPAND)

    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,ASSETASSOCIATION_BUTTONCOMMIT_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    wx.EVT_BUTTON(self,ASSETASSOCIATION_BUTTONCOMMIT_ID,self.onCommit)
    self.commitLabel = 'Add'
    if (len(self.theTailName) > 0):
      self.commitLabel = 'Edit'
      self.SetLabel('Edit Asset Association')
      headNavCtrl = self.FindWindowById(ASSETASSOCIATION_COMBOHEADNAV_ID)
      headNavCtrl.SetValue(str(self.theHeadNav))
      headTypeCtrl = self.FindWindowById(ASSETASSOCIATION_COMBOHEADTYPE_ID)
      headTypeCtrl.SetValue(self.theHeadAdornment)
      headNryCtrl = self.FindWindowById(ASSETASSOCIATION_COMBOHEADMULTIPLICITY_ID)
      headNryCtrl.SetValue(self.theHeadNry)
      headRoleCtrl = self.FindWindowById(ASSETASSOCIATION_TEXTHEADROLE_ID)
      headRoleCtrl.SetValue(self.theHeadRole)
      tailRoleCtrl = self.FindWindowById(ASSETASSOCIATION_TEXTTAILROLE_ID)
      tailRoleCtrl.SetValue(self.theTailRole)
      tailNryCtrl = self.FindWindowById(ASSETASSOCIATION_COMBOTAILMULTIPLICITY_ID)
      tailNryCtrl.SetValue(self.theTailNry)
      tailTypeCtrl = self.FindWindowById(ASSETASSOCIATION_COMBOTAILTYPE_ID)
      tailTypeCtrl.SetValue(self.theTailAdornment)
      tailNavCtrl = self.FindWindowById(ASSETASSOCIATION_COMBOTAILNAV_ID)
      tailNavCtrl.SetValue(str(self.theTailNav))
      tailCtrl = self.FindWindowById(ASSETASSOCIATION_COMBOTAILASSET_ID)
      tailCtrl.SetValue(self.theTailName)
      buttonCtrl = self.FindWindowById(ASSETASSOCIATION_BUTTONCOMMIT_ID)
      buttonCtrl.SetLabel('Edit')
开发者ID:InvalidToken,项目名称:CAIRIS,代码行数:60,代码来源:AssetAssociationDialog.py

示例9: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def __init__(self,parent):
    wx.Dialog.__init__(self,parent,REVISIONENTRY_ID,'Add Revision',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(300,300))
    self.theRemarks = ''
    mainSizer = wx.BoxSizer(wx.VERTICAL)

    mainSizer.Add(WidgetFactory.buildMLTextSizer(self,'Remarks',(87,30),REVISIONENTRY_TEXTREMARKS_ID),1,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,REVISIONENTRY_BUTTONCOMMIT_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    wx.EVT_BUTTON(self,REVISIONENTRY_BUTTONCOMMIT_ID,self.onCommit)
    self.commitLabel = 'Add'
开发者ID:AntonP1337,项目名称:cairis,代码行数:13,代码来源:RevisionEntryDialog.py

示例10: buildControls

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def buildControls(self):
    mainSizer = wx.BoxSizer(wx.VERTICAL)

    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Name',(87,30),armid.DOMAIN_TEXTNAME_ID),0,wx.EXPAND)
    self.notebook = DomainNotebook(self)
    mainSizer.Add(self.notebook,1,wx.EXPAND)

    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,armid.DOMAIN_BUTTONCOMMIT_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    wx.EVT_BUTTON(self,armid.DOMAIN_BUTTONCOMMIT_ID,self.onCommit)
开发者ID:RachelLar,项目名称:CAIRIS-web,代码行数:13,代码来源:DomainDialog.py

示例11: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def __init__(self,parent):
    wx.Dialog.__init__(self,parent,armid.CHANNEL_ID,'Add Channel',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(400,150))
    self.theChannelName = ''
    self.theDataType = ''
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Channel',(87,30),armid.CHANNEL_TEXTCHANNEL_ID),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Data Type',(87,30),armid.CHANNEL_TEXTDATATYPE_ID),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,armid.CHANNEL_BUTTONADD_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    wx.EVT_BUTTON(self,armid.CHANNEL_BUTTONADD_ID,self.onAdd)
开发者ID:RachelLar,项目名称:CAIRIS-web,代码行数:13,代码来源:ChannelDialog.py

示例12: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def __init__(self,parent,setCapabilities,dp):
    wx.Dialog.__init__(self,parent,armid.CAPABILITY_ID,'Add Capability',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(400,150))
    self.theCapabilityName = ''
    self.theCapabilityValue = ''
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    defaultCapabilities = set(dp.getDimensionNames('capability'))
    capabilityList = list(defaultCapabilities.difference(setCapabilities))
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Capability',(87,30),armid.CAPABILITY_COMBOCAPABILITY_ID,capabilityList),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Value',(87,30),armid.CAPABILITY_COMBOVALUE_ID,['Low','Medium','High']),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,armid.CAPABILITY_BUTTONADD_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    wx.EVT_BUTTON(self,armid.CAPABILITY_BUTTONADD_ID,self.onAdd)
开发者ID:RachelLar,项目名称:CAIRIS-web,代码行数:15,代码来源:CapabilityDialog.py

示例13: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def __init__(self,parent):
    wx.Dialog.__init__(self,parent,RESPONSECOST_ID,'Add Response Cost',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(400,100))
    b = Borg()
    self.dbProxy = b.dbProxy
    self.theResponseName = ''
    self.theResponseCost = ''
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    responseList = self.dbProxy.getDimensionNames('response')
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Response',(87,30),RESPONSECOST_COMBORESPONSE_ID,responseList),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Cost',(87,30),RESPONSECOST_COMBOCOST_ID,['Low','Medium','High']),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,RESPONSECOST_BUTTONADD_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    wx.EVT_BUTTON(self,RESPONSECOST_BUTTONADD_ID,self.onAdd)
开发者ID:InvalidToken,项目名称:CAIRIS,代码行数:16,代码来源:ResponseCostDialog.py

示例14: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def __init__(self,parent,dp,envName,subGoal='',subGoalDim='',refinement='',alternate='',rationale='',isGoal=False):
    wx.Dialog.__init__(self,parent,GOALREFINEMENT_ID,'Add Goal Refinement',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(400,400))
    self.dbProxy = dp
    self.theCurrentEnvironment = envName
    self.theGoal = subGoal
    self.theGoalDimension = subGoalDim
    self.theRefinement = refinement
    self.theAlternateFlag = alternate
    self.theRationale = rationale
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    goals = self.dbProxy.environmentGoals(self.theCurrentEnvironment)
    goals += self.dbProxy.environmentObstacles(self.theCurrentEnvironment)
    goals += self.dbProxy.environmentDomainProperties(self.theCurrentEnvironment)
    reqList = self.dbProxy.getOrderedRequirements()
    for req in reqList:
      goals += [req.label()]
    refNames = ['and','or','conflict','responsible','obstruct','resolve']
    altNames = ['Yes','No']
    goalDims = ['goal','task','usecase','requirement','obstacle','domainproperty','threat','vulnerability','role','misusecase']
    goalTitle = 'Sub-Goal'
    if isGoal == True:
      goalTitle = 'Goal'
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Type',(87,30),GOALREFINEMENT_COMBOGOALDIMENSION_ID,goalDims),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,goalTitle,(87,30),GOALREFINEMENT_COMBOGOAL_ID,goals),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Refinement',(87,30),GOALREFINEMENT_COMBOREFINEMENT_ID,refNames),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Alternate',(87,30),GOALREFINEMENT_COMBOALTERNATE_ID,altNames),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildMLTextSizer(self,'Rationale',(87,60),GOALREFINEMENT_TEXTRATIONALE_ID),1,wx.EXPAND,1,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,GOALREFINEMENT_BUTTONCOMMIT_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    wx.EVT_COMBOBOX(self,GOALREFINEMENT_COMBOGOALDIMENSION_ID,self.onDimChange)
    wx.EVT_BUTTON(self,GOALREFINEMENT_BUTTONCOMMIT_ID,self.onCommit)
    self.commitLabel = 'Add'
    if (len(self.theGoal) > 0):
      self.commitLabel = 'Edit'
      self.SetLabel('Edit Goal Refinement')
      subGoalCtrl = self.FindWindowById(GOALREFINEMENT_COMBOGOAL_ID)
      subGoalCtrl.SetStringSelection(self.theGoal)
      dimCtrl = self.FindWindowById(GOALREFINEMENT_COMBOGOALDIMENSION_ID)
      dimCtrl.SetStringSelection(self.theGoalDimension)
      refCtrl = self.FindWindowById(GOALREFINEMENT_COMBOREFINEMENT_ID)
      refCtrl.SetStringSelection(self.theRefinement)
      altCtrl = self.FindWindowById(GOALREFINEMENT_COMBOALTERNATE_ID)
      altCtrl.SetStringSelection(self.theAlternateFlag)
      ratCtrl = self.FindWindowById(GOALREFINEMENT_TEXTRATIONALE_ID)
      ratCtrl.SetValue(self.theRationale)
      buttonCtrl = self.FindWindowById(GOALREFINEMENT_BUTTONCOMMIT_ID)
      buttonCtrl.SetLabel('Edit')
开发者ID:InvalidToken,项目名称:CAIRIS,代码行数:50,代码来源:GoalRefinementDialog.py

示例15: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildAddCancelButtonSizer [as 别名]
  def __init__(self,parent,setProperties,values):
    wx.Dialog.__init__(self,parent,armid.PROPERTY_ID,'Add Security Property',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(400,300))

    weights = {"Confidentiality":0,"Integrity":1,"Availability":2,"Accountability":3,"Anonymity":4,"Pseudonymity":5,"Unlinkability":6,"Unobservability":7}
    self.thePropertyName = ''
    self.thePropertyValue = ''
    self.thePropertyRationale = 'None'
    self.commitLabel = 'Add'
    mainSizer = wx.BoxSizer(wx.VERTICAL)
#    defaultProperties = set(['Confidentiality','Integrity','Availability','Accountability','Anonymity','Pseudonymity','Unlinkability','Unobservability'])
    defaultProperties = set(weights.keys())
    propertyList = sorted(list(defaultProperties.difference(setProperties)), key=lambda x:weights[x])
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Property',(87,30),armid.PROPERTY_COMBOPROPERTY_ID,propertyList),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Value',(87,30),armid.PROPERTY_COMBOVALUE_ID,values),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildMLTextSizer(self,'Rationale',(87,60),armid.PROPERTY_TEXTRATIONALE_ID),1,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,armid.PROPERTY_BUTTONADD_ID),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)
    wx.EVT_BUTTON(self,armid.PROPERTY_BUTTONADD_ID,self.onCommit)
开发者ID:RachelLar,项目名称:CAIRIS-web,代码行数:20,代码来源:PropertyDialog.py


注:本文中的WidgetFactory.buildAddCancelButtonSizer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。