本文整理汇总了Python中NDImplementationDecorator.NDImplementationDecorator.updateTextCtrl方法的典型用法代码示例。如果您正苦于以下问题:Python NDImplementationDecorator.updateTextCtrl方法的具体用法?Python NDImplementationDecorator.updateTextCtrl怎么用?Python NDImplementationDecorator.updateTextCtrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NDImplementationDecorator.NDImplementationDecorator
的用法示例。
在下文中一共展示了NDImplementationDecorator.updateTextCtrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class ThreatNodeDialog:
def __init__(self,objt,environmentName,dupProperty,overridingEnvironment,builder):
self.window = builder.get_object("ThreatNodeDialog")
self.decorator = NDImplementationDecorator(builder)
self.decorator.updateTextCtrl("threatNameCtrl",objt.name())
self.decorator.updateTextCtrl("threatTypeCtrl",objt.type())
self.decorator.updateTextCtrl("threatLikelihoodCtrl",objt.likelihood(environmentName,dupProperty,overridingEnvironment))
self.decorator.updateMLTextCtrl("threatMethodCtrl",objt.method())
attackers = []
for attacker in objt.attackers(environmentName,dupProperty):
attackers.append([attacker])
self.decorator.updateListCtrl("threatAttackersCtrl",['Attacker'],gtk.ListStore(str),attackers)
assets = []
for asset in objt.assets(environmentName,dupProperty):
assets.append([asset])
self.decorator.updateListCtrl("threatAssetsCtrl",['Asset'],gtk.ListStore(str),assets)
self.decorator.updateListCtrl("threatPropertiesCtrl",['Property','Value'],gtk.ListStore(str,str),objt.propertyList(environmentName,dupProperty,overridingEnvironment))
self.window.resize(350,350)
def on_threatOkButton_clicked(self,callback_data):
self.window.destroy()
def show(self):
self.window.show()
示例2: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class TaskNodeDialog:
def __init__(self,objt,environmentName,dupProperty,overridingEnvironment,builder):
self.window = builder.get_object("TaskNodeDialog")
self.decorator = NDImplementationDecorator(builder)
taskName = objt.name()
self.decorator.updateTextCtrl("taskNameCtrl",taskName)
self.decorator.updateTextCtrl("taskObjectiveCtrl",objt.objective())
self.decorator.updateMLTextCtrl("taskDependenciesCtrl",objt.dependencies(environmentName,dupProperty))
personas = []
for persona in objt.personas(environmentName,dupProperty,overridingEnvironment):
personas.append([persona[0],persona[1],persona[2],persona[3],persona[4]])
self.decorator.updateListCtrl("taskPersonasCtrl",['Persona','Duration','Frequency','Demands','Goal conflict'],gtk.ListStore(str,str,str,str,str),personas)
assets = []
for asset in objt.assets(environmentName,dupProperty):
assets.append([asset])
self.decorator.updateListCtrl("taskAssetsCtrl",['Asset'],gtk.ListStore(str),assets)
b = Borg()
proxy = b.dbProxy
self.decorator.updateTextCtrl("taskUsabilityCtrl",str(proxy.taskUsabilityScore(taskName,environmentName)))
taskId = proxy.getDimensionId(taskName,'task')
environmentId = proxy.getDimensionId(environmentName,'environment')
self.decorator.updateTextCtrl("taskTaskLoadCtrl",str(proxy.taskLoad(taskId,environmentId)))
self.decorator.updateTextCtrl("taskCountermeasureLoadCtrl",str(proxy.countermeasureLoad(taskId,environmentId)))
self.decorator.updateMLTextCtrl("taskNarrativeCtrl",objt.narrative(environmentName,dupProperty))
self.window.resize(350,300)
def on_taskOkButton_clicked(self,callback_data):
self.window.destroy()
def show(self):
self.window.show()
示例3: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class PersonaNodeDialog:
def __init__(self,objt,environmentName,dupProperty,overridingEnvironment,builder):
self.window = builder.get_object("PersonaNodeDialog")
self.decorator = NDImplementationDecorator(builder)
self.decorator.updateTextCtrl("personaNameCtrl",objt.name())
self.decorator.updateMLTextCtrl("personaActivitiesCtrl",objt.activities())
self.decorator.updateMLTextCtrl("personaAttitudesCtrl",objt.attitudes())
self.decorator.updateMLTextCtrl("personaAptitudesCtrl",objt.aptitudes())
self.decorator.updateMLTextCtrl("personaMotivationsCtrl",objt.motivations())
self.decorator.updateMLTextCtrl("personaSkillsCtrl",objt.skills())
self.decorator.updateImageCtrl("personaImageCtrl",objt.image())
self.decorator.updateTextCtrl("personaDirectCtrl",objt.directFlag(environmentName,dupProperty))
roles = []
for role in objt.roles(environmentName,dupProperty):
roles.append([role])
self.decorator.updateListCtrl("personaRolesCtrl",['Role'],gtk.ListStore(str),roles)
self.decorator.updateMLTextCtrl("personaNarrativeCtrl",objt.narrative(environmentName,dupProperty))
self.window.resize(400,400)
def on_personaOkButton_clicked(self,callback_data):
self.window.destroy()
def show(self):
self.window.show()
示例4: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class ComponentNodeDialog:
def __init__(self,objt,builder):
self.window = builder.get_object("ComponentNodeDialog")
self.decorator = NDImplementationDecorator(builder)
componentName = objt.name()
self.decorator.updateTextCtrl("componentNameCtrl",componentName)
self.decorator.updateMLTextCtrl("componentDescriptionCtrl",objt.description())
cifs = []
for cif in objt.interfaces():
cifs.append([cif[0],cif[1]])
self.decorator.updateListCtrl("componentInterfacesCtrl",['Name','Type'],gtk.ListStore(str,str),cifs)
cStructure = []
for csRow in objt.structure():
cStructure.append([csRow[0],csRow[1],csRow[2],csRow[3],csRow[4],csRow[5],csRow[6],csRow[7],csRow[8],csRow[9]])
self.decorator.updateListCtrl("componentStructureCtrl",['Head Asset','Type','Nav','Nry','Role','Tail Role','Tail Nry','Tail Nav','Tail Type','Tail Asset'],gtk.ListStore(str,str,str,str,str,str,str,str,str,str),cStructure)
reqs = []
for req in objt.requirements():
reqs.append([req])
self.decorator.updateListCtrl("componentRequirementsCtrl",['Name'],gtk.ListStore(str),reqs)
self.window.resize(350,300)
def on_componentOkButton_clicked(self,callback_data):
self.window.destroy()
def show(self):
self.window.show()
示例5: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class AttackerNodeDialog:
def __init__(self,objt,environmentName,dupProperty,overridingEnvironment,builder):
self.window = builder.get_object("AttackerNodeDialog")
self.decorator = NDImplementationDecorator(builder)
self.decorator.updateTextCtrl("attackerNameCtrl",objt.name())
roles = []
for role in objt.roles(environmentName,dupProperty):
roles.append([role])
self.decorator.updateListCtrl("attackerRolesCtrl",['Role'],gtk.ListStore(str),roles)
capabilities = []
for cap,value in objt.capability(environmentName,dupProperty):
capabilities.append([cap,value])
self.decorator.updateListCtrl("attackerCapabilityCtrl",['Capability','Value'],gtk.ListStore(str,str),capabilities)
motives = []
for motive in objt.motives(environmentName,dupProperty):
motives.append([motive])
self.decorator.updateListCtrl("attackerMotiveCtrl",['Motive'],gtk.ListStore(str),motives)
self.decorator.updateMLTextCtrl("attackerDescriptionCtrl",objt.description())
self.window.resize(350,300)
def on_attackerOkButton_clicked(self,callback_data):
self.window.destroy()
def show(self):
self.window.show()
示例6: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class DocumentReferenceNodeDialog:
def __init__(self,refName,docName,docExc,builder):
self.window = builder.get_object("DocumentReferenceNodeDialog")
self.decorator = NDImplementationDecorator(builder)
self.decorator.updateTextCtrl("documentReferenceNameCtrl",refName)
self.decorator.updateTextCtrl("documentReferenceDocumentCtrl",docName)
self.decorator.updateMLTextCtrl("documentReferenceExcerptCtrl",docExc)
self.window.resize(350,200)
def on_documentReferenceOkButton_clicked(self,callback_data):
self.window.destroy()
def show(self):
self.window.show()
示例7: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class DomainPropertyNodeDialog:
def __init__(self, objt, environmentName, dupProperty, overridingEnvironment, builder):
self.window = builder.get_object("DomainPropertyNodeDialog")
self.decorator = NDImplementationDecorator(builder)
self.decorator.updateTextCtrl("domainPropertyNameCtrl", objt.name())
self.decorator.updateTextCtrl("domainPropertyTypeCtrl", objt.type())
self.decorator.updateMLTextCtrl("domainPropertyDescriptionCtrl", objt.description())
self.window.resize(200, 200)
def on_roleOkButton_clicked(self, callback_data):
self.window.destroy()
def show(self):
self.window.show()
示例8: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class AcceptNodeDialog:
def __init__(self,objt,environmentName,dupProperty,overridingEnvironment,builder):
self.window = builder.get_object("AcceptNodeDialog")
self.decorator = NDImplementationDecorator(builder)
self.decorator.updateTextCtrl("acceptNameCtrl",objt.name())
self.decorator.updateTextCtrl("acceptRiskCtrl",objt.risk())
self.decorator.updateTextCtrl("acceptCostCtrl",objt.cost(environmentName,dupProperty,overridingEnvironment))
self.decorator.updateMLTextCtrl("acceptRationaleCtrl",objt.description(environmentName,dupProperty,overridingEnvironment))
self.window.resize(300,300)
def on_acceptOkButton_clicked(self,callback_data):
self.window.destroy()
def show(self):
self.window.show()
示例9: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class DomainNodeDialog:
def __init__(self,objt,builder):
self.window = builder.get_object("DomainNodeDialog")
self.decorator = NDImplementationDecorator(builder)
self.decorator.updateTextCtrl("domainNameCtrl",objt.name())
self.decorator.updateTextCtrl("domainTypeCtrl",objt.type())
self.decorator.updateTextCtrl("domainShortCodeCtrl",objt.shortCode())
self.decorator.updateMLTextCtrl("domainDescriptionCtrl",objt.description())
self.window.resize(350,350)
def on_assetOkButton_clicked(self,callback_data):
self.window.destroy()
def show(self):
self.window.show()
示例10: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class AssetNodeDialog:
def __init__(self,objt,environmentName,dupProperty,overridingEnvironment,builder):
self.window = builder.get_object("AssetNodeDialog")
self.decorator = NDImplementationDecorator(builder)
self.decorator.updateTextCtrl("assetNameCtrl",objt.name())
self.decorator.updateMLTextCtrl("assetDescriptionCtrl",objt.description())
self.decorator.updateMLTextCtrl("assetSignificanceCtrl",objt.significance())
self.decorator.updateListCtrl("assetPropertiesCtrl",['Property','Value'],gtk.ListStore(str,str),objt.propertyList(environmentName,dupProperty,overridingEnvironment))
self.window.resize(350,350)
def on_assetOkButton_clicked(self,callback_data):
self.window.destroy()
def show(self):
self.window.show()
示例11: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class ConceptReferenceNodeDialog:
def __init__(self,refName,dimName,objtName,refDesc,builder):
self.window = builder.get_object("ConceptReferenceNodeDialog")
self.decorator = NDImplementationDecorator(builder)
self.decorator.updateTextCtrl("conceptReferenceNameCtrl",refName)
self.decorator.updateTextCtrl("conceptReferenceTypeCtrl",dimName)
self.decorator.updateTextCtrl("conceptReferenceArtifactCtrl",objtName)
self.decorator.updateMLTextCtrl("conceptReferenceDescriptionCtrl",refDesc)
self.window.resize(350,200)
def on_conceptReferenceOkButton_clicked(self,callback_data):
self.window.destroy()
def show(self):
self.window.show()
示例12: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class UseCaseNodeDialog:
def __init__(self,objt,environmentName,dupProperty,overridingEnvironment,builder):
self.window = builder.get_object("UseCaseNodeDialog")
self.decorator = NDImplementationDecorator(builder)
self.theSteps = objt.steps(environmentName)
ucName = objt.name()
self.decorator.updateTextCtrl("usecaseNameCtrl",ucName)
self.decorator.updateMLTextCtrl("usecaseDescriptionCtrl",objt.description())
actors = []
for actor in objt.actors():
actors.append([actor])
self.decorator.updateListCtrl("usecaseActorsCtrl",['Actor'],gtk.ListStore(str),actors)
self.decorator.updateMLTextCtrl("usecasePreconditionsCtrl",objt.preconditions(environmentName))
steps = []
for s in self.theSteps:
steps.append([s])
self.decorator.updateListCtrl("usecaseStepsCtrl",['Step'],gtk.ListStore(str),steps)
stepExceptions = (self.theSteps[0]).exceptions()
excs = []
for e in stepExceptions:
excs.append([e])
self.decorator.updateListCtrl("usecaseExceptionCtrl",['Exception'],gtk.ListStore(str),excs)
self.decorator.updateMLTextCtrl("usecasePostconditionsCtrl",objt.postconditions(environmentName))
self.window.resize(350,300)
def on_usecaseOkButton_clicked(self,callback_data):
self.window.destroy()
def on_usecaseStepsCtrl_row_activated(self,widget,idx,callback_data):
stepNo = idx[0]
print 'move_cursor:',widget,' ',stepNo
stepExceptions = (self.theSteps[stepNo]).exceptions()
excs = []
for e in stepExceptions:
excs.append([e])
self.decorator.updateListCtrl("usecaseExceptionCtrl",['Exception'],gtk.ListStore(str),excs)
def show(self):
self.window.show()
示例13: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class LinkAndNodeDialog:
def __init__(self,objt,environmentName,dupProperty,overridingEnvironment,builder):
self.window = builder.get_object("LinkAndNodeDialog")
self.decorator = NDImplementationDecorator(builder)
self.decorator.updateTextCtrl("goalNameCtrl",objt.name())
self.decorator.updateMLTextCtrl("goalDefinitionCtrl",objt.definition(environmentName,dupProperty))
self.decorator.updateTextCtrl("goalCategoryCtrl",objt.category(environmentName,dupProperty))
self.decorator.updateTextCtrl("goalPriorityCtrl",objt.priority(environmentName,dupProperty))
self.decorator.updateMLTextCtrl("goalFitCriterionCtrl",objt.fitCriterion(environmentName,dupProperty))
self.decorator.updateMLTextCtrl("goalIssueCtrl",objt.issue(environmentName,dupProperty))
self.window.resize(350,600)
def on_goalOkButton_clicked(self,callback_data):
self.window.destroy()
def show(self):
self.window.show()
示例14: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class VulnerabilityNodeDialog:
def __init__(self,objt,environmentName,dupProperty,overridingEnvironment,builder):
self.window = builder.get_object("VulnerabilityNodeDialog")
self.decorator = NDImplementationDecorator(builder)
self.decorator.updateTextCtrl("vulnerabilityNameCtrl",objt.name())
self.decorator.updateTextCtrl("vulnerabilityTypeCtrl",objt.type())
self.decorator.updateTextCtrl("vulnerabilitySeverityCtrl",objt.severity(environmentName,dupProperty,overridingEnvironment))
self.decorator.updateMLTextCtrl("vulnerabilityDescriptionCtrl",objt.description())
assets = []
for asset in objt.assets(environmentName,dupProperty):
assets.append([asset])
self.decorator.updateListCtrl("vulnerabilityAssetsCtrl",['Asset'],gtk.ListStore(str),assets)
self.window.resize(300,325)
def on_vulnerabilityOkButton_clicked(self,callback_data):
self.window.destroy()
def show(self):
self.window.show()
示例15: __init__
# 需要导入模块: from NDImplementationDecorator import NDImplementationDecorator [as 别名]
# 或者: from NDImplementationDecorator.NDImplementationDecorator import updateTextCtrl [as 别名]
class RiskNodeDialog:
def __init__(self,objt,rating,environmentName,builder):
self.builder = builder
self.window = self.builder.get_object("RiskNodeDialog")
self.decorator = NDImplementationDecorator(builder)
self.decorator.updateTextCtrl("riskNameCtrl",objt.name())
self.decorator.updateTextCtrl("riskThreatCtrl",objt.threat())
self.detailsDict = {}
self.decorator.updateTextCtrl("riskVulnerabilityCtrl",objt.vulnerability())
self.decorator.updateTextCtrl("riskRatingCtrl",rating)
b = Borg()
proxy = b.dbProxy
riskDetails = []
riskScores = proxy.riskScore(objt.threat(),objt.vulnerability(),environmentName,objt.name())
for idx,riskScore in enumerate(riskScores):
riskDetails.append([riskScore[0],riskScore[1]])
self.detailsDict[riskScore[0]] = riskScore[2]
self.decorator.updateListCtrl("riskScoreCtrl",['Response','Score'],gtk.ListStore(str,str),riskDetails)
self.defaultSize = self.window.get_size()
detailsCtrlWindow = self.builder.get_object("riskDetailsCtrl")
detailsCtrlWindow.hide()
def on_riskOkButton_clicked(self,callback_data):
self.window.destroy()
def on_riskDetailsButton_clicked(self,callback_data):
detailsButton = self.builder.get_object("riskDetailsButton")
detailsCtrlWindow = self.builder.get_object("riskDetailsCtrl")
label = detailsButton.get_label()
if (label == 'Show Details'):
detailsButton.set_label('Hide Details')
detailsCtrlWindow.show()
self.window.resize(600,525)
else:
detailsButton.set_label('Show Details')
detailsCtrlWindow.hide()
self.window.resize(self.defaultSize[0],self.defaultSize[1])
#treeview, iter, path, user_data
def onResponseSelected(self,widget):
scoreCtrl = self.builder.get_object("riskScoreCtrl")
treeselection = scoreCtrl.get_selection()
(model, iter) = treeselection.get_selected()
detailsBuf = self.detailsDict[model.get_value(iter, 0)]
self.decorator.updateMLTextCtrl("riskDetailsCtrl",detailsBuf)
def show(self):
self.window.show()