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


Python WidgetFactory.buildComboSizerList方法代码示例

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


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

示例1: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [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

示例2: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [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 buildComboSizerList [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

示例4: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [as 别名]
 def __init__(self, parent):
     wx.Panel.__init__(self, parent, armid.STEPSYNOPSIS_ID)
     b = Borg()
     self.dbProxy = b.dbProxy
     mainSizer = wx.BoxSizer(wx.VERTICAL)
     mainSizer.Add(
         WidgetFactory.buildTextSizer(self, "Synopsis", (87, 30), armid.STEPSYNOPSIS_TEXTSYNOPSIS_ID), 0, wx.EXPAND
     )
     actorSizer = wx.BoxSizer(wx.HORIZONTAL)
     mainSizer.Add(actorSizer, 0, wx.EXPAND)
     actorSizer.Add(
         WidgetFactory.buildComboSizerList(
             self, "Actor Type", (87, 30), armid.STEPSYNOPSIS_COMBOACTORTYPE_ID, ["asset", "role"]
         ),
         1,
         wx.EXPAND,
     )
     actorSizer.Add(
         WidgetFactory.buildComboSizerList(self, "Actor", (87, 30), armid.STEPSYNOPSIS_COMBOACTORNAME_ID, [""]),
         1,
         wx.EXPAND,
     )
     mainSizer.Add(wx.StaticText(self, -1, ""), 1, wx.EXPAND)
     mainSizer.Add(
         WidgetFactory.buildCommitButtonSizer(self, armid.STEPSYNOPSIS_BUTTONCOMMIT_ID, True), 0, wx.ALIGN_CENTER
     )
     self.SetSizer(mainSizer)
     wx.EVT_COMBOBOX(self, armid.STEPSYNOPSIS_COMBOACTORTYPE_ID, self.onActorType)
开发者ID:nix4,项目名称:CAIRIS,代码行数:30,代码来源:StepSynopsisPanel.py

示例5: buildControls

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [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

示例6: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [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

示例7: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [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

示例8: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [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

示例9: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [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

示例10: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [as 别名]
  def __init__(self,parent,envName):
    wx.Panel.__init__(self,parent,EXCEPTION_ID)
    b = Borg()
    self.dbProxy = b.dbProxy
    self.theEnvironmentName = envName
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Name',(87,30),EXCEPTION_TEXTNAME_ID),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildRadioButtonSizer(self,'Type',(87,30),[(EXCEPTION_RADIOGOAL_ID,'Goal'),(EXCEPTION_RADIOREQUIREMENT_ID,'Requirement')]))
    goalList = self.dbProxy.environmentGoals(self.theEnvironmentName)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Values',(87,30),EXCEPTION_COMBOGOALS_ID,goalList),0,wx.EXPAND)
    catList = ['Confidentiality Threat','Integrity Threat','Availability Threat','Accountability Threat','Anonymity Threat','Pseudonymity Threat','Unlinkability Threat','Unobservability Threat','Vulnerability','Duration','Frequency','Demands','Goal Support']
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Category',(87,30),EXCEPTION_COMBOCATEGORY_ID,catList),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildMLTextSizer(self,'Definition',(87,30),EXCEPTION_TEXTDEFINITION_ID),1,wx.EXPAND)
    self.SetSizer(mainSizer)

    wx.EVT_RADIOBUTTON(self,EXCEPTION_RADIOGOAL_ID,self.onGoalSelected)
    wx.EVT_RADIOBUTTON(self,EXCEPTION_RADIOREQUIREMENT_ID,self.onRequirementSelected)
开发者ID:AntonP1337,项目名称:cairis,代码行数:19,代码来源:ExceptionPanel.py

示例11: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [as 别名]
  def __init__(self,parent,ciName,elName,currentValue):
    wx.Dialog.__init__(self,parent,armid.CHARACTERISTICREFERENCETYPE_ID,'Edit Characteristic Reference Type',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(300,400))

    self.theElementName = elName
    self.theValue = currentValue
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Characteristic Reference Type',(87,30),armid.CHARACTERISTICREFERENCETYPE_COMBOVALUE_ID,['grounds','warrant','rebuttal']),0,wx.EXPAND)
    
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Characteristic Intention',(87,30),armid.CHARACTERISTICREFERENCETYPE_TEXTCHARINTENT_ID),0,wx.EXPAND)
    ciCtrl = self.FindWindowById(armid.CHARACTERISTICREFERENCETYPE_TEXTCHARINTENT_ID)
    ciCtrl.Disable()

    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Intention',(87,30),armid.CHARACTERISTICREFERENCETYPE_TEXTINTENTION_ID),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Intention Type',(87,30),armid.CHARACTERISTICREFERENCETYPE_COMBOINTTYPE_ID,['goal','softgoal']),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Means/End',(87,30),armid.CHARACTERISTICREFERENCETYPE_COMBOMEANSEND_ID,['means','end']),0,wx.EXPAND)
    contType = ['Make','SomePositive','Help','Hurt','SomeNegative','Break']
    mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Contribution',(87,30),armid.CHARACTERISTICREFERENCETYPE_COMBOCONTRIBUTION_ID,contType),0,wx.EXPAND)
  
    mainSizer.Add(wx.StaticText(self,-1,''),1,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildCommitButtonSizer(self,armid.CHARACTERISTICREFERENCETYPE_BUTTONCOMMIT_ID,False),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)
    wx.EVT_BUTTON(self,armid.CHARACTERISTICREFERENCETYPE_BUTTONCOMMIT_ID,self.onCommit)
    self.valueCtrl = self.FindWindowById(armid.CHARACTERISTICREFERENCETYPE_COMBOVALUE_ID)
    self.valueCtrl.SetValue(currentValue)

    self.ciCtrl = self.FindWindowById(armid.CHARACTERISTICREFERENCETYPE_TEXTCHARINTENT_ID)
    self.ciCtrl.SetValue(ciName)

    self.intCtrl = self.FindWindowById(armid.CHARACTERISTICREFERENCETYPE_TEXTINTENTION_ID)
    self.intTypeCtrl = self.FindWindowById(armid.CHARACTERISTICREFERENCETYPE_COMBOINTTYPE_ID)
    self.meCtrl = self.FindWindowById(armid.CHARACTERISTICREFERENCETYPE_COMBOMEANSEND_ID)
    self.contCtrl = self.FindWindowById(armid.CHARACTERISTICREFERENCETYPE_COMBOCONTRIBUTION_ID)

    b = Borg()
    intDetails = b.dbProxy.impliedCharacteristicElementIntention(ciName,elName)
    intName = intDetails[0]
    intDim = intDetails[1] 
    meName = intDetails[2]
    contName = intDetails[3]

    if intName != '':
      self.intCtrl.SetValue(intName)
      self.intTypeCtrl.SetValue(intDim)
      self.meCtrl.SetValue(meName)
      self.contCtrl.SetValue(contName) 
开发者ID:RachelLar,项目名称:CAIRIS-web,代码行数:47,代码来源:CharacteristicReferenceTypeDialog.py

示例12: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [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

示例13: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [as 别名]
 def __init__(self,parent,reqList,setTargets,envName):
   wx.Dialog.__init__(self,parent,PROPERTY_ID,'Add Target',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(400,250))
   b = Borg()
   self.dbProxy = b.dbProxy
   self.theTarget = ''
   self.theEffectiveness = ''
   self.theRationale = ''
   self.commitLabel = 'Add'
   mainSizer = wx.BoxSizer(wx.VERTICAL)
   self.theTargetDictionary = self.dbProxy.targetNames(reqList,envName)
   defaultTargets = set(self.theTargetDictionary.keys())
   targetList = list(defaultTargets.difference(setTargets))
   mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Target',(87,30),TARGET_COMBOTARGET_ID,targetList),0,wx.EXPAND)
   mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Effectiveness',(87,30),TARGET_COMBOEFFECTIVENESS_ID,['None','Low','Medium','High']),0,wx.EXPAND)
   mainSizer.Add(WidgetFactory.buildMLTextSizer(self,'Rationale',(87,60),TARGET_TEXTRATIONALE_ID),1,wx.EXPAND)
   mainSizer.Add(WidgetFactory.buildAddCancelButtonSizer(self,TARGET_BUTTONCOMMIT_ID),0,wx.ALIGN_CENTER)
   self.SetSizer(mainSizer)
   wx.EVT_BUTTON(self,TARGET_BUTTONCOMMIT_ID,self.onCommit)
开发者ID:InvalidToken,项目名称:CAIRIS,代码行数:20,代码来源:TargetDialog.py

示例14: buildControls

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [as 别名]
 def buildControls(self,isCreate):
   mainSizer = wx.BoxSizer(wx.VERTICAL)
   mainSizer.Add(WidgetFactory.buildTextSizer(self,'Name',(87,30),armid.ROLE_TEXTNAME_ID),0,wx.EXPAND)
   mainSizer.Add(WidgetFactory.buildTextSizer(self,'Short Code',(87,30),armid.ROLE_TEXTSHORTCODE_ID),0,wx.EXPAND)
   roleTypes = self.dbProxy.getDimensionNames('role_type')
   mainSizer.Add(WidgetFactory.buildComboSizerList(self,'Type',(87,30),armid.ROLE_COMBOTYPE_ID,roleTypes),0,wx.EXPAND)
   mainSizer.Add(WidgetFactory.buildMLTextSizer(self,'Description',(87,80),armid.ROLE_TEXTDESCRIPTION_ID),0,wx.EXPAND)
   mainSizer.Add(RoleEnvironmentPanel(self,self.dbProxy),1,wx.EXPAND)
   mainSizer.Add(WidgetFactory.buildCommitButtonSizer(self,armid.ROLE_BUTTONCOMMIT_ID,isCreate),0,wx.ALIGN_CENTER)
   self.SetSizer(mainSizer)
开发者ID:RachelLar,项目名称:CAIRIS-web,代码行数:12,代码来源:RolePanel.py

示例15: __init__

# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildComboSizerList [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


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