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


Python WidgetFactory类代码示例

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


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

示例1: __init__

    def __init__(self, parent):
        wx.Panel.__init__(self, parent, armid.GOAL_ID)
        b = Borg()
        self.dbProxy = b.dbProxy
        mainSizer = wx.BoxSizer(wx.VERTICAL)
        mainSizer.Add(WidgetFactory.buildTextSizer(self, "Name", (87, 30), armid.GOAL_TEXTNAME_ID), 0, wx.EXPAND)
        mainSizer.Add(
            WidgetFactory.buildTextSizer(self, "Originator", (87, 30), armid.GOAL_TEXTORIGINATOR_ID), 0, wx.EXPAND
        )
        self.nameCtrl = self.FindWindowById(armid.GOAL_TEXTNAME_ID)
        self.notebook = GoalEnvironmentNotebook(self, self.dbProxy, True)

        mainSizer.Add(self.notebook, 1, wx.EXPAND)
        mainSizer.Add(WidgetFactory.buildCommitButtonSizer(self, armid.GOAL_BUTTONCOMMIT_ID, True), 0, wx.CENTER)
        self.definitionCtrl = self.notebook.FindWindowById(armid.GOAL_TEXTDEFINITION_ID)
        self.categoryCtrl = self.notebook.FindWindowById(armid.GOAL_COMBOCATEGORY_ID)
        self.priorityCtrl = self.notebook.FindWindowById(armid.GOAL_COMBOPRIORITY_ID)
        self.fitCriterionCtrl = self.notebook.FindWindowById(armid.GOAL_TEXTFITCRITERION_ID)
        self.issueCtrl = self.notebook.FindWindowById(armid.GOAL_TEXTISSUE_ID)
        self.goalAssociationCtrl = self.notebook.FindWindowById(armid.GOAL_LISTGOALREFINEMENTS_ID)
        self.subGoalAssociationCtrl = self.notebook.FindWindowById(armid.GOAL_LISTSUBGOALREFINEMENTS_ID)
        self.cCtrl = self.notebook.FindWindowById(armid.GOAL_LISTCONCERNS_ID)
        self.caCtrl = self.notebook.FindWindowById(armid.GOAL_LISTCONCERNASSOCIATIONS_ID)
        self.ctCtrl = self.notebook.FindWindowById(armid.GOAL_COMBOCONTRIBUTIONTYPE_ID)
        self.SetSizer(mainSizer)
开发者ID:nix4,项目名称:CAIRIS,代码行数:25,代码来源:SingleGoalPanel.py

示例2: __init__

  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,代码行数:33,代码来源:ContributorEntryDialog.py

示例3: buildControls

 def buildControls(self):
   mainSizer = wx.BoxSizer(wx.VERTICAL)
   mainSizer.Add(WidgetFactory.buildTextSizer(self,'Name',(87,30),ENVIRONMENT_TEXTNAME_ID),0,wx.EXPAND)
   mainSizer.Add(WidgetFactory.buildTextSizer(self,'Short Code',(87,30),ENVIRONMENT_TEXTSHORTCODE_ID),0,wx.EXPAND)
   mainSizer.Add(WidgetFactory.buildMLTextSizer(self,'Description',(87,30),ENVIRONMENT_TEXTDESCRIPTION_ID),1,wx.EXPAND)
   mainSizer.Add(WidgetFactory.buildCommitButtonSizer(self,ENVIRONMENT_BUTTONCOMMIT_ID,True))
   self.SetSizer(mainSizer)
开发者ID:AntonP1337,项目名称:cairis,代码行数:7,代码来源:SingleEnvironmentPanel.py

示例4: __init__

  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,代码行数:31,代码来源:CodeRelationshipDialog.py

