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


Python BasePanel.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
    def __init__(self, parent, goalName, obsName, envName):
        BasePanel.__init__(self, parent, GOALOBSTACLE_ID)
        self.theAssetId = None
        b = Borg()
        self.dbProxy = b.dbProxy

        mainSizer = wx.BoxSizer(wx.VERTICAL)
        mainSizer.Add(self.buildMLTextSizer("Goal", (87, 30), GOALOBSTACLE_TEXTGOAL_ID, True), 1, wx.EXPAND)
        mainSizer.Add(self.buildMLTextSizer("Obstacle", (87, 30), GOALOBSTACLE_TEXTOBSTACLE_ID, True), 1, wx.EXPAND)

        buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
        addButton = wx.Button(self, GOALOBSTACLE_BUTTONADD_ID, "Add")
        buttonSizer.Add(addButton)
        ignoreButton = wx.Button(self, GOALOBSTACLE_BUTTONIGNORE_ID, "Ignore")
        buttonSizer.Add(ignoreButton)
        mainSizer.Add(buttonSizer, 0, wx.CENTER)

        goalId = b.dbProxy.getDimensionId(goalName, "template_goal")
        envId = b.dbProxy.getDimensionId(envName, "environment")
        goalDef = b.dbProxy.templateGoalDefinition(goalId)
        goalCtrl = self.FindWindowById(GOALOBSTACLE_TEXTGOAL_ID)
        goalCtrl.SetValue(goalDef)

        obsId = b.dbProxy.getDimensionId(obsName, "obstacle")
        obsTuple = b.dbProxy.obstacleDefinition(obsId, envId)
        obsDef = obsTuple[0]
        obsCtrl = self.FindWindowById(GOALOBSTACLE_TEXTOBSTACLE_ID)
        obsCtrl.SetValue(obsDef)

        self.SetSizer(mainSizer)
开发者ID:failys,项目名称:cairis,代码行数:32,代码来源:GoalObstaclePanel.py

示例2: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
  def __init__(self,parent):
    BasePanel.__init__(self,parent,USECASE_ID)
    b = Borg()
    self.dbProxy = b.dbProxy
    mainSizer = wx.BoxSizer(wx.VERTICAL)

    summBoxSizer = wx.BoxSizer(wx.HORIZONTAL)
    mainSizer.Add(summBoxSizer,0,wx.EXPAND)
    summBoxSizer.Add(self.buildTextSizer('Name',(87,30),USECASE_TEXTNAME_ID),1,wx.EXPAND)
    summBoxSizer.Add(self.buildTextSizer('Code',(87,30),USECASE_TEXTSHORTCODE_ID),1,wx.EXPAND)
    mainSizer.Add(self.buildTagCtrlSizer((87,30),USECASE_TAGS_ID),0,wx.EXPAND)
    mainSizer.Add(self.buildTextSizer('Author/s',(87,30),USECASE_TEXTAUTHOR_ID),0,wx.EXPAND)

    objtBoxSizer = wx.BoxSizer(wx.HORIZONTAL)
    mainSizer.Add(objtBoxSizer,0,wx.EXPAND)
    objtBoxSizer.Add(self.buildMLTextSizer('Description',(87,60),USECASE_TEXTDESCRIPTION_ID),1,wx.EXPAND)

    roleBox = wx.StaticBox(self)
    roleSizer = wx.StaticBoxSizer(roleBox,wx.HORIZONTAL)
    self.roleList = DimensionListCtrl(self,USECASE_LISTACTORS_ID,wx.DefaultSize,'Actor','role',self.dbProxy)
    roleSizer.Add(self.roleList,1,wx.EXPAND)
    objtBoxSizer.Add(roleSizer,1,wx.EXPAND)

    self.environmentPanel = UseCaseEnvironmentPanel(self)
    mainSizer.Add(self.environmentPanel,1,wx.EXPAND)
    self.SetSizer(mainSizer)
开发者ID:InvalidToken,项目名称:CAIRIS,代码行数:28,代码来源:UseCasePanel.py

