本文整理汇总了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)
示例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)
示例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)
示例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)
示例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 = []
示例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)
示例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)
示例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)
示例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)
示例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)
示例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
示例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
示例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 = []
示例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)
示例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)