示例5: __init__

  def __init__(self,parent,dLabel,dName,dType,dDesc):
    wx.Dialog.__init__(self,parent,DIRECTORYENTRY_ID,'Directory Entry',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(500,300))
    mainSizer = wx.BoxSizer(wx.VERTICAL)

    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Label',(87,30),DIRECTORYENTRY_TEXTLABEL_ID),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Name',(87,30),DIRECTORYENTRY_TEXTNAME_ID),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Type',(87,30),DIRECTORYENTRY_TEXTTYPE_ID),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildMLTextSizer(self,'Description',(87,30),DIRECTORYENTRY_TEXTDESCRIPTION_ID),1,wx.EXPAND)

    buttonSizer = wx.BoxSizer(wx.ALIGN_CENTER)
    okButton = wx.Button(self,wx.ID_OK,'Ok')
    buttonSizer.Add(okButton)
    mainSizer.Add(buttonSizer,0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    labelCtrl = self.FindWindowById(DIRECTORYENTRY_TEXTLABEL_ID)
    labelCtrl.SetValue(dLabel)
    labelCtrl.Disable()
    nameCtrl = self.FindWindowById(DIRECTORYENTRY_TEXTNAME_ID)
    nameCtrl.SetValue(dName)
    nameCtrl.Disable()
    typeCtrl = self.FindWindowById(DIRECTORYENTRY_TEXTTYPE_ID)
    typeCtrl.SetValue(dType)
    typeCtrl.Disable()
    descCtrl = self.FindWindowById(DIRECTORYENTRY_TEXTDESCRIPTION_ID)
    descCtrl.SetValue(dDesc)
    descCtrl.Disable()
开发者ID:AntonP1337,项目名称:cairis,代码行数:27,代码来源:DirectoryEntryDialog.py

示例6: __init__

 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,代码行数:28,代码来源:StepSynopsisPanel.py

示例7: __init__

  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,代码行数:58,代码来源:AssetAssociationDialog.py

示例8: buildControls

 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,代码行数:10,代码来源:RolePanel.py

示例9: buildControls

  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,代码行数:25,代码来源:GoalAssociationDialog.py

示例10: __init__

  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,代码行数:11,代码来源:ChannelDialog.py

示例11: __init__

 def __init__(self,parent):
   wx.Dialog.__init__(self,parent,armid.NEWENVIRONMENT_ID,'New Environment',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(300,200))
   self.environmentName = ''
   self.environmentDescription = ''
   mainSizer = wx.BoxSizer(wx.VERTICAL)
   mainSizer.Add(WidgetFactory.buildTextSizer(self,'Name',(87,30),armid.NEWENVIRONMENT_TEXTNAME_ID),0,wx.EXPAND)
   mainSizer.Add(WidgetFactory.buildTextSizer(self,'Short Code',(87,30),armid.NEWENVIRONMENT_TEXTSHORTCODE_ID),0,wx.EXPAND)
   mainSizer.Add(WidgetFactory.buildMLTextSizer(self,'Description',(87,30),armid.NEWENVIRONMENT_TEXTDESCRIPTION_ID),1,wx.EXPAND)
   mainSizer.Add(WidgetFactory.buildCommitButtonSizer(self,armid.NEWENVIRONMENT_BUTTONCOMMIT_ID,True))
   self.SetSizer(mainSizer)
   wx.EVT_BUTTON(self,armid.NEWENVIRONMENT_BUTTONCOMMIT_ID,self.onCreate)
开发者ID:RachelLar,项目名称:CAIRIS-web,代码行数:11,代码来源:NewEnvironmentDialog.py

示例12: __init__

  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,代码行数:11,代码来源:RevisionEntryDialog.py

示例13: buildControls

  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,代码行数:11,代码来源:DomainDialog.py

示例14: buildControls

  def buildControls(self,isCreate = True):
    mainSizer = wx.BoxSizer(wx.VERTICAL)
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Name',(87,30),armid.MISUSECASE_TEXTNAME_ID,isReadOnly=True),0,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildTextSizer(self,'Risk',(87,30),armid.MISUSECASE_TEXTRISK_ID,isReadOnly=True),0,wx.EXPAND)
    thrSizer = wx.BoxSizer(wx.HORIZONTAL)

    self.environmentPanel = MisuseCaseEnvironmentPanel(self,self.dbProxy)
    mainSizer.Add(self.environmentPanel,1,wx.EXPAND)
    mainSizer.Add(WidgetFactory.buildCommitButtonSizer(self,armid.MISUSECASE_BUTTONCOMMIT_ID,isCreate),0,wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)

    self.nameCtrl = self.FindWindowById(armid.MISUSECASE_TEXTNAME_ID)
    self.riskCtrl = self.FindWindowById(armid.MISUSECASE_TEXTRISK_ID)
开发者ID:RachelLar,项目名称:CAIRIS-web,代码行数:13,代码来源:MisuseCasePanel.py

示例15: __init__

  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,代码行数:13,代码来源:CapabilityDialog.py


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