本文整理汇总了Python中WidgetFactory.buildCommitButtonSizer方法的典型用法代码示例。如果您正苦于以下问题:Python WidgetFactory.buildCommitButtonSizer方法的具体用法?Python WidgetFactory.buildCommitButtonSizer怎么用?Python WidgetFactory.buildCommitButtonSizer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WidgetFactory
的用法示例。
在下文中一共展示了WidgetFactory.buildCommitButtonSizer方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [as 别名]
def __init__(self,parent,exposedCMs):
wx.Panel.__init__(self,parent,-1)
b = Borg()
self.dbProxy = b.dbProxy
eValues = ['Low','Medium','High']
mainSizer = wx.BoxSizer(wx.VERTICAL)
cmSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(cmSizer,1,wx.EXPAND)
isFirst = True
self.cmAssets = {}
for envName,cmName,assetName,cmEffectiveness in exposedCMs:
cmKey = envName + '/' + cmName + ' (' + assetName + ')'
self.cmAssets[cmKey] = assetName
ecBox = wx.StaticBox(self,-1,cmKey)
ecBoxSizer = wx.StaticBoxSizer(ecBox,wx.HORIZONTAL)
cmSizer.Add(ecBoxSizer,0,wx.EXPAND)
for eValue in eValues:
if (isFirst == True):
rb = wx.RadioButton(self,-1,eValue,pos=wx.DefaultPosition,style=wx.RB_GROUP)
isFirst = False
else:
rb = wx.RadioButton(self,-1,eValue)
ecBoxSizer.Add(rb,0,wx.EXPAND)
if (eValue == cmEffectiveness):
rb.SetValue(True)
else:
rb.SetValue(False)
isFirst = False
isFirst = True
mainSizer.Add(WidgetFactory.buildCommitButtonSizer(self,EXPOSEDCOUNTERMEASURE_BUTTONCOMMIT_ID,True),0,wx.CENTER)
self.SetSizer(mainSizer)
示例2: buildControls
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [as 别名]
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)
示例3: __init__
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [as 别名]
def __init__(self,parent,parameters):
wx.Dialog.__init__(self,parent,parameters.id(),parameters.label(),style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(700,300))
self.theTaskName = ''
self.theModalQualifier = ''
self.theCharacteristic = ''
self.theGrounds = []
self.theWarrant = []
self.theBacking = []
self.theRebuttal = []
self.isCreate = True
self.showTaskCombo = True
self.theId = -1
self.panel = 0
self.inTask = False
if (parameters.__class__.__name__ == 'TaskCharacteristicDialogParameters'):
self.inTask = True
self.showTaskCombo = parameters.showTask()
if (self.inTask):
self.theTaskName = parameters.task()
self.commitVerb = 'Add'
mainSizer = wx.BoxSizer(wx.VERTICAL)
self.panel = PersonaCharacteristicNotebook(self,True,self.showTaskCombo)
mainSizer.Add(self.panel,1,wx.EXPAND)
mainSizer.Add(WidgetFactory.buildCommitButtonSizer(self,TASKCHARACTERISTIC_BUTTONCOMMIT_ID,True),0,wx.CENTER)
self.SetSizer(mainSizer)
wx.EVT_BUTTON(self,TASKCHARACTERISTIC_BUTTONCOMMIT_ID,self.onCommit)
示例4: __init__
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [as 别名]
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)
示例5: __init__
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [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)
示例6: buildControls
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [as 别名]
def buildControls(self,isCreate,isUpdateable=True):
mainSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(WidgetFactory.buildTextSizer(self,'Name',(87,30),EXTERNALDOCUMENT_TEXTNAME_ID),0,wx.EXPAND)
mainSizer.Add(WidgetFactory.buildTextSizer(self,'Version',(87,30),EXTERNALDOCUMENT_TEXTVERSION_ID),0,wx.EXPAND)
mainSizer.Add(WidgetFactory.buildTextSizer(self,'Date',(87,30),EXTERNALDOCUMENT_TEXTDATE_ID),0,wx.EXPAND)
mainSizer.Add(WidgetFactory.buildTextSizer(self,'Authors',(87,30),EXTERNALDOCUMENT_TEXTAUTHORS_ID),0,wx.EXPAND)
mainSizer.Add(WidgetFactory.buildMLTextSizer(self,'Description',(87,30),EXTERNALDOCUMENT_TEXTDESCRIPTION_ID),1,wx.EXPAND)
mainSizer.Add(WidgetFactory.buildCommitButtonSizer(self,EXTERNALDOCUMENT_BUTTONCOMMIT_ID,isCreate),0,wx.CENTER)
self.SetSizer(mainSizer)
示例7: buildControls
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [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)
示例8: __init__
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [as 别名]
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)
示例9: buildControls
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [as 别名]
def buildControls(self,parameters):
mainSizer = wx.BoxSizer(wx.VERTICAL)
self.panel = UseCasePanel(self)
mainSizer.Add(self.panel,1,wx.EXPAND)
if (self.theCommitVerb == 'Create'):
isCreate = True
else:
isCreate = False
mainSizer.Add(WidgetFactory.buildCommitButtonSizer(self,USECASE_BUTTONCOMMIT_ID,isCreate),0,wx.ALIGN_CENTER)
self.SetSizer(mainSizer)
wx.EVT_BUTTON(self,USECASE_BUTTONCOMMIT_ID,self.onCommit)
示例10: buildControls
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [as 别名]
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)
示例11: __init__
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [as 别名]
def __init__(self,parent):
wx.Panel.__init__(self,parent,OBSTACLE_ID)
b = Borg()
self.dbProxy = b.dbProxy
mainSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(WidgetFactory.buildTextSizer(self,'Name',(87,30),OBSTACLE_TEXTNAME_ID),0,wx.EXPAND)
self.nameCtrl = self.FindWindowById(OBSTACLE_TEXTNAME_ID)
self.notebook = ObstacleEnvironmentNotebook(self,self.dbProxy)
mainSizer.Add(self.notebook,1,wx.EXPAND)
mainSizer.Add(WidgetFactory.buildCommitButtonSizer(self,OBSTACLE_BUTTONCOMMIT_ID,True),0,wx.CENTER)
self.definitionCtrl = self.notebook.FindWindowById(OBSTACLE_TEXTDEFINITION_ID)
self.categoryCtrl = self.notebook.FindWindowById(OBSTACLE_COMBOCATEGORY_ID)
self.goalAssociationCtrl = self.notebook.FindWindowById(OBSTACLE_LISTGOALS_ID)
self.subGoalAssociationCtrl = self.notebook.FindWindowById(OBSTACLE_LISTSUBGOALS_ID)
self.cCtrl = self.notebook.FindWindowById(OBSTACLE_LISTCONCERNS_ID)
self.SetSizer(mainSizer)
示例12: __init__
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [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)
示例13: buildControls
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [as 别名]
def buildControls(self,isCreate,isUpdateable=True):
mainSizer = wx.BoxSizer(wx.VERTICAL)
allDimensionNames = self.dbProxy.getDimensionNames('trace_dimension')
mainSizer.Add(WidgetFactory.buildComboSizerList(self,'From artifact',(87,30),TRACE_COMBOFROMOBJECT_ID,allDimensionNames),0,wx.EXPAND)
mainSizer.Add(WidgetFactory.buildComboSizerList(self,'From name',(87,30),TRACE_COMBOFROMNAME_ID,[]),0,wx.EXPAND)
mainSizer.Add(WidgetFactory.buildComboSizerList(self,'To artifact',(87,30),TRACE_COMBOTOOBJECT_ID,allDimensionNames),0,wx.EXPAND)
mainSizer.Add(WidgetFactory.buildComboSizerList(self,'To name',(87,30),TRACE_COMBOTONAME_ID,[]),0,wx.EXPAND)
mainSizer.Add(wx.StaticText(self,-1,''),1,wx.EXPAND)
if (isUpdateable):
mainSizer.Add(WidgetFactory.buildCommitButtonSizer(self,TRACE_BUTTONCOMMIT_ID,isCreate),0,wx.ALIGN_CENTRE)
self.SetSizer(mainSizer)
self.fromObjectCombo = self.FindWindowById(TRACE_COMBOFROMOBJECT_ID)
self.fromNameCombo = self.FindWindowById(TRACE_COMBOFROMNAME_ID)
self.toObjectCombo = self.FindWindowById(TRACE_COMBOTOOBJECT_ID)
self.toNameCombo = self.FindWindowById(TRACE_COMBOTONAME_ID)
self.fromObjectCombo.Bind(wx.EVT_COMBOBOX,self.onFromObjectChange)
self.fromNameCombo.Bind(wx.EVT_COMBOBOX,self.onFromNameChange)
self.toObjectCombo.Bind(wx.EVT_COMBOBOX,self.onToObjectChange)
self.toNameCombo.Bind(wx.EVT_COMBOBOX,self.onToNameChange)
示例14: __init__
# 需要导入模块: import WidgetFactory [as 别名]
# 或者: from WidgetFactory import buildCommitButtonSizer [as 别名]
def __init__(self,parent,envName,eName = '', eDimType = 'goal', eDimName = '', eCat = '', eDef = ''):
wx.Dialog.__init__(self,parent,EXCEPTION_ID,'Add Flow Exception',style=wx.DEFAULT_DIALOG_STYLE|wx.MAXIMIZE_BOX|wx.THICK_FRAME|wx.RESIZE_BORDER,size=(400,500))
self.theEnvironmentName = envName
self.theName = eName
self.theDimensionType = eDimType
self.theDimensionName = eDimName
self.theCategory = eCat
self.theDefinition = eDef
self.panel = 0
isCreate = True
mainSizer = wx.BoxSizer(wx.VERTICAL)
self.panel = ExceptionPanel(self,self.theEnvironmentName)
mainSizer.Add(self.panel,1,wx.EXPAND)
if eName != '':
self.SetLabel('Edit Flow Exception')
self.commitVerb = 'Edit'
self.panel.loadControls((eName,eDimType,eDimName,eCat,eDef))
isCreate = False
else:
self.commitVerb = 'Add'
mainSizer.Add(WidgetFactory.buildCommitButtonSizer(self,EXCEPTION_BUTTONCOMMIT_ID,isCreate),0,wx.CENTER)
self.SetSizer(mainSizer)
wx.EVT_BUTTON(self,EXCEPTION_BUTTONCOMMIT_ID,self.onCommit)