示例3: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
  def __init__(self,parent,isCreate):
    BasePanel.__init__(self,parent,armid.IMPLIEDPROCESS_ID)
    b = Borg()
    self.dbProxy = b.dbProxy
    self.theSelectedSet = set([])
    self.theGraphName = 'impliedProc'

    mainSizer = wx.BoxSizer(wx.VERTICAL)
    personas = self.dbProxy.getDimensionNames('persona')
    mainSizer.Add(self.buildComboSizerList('Persona',(87,30),armid.IMPLIEDPROCESS_COMBOPERSONA_ID,personas),0,wx.EXPAND)

    cnBox = wx.StaticBox(self,-1,'Code Network')
    cnSizer = wx.StaticBoxSizer(cnBox,wx.HORIZONTAL)
    mainSizer.Add(cnSizer,1,wx.EXPAND)
    self.codeNetView = CodeNetworkView(self,armid.IMPLIEDPROCESS_IMAGENETWORK_ID,self.theGraphName)

    cnSizer.Add(self.codeNetView,1,wx.EXPAND)

    idnSizer = wx.BoxSizer(wx.HORIZONTAL)
    mainSizer.Add(idnSizer,1,wx.EXPAND)
    idnSizer.Add(ImpliedProcessNotebook(self),1,wx.EXPAND)

    self.codeRelationships = self.FindWindowById(armid.IMPLIEDPROCESS_LISTRELATIONSHIPS_ID)
    self.codeRelationships.Bind(wx.EVT_LIST_ITEM_SELECTED,self.onRelationshipAdded)
    self.codeRelationships.Bind(wx.EVT_LIST_ITEM_DESELECTED,self.onRelationshipRemoved)

    self.personaCtrl = self.FindWindowById(armid.IMPLIEDPROCESS_COMBOPERSONA_ID)
    self.personaCtrl.Bind(wx.EVT_COMBOBOX,self.onPersonaChange)

    mainSizer.Add(self.buildCommitButtonSizer(armid.IMPLIEDPROCESS_BUTTONCOMMIT_ID,isCreate),0,wx.ALIGN_CENTER)

    self.SetSizer(mainSizer)
开发者ID:nix4,项目名称:CAIRIS,代码行数:34,代码来源:ImpliedProcessPanel.py

示例4: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
 def __init__(self, parent, cvName):
     BasePanel.__init__(self, parent, WEAKNESSTREATMENT_ID)
     self.theViewName = cvName
     b = Borg()
     self.dbProxy = b.dbProxy
     self.theGoalIndicator = 0
     reqList = self.dbProxy.componentViewRequirements(cvName)
     assetList = []
     effValues = ["None", "Low", "Medium", "High"]
     mainSizer = wx.BoxSizer(wx.VERTICAL)
     mainSizer.Add(
         self.buildRadioButtonSizer(
             "Type",
             (87, 30),
             [(WEAKNESSTREATMENT_RADIOGOAL_ID, "Goal"), (WEAKNESSTREATMENT_RADIOREQUIREMENT_ID, "Requirement")],
         )
     )
     mainSizer.Add(self.buildComboSizerList("", (87, 30), WEAKNESSTREATMENT_COMBOREQGOAL_ID, reqList), 0, wx.EXPAND)
     mainSizer.Add(
         self.buildComboSizerList("Asset", (87, 30), WEAKNESSTREATMENT_COMBOASSET_ID, assetList), 0, wx.EXPAND
     )
     mainSizer.Add(
         self.buildComboSizerList("Effectiveness", (87, 30), WEAKNESSTREATMENT_COMBOEFFECTIVENESS_ID, effValues),
         0,
         wx.EXPAND,
     )
     mainSizer.Add(self.buildMLTextSizer("Rationale", (87, 60), WEAKNESSTREATMENT_TEXTRATIONALE_ID), 1, wx.EXPAND)
     mainSizer.Add(self.buildCommitButtonSizer(WEAKNESSTREATMENT_BUTTONCOMMIT_ID, False), 0, wx.CENTER)
     self.SetSizer(mainSizer)
     reqCtrl = self.FindWindowById(WEAKNESSTREATMENT_COMBOREQGOAL_ID)
     reqCtrl.Bind(wx.EVT_COMBOBOX, self.onRequirementChange)
     wx.EVT_RADIOBUTTON(self, WEAKNESSTREATMENT_RADIOGOAL_ID, self.onGoalSelected)
     wx.EVT_RADIOBUTTON(self, WEAKNESSTREATMENT_RADIOREQUIREMENT_ID, self.onRequirementSelected)
     reqRadioCtrl = self.FindWindowById(WEAKNESSTREATMENT_RADIOREQUIREMENT_ID)
     reqRadioCtrl.SetValue(True)
开发者ID:failys,项目名称:cairis,代码行数:37,代码来源:WeaknessTreatmentPanel.py

示例5: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
 def __init__(self,parent):
   BasePanel.__init__(self,parent,armid.RISK_ID)
   b = Borg()
   self.dbProxy = b.dbProxy
   self.theThreats = self.dbProxy.getDimensions('threat')
   self.theVulnerabilities = self.dbProxy.getDimensions('vulnerability')
   self.detailsList = []
开发者ID:RachelLar,项目名称:CAIRIS-web,代码行数:9,代码来源:RiskPanel.py

示例6: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
  def __init__(self,parent,personaName,codeNet):
    BasePanel.__init__(self,parent,armid.CODENETWORK_ID)
    b = Borg()
    self.dbProxy = b.dbProxy
    self.theCodeNetwork = codeNet

    self.theViewMenu = wx.Menu()
    self.theViewMenu.Append(armid.CNV_MENU_ADD_ID,'Add')
    self.theViewMenu.Append(armid.CNV_MENU_EDIT_ID,'Edit')
    wx.EVT_MENU(self,armid.CNV_MENU_ADD_ID,self.onAddRelationship)
    wx.EVT_MENU(self,armid.CNV_MENU_EDIT_ID,self.onEditRelationship)

    mainSizer = wx.BoxSizer(wx.VERTICAL)
    personas = self.dbProxy.getDimensionNames('persona')
    mainSizer.Add(self.buildComboSizerList('Persona',(87,30),armid.CODENETWORK_COMBOPERSONA_ID,personas),0,wx.EXPAND)

    cnBox = wx.StaticBox(self,-1,'Code Network')
    cnSizer = wx.StaticBoxSizer(cnBox,wx.HORIZONTAL)
    mainSizer.Add(cnSizer,1,wx.EXPAND)
    self.codeNetView = CodeNetworkView(self,armid.CODENETWORK_IMAGENETWORK_ID)
    self.codeNetView.Bind(wx.EVT_RIGHT_DOWN,self.onRightDown)
    self.codeNetView.reloadImage()
    cnSizer.Add(self.codeNetView,1,wx.EXPAND)

    self.personaCtrl = self.FindWindowById(armid.CODENETWORK_COMBOPERSONA_ID)
    self.personaCtrl.SetValue(personaName)
    self.personaCtrl.Bind(wx.EVT_COMBOBOX,self.onPersonaChange)
    self.SetSizer(mainSizer)
开发者ID:RachelLar,项目名称:CAIRIS-web,代码行数:30,代码来源:CodeNetworkPanel.py

示例7: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
 def __init__(self,parent):
   BasePanel.__init__(self,parent,-1)
   topSizer = wx.BoxSizer(wx.VERTICAL)
   topSizer.Add(self.buildTextSizer('Name',(87,30),CODE_TEXTNAME_ID),0,wx.EXPAND)
   topSizer.Add(self.buildComboSizerList('Type',(87,30),CODE_COMBOTYPE_ID,['event','context']),0,wx.EXPAND)
   topSizer.Add(self.buildMLTextSizer('Description',(87,30),CODE_TEXTDESCRIPTION_ID),1,wx.EXPAND)
   topSizer.Add(self.buildCloseButtonSizer(),0,wx.EXPAND)
   self.SetSizer(topSizer)
开发者ID:AntonP1337,项目名称:cairis,代码行数:10,代码来源:CodeNotebook.py

示例8: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
 def __init__(self, parent):
     BasePanel.__init__(self, parent, -1)
     topSizer = wx.BoxSizer(wx.VERTICAL)
     topSizer.Add(self.buildTextSizer("Name", (87, 30), armid.CODE_TEXTNAME_ID), 0, wx.EXPAND)
     topSizer.Add(
         self.buildComboSizerList("Type", (87, 30), armid.CODE_COMBOTYPE_ID, ["event", "context"]), 0, wx.EXPAND
     )
     topSizer.Add(self.buildMLTextSizer("Description", (87, 30), armid.CODE_TEXTDESCRIPTION_ID), 1, wx.EXPAND)
     self.SetSizer(topSizer)
开发者ID:nix4,项目名称:CAIRIS,代码行数:11,代码来源:CodeNotebook.py

示例9: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
 def __init__(self,parent):
   BasePanel.__init__(self,parent,-1)
   topSizer = wx.BoxSizer(wx.VERTICAL)
   topSizer.Add(self.buildTextSizer('Code',(87,30),QUOTATION_TEXTCODE_ID,'',True),0,wx.EXPAND)
   artBoxSizer = wx.BoxSizer(wx.HORIZONTAL)
   topSizer.Add(artBoxSizer,0,wx.EXPAND)
   artBoxSizer.Add(self.buildTextSizer('Artifact Type',(87,30),QUOTATION_TEXTARTIFACTTYPE_ID,'',True),1,wx.EXPAND)
   artBoxSizer.Add(self.buildTextSizer('Name',(87,30),QUOTATION_TEXTARTIFACTNAME_ID,'',True),1,wx.EXPAND)
   topSizer.Add(self.buildMLTextSizer('Source',(87,30),QUOTATION_TEXTSOURCE_ID),1,wx.EXPAND)
   self.SetSizer(topSizer)
开发者ID:InvalidToken,项目名称:CAIRIS,代码行数:12,代码来源:QuotationNotebook.py

示例10: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
  def __init__(self,parent):
    BasePanel.__init__(self,parent,TRACEABILITY_ID)
    b = Borg()
    self.dbProxy = b.dbProxy
    self.traces = self.dbProxy.riskAnalysisModel(initContxt)

    mainSizer = wx.BoxSizer(wx.VERTICAL)
    columnList = ['From','Name','To','Name']
    mainSizer.Add(self.buildTraceListCtrl(self,TRACEABILITY_LISTTRACES_ID,columnList,self.traces),1,wx.EXPAND)
    mainSizer.Add(self.buildAddDeleteCloseButtonSizer(self,TRACEABILITY_BUTTONADD_ID,TRACEABILITY_BUTTONDELETE_ID,wx.HORIZONTAL),0,wx.EXPAND | wx.ALIGN_CENTER)
    self.SetSizer(mainSizer)
开发者ID:AntonP1337,项目名称:cairis,代码行数:13,代码来源:TraceabilityPanel.py

示例11: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
 def __init__(self, parent, appl, controller):
     '''
     Constructor
     '''
     DebugLog.info_print("Construct main Panel")
     self.hide_show = True
     BasePanel.__init__(self, parent, appl, controller)
     self.pack()
     self.msg_decoder = MsgCodec()
     self.after(2000, self.updateUI)
     self.call_count = 0
开发者ID:xhan-shannon,项目名称:SystemControlView,代码行数:13,代码来源:mainPanel.py

示例12: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
 def __init__(self,parent,responseType,panel):
   BasePanel.__init__(self,parent,armid.RESPONSE_ID)
   b = Borg()
   self.dbProxy = b.dbProxy
   self.theResponseName = ''
   self.theRiskName = ''
   self.theTags = []
   self.theCommitVerb = 'Create'
   self.environmentPanel = panel(self,self.dbProxy)
   self.theEnvironmentProperties = []
   self.theResponseVerb = responseType
开发者ID:RobinQuetin,项目名称:CAIRIS,代码行数:13,代码来源:ResponsePanel.py

示例13: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
 def __init__(self,parent):
   BasePanel.__init__(self,parent,COUNTERMEASURE_ID)
   b = Borg()
   self.dbProxy = b.dbProxy
   self.theCountermeasureName = ''
   self.theTags = []
   self.theCountermeasureDescription = ''
   self.theCountermeasureType = ''
   self.theCommitVerb = 'Create'
   self.environmentPanel = CountermeasureEnvironmentPanel(self,self.dbProxy)
   self.theEnvironmentProperties = []
开发者ID:AntonP1337,项目名称:cairis,代码行数:13,代码来源:CountermeasurePanel.py

示例14: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
 def __init__(self,parent,goalName,goalDef,goalCat,goalPri,goalFc,goalIssue,goalOrig,goalAssets,envName):
   BasePanel.__init__(self,parent,armid.GOAL_ID)
   mainSizer = wx.BoxSizer(wx.VERTICAL)
   mainSizer.Add(self.buildTextSizer('Name',(87,30),armid.GOAL_TEXTNAME_ID),0,wx.EXPAND)
   mainSizer.Add(self.buildTextSizer('Originator',(87,30),armid.GOAL_TEXTORIGINATOR_ID),0,wx.EXPAND)
   self.environmentPanel = ReqToGoalEnvironmentPanel(self,goalDef,goalCat,goalPri,goalFc,goalIssue,goalAssets,envName)
   mainSizer.Add(self.environmentPanel,1,wx.EXPAND)
   mainSizer.Add(self.buildCommitButtonSizer(armid.GOAL_BUTTONCOMMIT_ID,True),0,wx.CENTER)
   origCtrl = self.FindWindowById(armid.GOAL_TEXTORIGINATOR_ID)
   origCtrl.SetValue(goalOrig)
   self.SetSizer(mainSizer)
开发者ID:RachelLar,项目名称:CAIRIS-web,代码行数:13,代码来源:ReqToGoalPanel.py

示例15: __init__

# 需要导入模块: from BasePanel import BasePanel [as 别名]
# 或者: from BasePanel.BasePanel import __init__ [as 别名]
  def __init__(self,parent,pName,fromCode,toCode,rtName):
    BasePanel.__init__(self,parent,IMPLIEDCHARACTERISTIC_ID)
    b = Borg()
    self.dbProxy = b.dbProxy
    
    charName = ''
    qualName = 'Unknown'
    varName = 'Intrinsic'

    try:
      charName,qualName,varName = self.dbProxy.impliedCharacteristic(pName,fromCode,toCode,rtName)
    except NoImpliedCharacteristic, e:
      self.dbProxy.initialiseImpliedCharacteristic(pName,fromCode,toCode,rtName)
开发者ID:InvalidToken,项目名称:CAIRIS,代码行数:15,代码来源:ImpliedCharacteristicPanel.py


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