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


Python swing.JCheckBox类代码示例

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


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

示例1: __init__

    def __init__(self, frame, chart, pingFun):
        JDialog(frame)
        self.setTitle("Chart Settings")
        self.setModal(True)
        self.pingFun = pingFun
        pane = self.getRootPane().getContentPane()
        pane.setLayout(GridLayout(7, 2))
        pane.add(JLabel("Marker color"))
        self.markerPanel = self.createColorPanel(chart.markerColor, pane)
        pane.add(JLabel("Positive selection color"))
        self.posPanel = self.createColorPanel(chart.posColor, pane)
        pane.add(JLabel("Neutral color"))
        self.neuPanel = self.createColorPanel(chart.neuColor, pane)
        pane.add(JLabel("Balancing selection color "))
        self.balPanel = self.createColorPanel(chart.balColor, pane)

        self.add(JLabel("Label candidate selected loci"))
        self.selLabel = JCheckBox()
        self.selLabel.setSelected(chart.labelSelected)
        self.add(self.selLabel)
        self.add(JLabel("Label candidate neutral loci"))
        self.neuLabel = JCheckBox()
        self.neuLabel.setSelected(chart.labelNeutral)
        self.add(self.neuLabel)

        change = JButton("Change")
        change.setActionCommand("Change")
        change.addActionListener(self)
        pane.add(change)
        exit = JButton("Exit")
        exit.setActionCommand("Exit")
        exit.addActionListener(self)
        pane.add(exit)
        self.pack()
开发者ID:tiagoantao,项目名称:lositan,代码行数:34,代码来源:ChartConf.py

示例2: initComponents

    def initComponents(self):
        self.setLayout(BoxLayout(self, BoxLayout.Y_AXIS))
        #self.setLayout(GridLayout(0,1))
        self.setAlignmentX(JComponent.LEFT_ALIGNMENT)
        self.panel1 = JPanel()
        self.panel1.setLayout(BoxLayout(self.panel1, BoxLayout.Y_AXIS))
        self.panel1.setAlignmentY(JComponent.LEFT_ALIGNMENT)
        self.checkbox = JCheckBox("All Logs", actionPerformed=self.checkBoxEvent)
        self.checkbox1 = JCheckBox("Application.Evtx", actionPerformed=self.checkBoxEvent)
        self.checkbox2 = JCheckBox("Security.EVTX", actionPerformed=self.checkBoxEvent)
        self.checkbox3 = JCheckBox("System.EVTX", actionPerformed=self.checkBoxEvent)
        self.checkbox4 = JCheckBox("Other - Input in text area below then check this box", actionPerformed=self.checkBoxEvent)
        self.panel1.add(self.checkbox)
        self.panel1.add(self.checkbox1)
        self.panel1.add(self.checkbox2)
        self.panel1.add(self.checkbox3)
        self.panel1.add(self.checkbox4)
        self.add(self.panel1)
		
        self.area = JTextArea(5,25)
        #self.area.addKeyListener(self)
        self.area.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0))
        self.pane = JScrollPane()
        self.pane.getViewport().add(self.area)
        #self.pane.addKeyListener(self)
        #self.add(self.area)
        self.add(self.pane)
开发者ID:markmckinnon,项目名称:Autopsy-Plugins,代码行数:27,代码来源:ParseEvtx.py

示例3: initComponents

    def initComponents(self):
        self.setLayout(BoxLayout(self, BoxLayout.Y_AXIS))
        #self.setLayout(GridLayout(0,1))
        self.setAlignmentX(JComponent.LEFT_ALIGNMENT)
        self.panel1 = JPanel()
        self.panel1.setLayout(BoxLayout(self.panel1, BoxLayout.Y_AXIS))
        self.panel1.setAlignmentY(JComponent.LEFT_ALIGNMENT)
        self.checkbox = JCheckBox("Create Content View of Unique Event Id's", actionPerformed=self.checkBoxEvent)
        self.checkbox4 = JCheckBox("Other - Input in text area below then check this box", actionPerformed=self.checkBoxEvent)
        self.text1 = JLabel("*** Only run this once otherwise it adds it to the data again.")
        self.text2 = JLabel(" ")
        self.text3 = JLabel("*** Format is a comma delimited text ie:  8001, 8002")
        self.panel1.add(self.checkbox)
        self.panel1.add(self.text1)
        self.panel1.add(self.text2)
        self.panel1.add(self.checkbox4)
        self.panel1.add(self.text3)
        self.add(self.panel1)
		
        self.area = JTextArea(5,25)
        #self.area.addKeyListener(self)
        self.area.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0))
        self.pane = JScrollPane()
        self.pane.getViewport().add(self.area)
        #self.pane.addKeyListener(self)
        #self.add(self.area)
        self.add(self.pane)
开发者ID:markmckinnon,项目名称:Autopsy-Plugins,代码行数:27,代码来源:Parse_Evtx_By_EventID.py

示例4: initGui

    def initGui(self):
        #~ if DEBUG:
            #~ import pdb;
            #~ pdb.set_trace()
        tabPane = JTabbedPane(JTabbedPane.TOP)
        CreditsText = "<html># Burp Custom Deserializer<br/># Copyright (c) 2016, Marco Tinari<br/>#<br/># This program is free software: you can redistribute it and/or modify<br/># it under the terms of the GNU General Public License as published by<br/># the Free Software Foundation, either version 3 of the License, or<br/># (at your option) any later version.<br/>#<br/># This program is distributed in the hope that it will be useful,<br/># but WITHOUT ANY WARRANTY; without even the implied warranty of<br/># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br/># GNU General Public License for more details.<br/>#<br/># You should have received a copy of the GNU General Public License<br/># along with this program.  If not, see <http://www.gnu.org/licenses/>.)<br/></html>"
        label1 = JLabel("<html>Usage:<br>1 - Select the desired encoding functions<br>2 - Enter the name of the parameter in the input field below and press the Apply button!</html>")
        label2 = JLabel(CreditsText)
        panel1 = JPanel()
        #set layout
        panel1.setLayout(GridLayout(11,1))
        panel2 = JPanel()
        panel1.add(label1)
        panel2.add(label2)
        tabPane.addTab("Configuration", panel1)
        tabPane.addTab("Credits", panel2)

        applyButton = JButton('Apply',actionPerformed=self.reloadConf)
        panel1.add(applyButton, BorderLayout.SOUTH)
        
        #define GET/POST/COOKIE radio button
        self.GETparameterTypeRadioButton = JRadioButton('GET parameter')
        self.POSTparameterTypeRadioButton = JRadioButton('POST parameter')
        self.COOKIEparameterTypeRadioButton = JRadioButton('COOKIE parameter')
        self.POSTparameterTypeRadioButton.setSelected(True)
        group = ButtonGroup()
        group.add(self.GETparameterTypeRadioButton)
        group.add(self.POSTparameterTypeRadioButton)
        group.add(self.COOKIEparameterTypeRadioButton)
        self.base64Enabled = JCheckBox("Base64 encode")
        self.URLEnabled = JCheckBox("URL encode")
        self.ASCII2HexEnabled = JCheckBox("ASCII to Hex")
        self.ScannerEnabled = JCheckBox("<html>Enable serialization in Burp Scanner<br>Usage:<br>1.Place unencoded values inside intruder request and define the placeholder positions<br>2.rightclick->Actively scan defined insertion points)</html>")
        self.IntruderEnabled = JCheckBox("<html>Enable serialization in Burp Intruder<br>Usage:<br>1.Place unencoded values inside intruder request and define the placeholder positions<br>2.Start the attack</html>")
        self.parameterName = JTextField("Parameter name goes here...",60)
        
        #set the tooltips
        self.parameterName.setToolTipText("Fill in the parameter name and apply")
        self.base64Enabled.setToolTipText("Enable base64 encoding/decoding")
        self.ASCII2HexEnabled.setToolTipText("Enable ASCII 2 Hex encoding/decoding") 
        self.URLEnabled.setToolTipText("Enable URL encoding/decoding")
        self.IntruderEnabled.setToolTipText("Check this if You want the extension to intercept and modify every request made by the Burp Intruder containing the selected paramter")
        self.ScannerEnabled.setToolTipText("Check this if You want the extension to intercept and modify every request made by the Burp Scanner containing the selected paramter")

        #add checkboxes to the panel            
        panel1.add(self.parameterName)
        panel1.add(self.POSTparameterTypeRadioButton)
        panel1.add(self.GETparameterTypeRadioButton)
        panel1.add(self.COOKIEparameterTypeRadioButton)
        panel1.add(self.base64Enabled)
        panel1.add(self.URLEnabled)
        panel1.add(self.ASCII2HexEnabled)
        panel1.add(self.IntruderEnabled)
        panel1.add(self.ScannerEnabled)
        #assign tabPane
        self.tab = tabPane
开发者ID:marcotinari,项目名称:CustomDeserializer,代码行数:56,代码来源:CustomDeserializer.py

示例5: build_options_row

 def build_options_row(self):
     '''
     Builds the panel with ignore case, regex, etc. options.
     '''
     panel = JPanel(FlowLayout())
     self.ignore_case_box = JCheckBox('Ignore Case')
     self.regex_box = JCheckBox('Regular Expression')
     self.selection_box = JCheckBox('Selection only')
     panel.add(self.ignore_case_box)
     panel.add(self.regex_box)
     panel.add(self.selection_box)
     return panel
开发者ID:oracc,项目名称:nammu,代码行数:12,代码来源:FindView.py

示例6: initConfigurationTab

    def initConfigurationTab(self):
        #
        ##  init configuration tab
        #
        self.prevent304 = JCheckBox("Prevent 304 Not Modified status code")
        self.prevent304.setBounds(290, 25, 300, 30)

        self.ignore304 = JCheckBox("Ignore 304/204 status code responses")
        self.ignore304.setBounds(290, 5, 300, 30)
        self.ignore304.setSelected(True)

        self.autoScroll = JCheckBox("Auto Scroll")
        #self.autoScroll.setBounds(290, 45, 140, 30)
        self.autoScroll.setBounds(160, 40, 140, 30)

        self.doUnauthorizedRequest = JCheckBox("Check unauthenticated")
        self.doUnauthorizedRequest.setBounds(290, 45, 300, 30)
        self.doUnauthorizedRequest.setSelected(True)

        startLabel = JLabel("Authorization checks:")
        startLabel.setBounds(10, 10, 140, 30)
        self.startButton = JButton("Autorize is off",actionPerformed=self.startOrStop)
        self.startButton.setBounds(160, 10, 120, 30)
        self.startButton.setBackground(Color(255, 100, 91, 255))

        self.clearButton = JButton("Clear List",actionPerformed=self.clearList)
        self.clearButton.setBounds(10, 40, 100, 30)

        self.replaceString = JTextArea("Cookie: Insert=injected; header=here;", 5, 30)
        self.replaceString.setWrapStyleWord(True);
        self.replaceString.setLineWrap(True)
        self.replaceString.setBounds(10, 80, 470, 180)

        self.filtersTabs = JTabbedPane()
        self.filtersTabs.addTab("Enforcement Detector", self.EDPnl)
        self.filtersTabs.addTab("Detector Unauthenticated", self.EDPnlUnauth)
        self.filtersTabs.addTab("Interception Filters", self.filtersPnl)
        self.filtersTabs.addTab("Export", self.exportPnl)

        self.filtersTabs.setBounds(0, 280, 2000, 700)

        self.pnl = JPanel()
        self.pnl.setBounds(0, 0, 1000, 1000);
        self.pnl.setLayout(None);
        self.pnl.add(self.startButton)
        self.pnl.add(self.clearButton)
        self.pnl.add(self.replaceString)
        self.pnl.add(startLabel)
        self.pnl.add(self.autoScroll)
        self.pnl.add(self.ignore304)
        self.pnl.add(self.prevent304)
        self.pnl.add(self.doUnauthorizedRequest)
        self.pnl.add(self.filtersTabs)
开发者ID:federicodotta,项目名称:Autorize,代码行数:53,代码来源:Autorize.py

示例7: initComponents

 def initComponents(self):
     self.setLayout(BoxLayout(self, BoxLayout.Y_AXIS))
     #self.setLayout(GridLayout(0,1))
     self.setAlignmentX(JComponent.LEFT_ALIGNMENT)
     self.panel1 = JPanel()
     self.panel1.setLayout(BoxLayout(self.panel1, BoxLayout.Y_AXIS))
     self.panel1.setAlignmentY(JComponent.LEFT_ALIGNMENT)
     self.checkbox = JCheckBox("Associate File Entries", actionPerformed=self.checkBoxEvent)
     self.checkbox1 = JCheckBox("Program Entries", actionPerformed=self.checkBoxEvent)
     self.checkbox2 = JCheckBox("Unassociated Programs", actionPerformed=self.checkBoxEvent)
     self.panel1.add(self.checkbox)
     self.panel1.add(self.checkbox1)
     self.panel1.add(self.checkbox2)
     self.add(self.panel1)
开发者ID:markmckinnon,项目名称:Autopsy-Plugins,代码行数:14,代码来源:ParseAmcache.py

示例8: __init__

 def __init__(self, chartFun, isTemporal = False):
     self.isTemporal = isTemporal
     JPanel()
     #self.setBackground(Color.LIGHT_GRAY)
     self.chartFun = chartFun
     self.enableChartFun = False
     self.setLayout(GridLayout(6,2))
     self.add(JLabel('CPU Cores'))
     cores = JComboBox(['1', '2', '4', '8', '16', '32', '64', '128'])
     nprocs = ManagementFactory.getOperatingSystemMXBean().getAvailableProcessors()
     pos = min([7, log(ceil(nprocs)) / log(2)])
     cores.setSelectedIndex(int(pos))
     cores.setMaximumSize(cores.getPreferredSize())
     self.cores = cores
     self.add(self.cores)
     self.add(JLabel('# of sims (x1000)  '))
     numSims = JComboBox(
         map(lambda x: str((10+x)*5), range(10)) +
         map(lambda x: str(x*100), range(1,11))
     )
     numSims.setMaximumSize(numSims.getPreferredSize())
     self.numSims = numSims
     self.add(self.numSims)
     if isTemporal:
         self.add(JLabel('"Neutral" Ne'))
         self.neutral = JCheckBox()
         self.neutral.addActionListener(self)
         self.add(self.neutral)
     else:
         self.add(JLabel('"Neutral" mean Fst'))
         self.neutral = JCheckBox()
         self.neutral.addActionListener(self)
         self.add(self.neutral)
         self.add(JLabel('Force mean Fst'))
         self.force = JCheckBox()
         self.force.addActionListener(self)
         self.add(self.force)
     self.add(JLabel('Confidence interval '))
     ci = JComboBox(['0.95', '0.99', '0.995'])
     ci.addItemListener(self)
     ci.setMaximumSize(cores.getPreferredSize())
     self.ci = ci
     self.add(self.ci)
     self.add(JLabel('False Disc. Rate'))
     fdr = JFormattedTextField(
         NumberFormat.getNumberInstance(Locale.US))
     fdr.setValue(0.1)
     fdr.addPropertyChangeListener(self)
     self.add(fdr)
     self.fdr = fdr
开发者ID:samitha,项目名称:lositan,代码行数:50,代码来源:SystemPanel.py

示例9: EditCurveAttr

class EditCurveAttr(JPanel):
    def __init__(self, cattr):
	self.attr = cattr
	self.cbox = JColorChooser(self.attr.color)
	self.sym_panel = EditSymbolAttr(cattr.sym_prop)
	self.thickness_field = JTextField(str(cattr.thickness),2)
	self.draw_symbol_box = JCheckBox("Draw Symbol?",cattr.draw_symbol)
	self.dps_field = JTextField(str(self.attr.data_per_symbol),2)
	self.dash_box = JComboBox(CurveProps.DASH_TYPES.keys())
	self.dash_box.setSelectedItem(self.attr.dash_type)
	self.dash_box.setBorder(BorderFactory.createTitledBorder("Dash type: (Only JDK2 & Slow!)"))
	tpanelx = JPanel()
	tpanelx.add(self.thickness_field)
	tpanelx.setBorder(BorderFactory.createTitledBorder("curve thickness (integer)"))
	tpanely = JPanel()
	tpanely.add(self.dps_field)
	tpanely.setBorder(BorderFactory.createTitledBorder("data per symbol(integer)"))
	tpanel = JPanel();tpanel.setLayout(GridLayout(2,2));
	tpanel.add(self.draw_symbol_box); tpanel.add(tpanelx);
	tpanel.add(tpanely); tpanel.add(self.dash_box);
	panel1 = JPanel()
	panel1.setLayout(BorderLayout())
	panel1.add(self.cbox,BorderLayout.CENTER)
	panel1.add(tpanel, BorderLayout.SOUTH)
	panel2 = JPanel()
	panel2.setLayout(BorderLayout())
	panel2.add(self.sym_panel,BorderLayout.CENTER)
	tp1 = JTabbedPane()
	tp1.addTab("Curve Attributes",panel1)
	tp1.addTab("Symbol Attributes",panel2)
	tp1.setSelectedComponent(panel1)
	self.setLayout(BorderLayout())
	self.add(tp1,BorderLayout.CENTER)
    def setAttribute(self,cattr):
	self.attr = cattr
	self.cbox.color = self.attr.color
	self.sym_panel.setAttribute(cattr.sym_prop)
	self.thickness_field.text = str(cattr.thickness)
	self.dps_field.text = str(cattr.data_per_symbol)
	self.draw_symbol_box.setSelected(cattr.draw_symbol)
	self.dash_box.setSelectedItem(cattr.dash_type)
    def update(self):
	self.attr.color = self.cbox.getColor()
	self.attr.thickness = string.atoi(self.thickness_field.text)
	self.attr.data_per_symbol = string.atoi(self.dps_field.text)
	self.attr.draw_symbol = self.draw_symbol_box.isSelected()
	self.attr.dash_type = self.dash_box.getSelectedItem()
	#print 'Updating Self.draw_symbol',self.draw_symbol,self.attr
	self.sym_panel.update()
开发者ID:CalSimCalLite,项目名称:CalLiteGUI,代码行数:49,代码来源:xattr.py

示例10: EditSymbolAttr

class EditSymbolAttr(JPanel):
    def __init__(self, sattr):
	self.attr = sattr
	self.cbox = JColorChooser(self.attr.color)
	self.sz_field = JTextField(str(self.attr.size))
	szpanel = JPanel()
	szpanel.add(self.sz_field)
	szpanel.setBorder(BorderFactory.createTitledBorder("symbol size (integer)"))
	self.filled_box = JCheckBox("Filled ?:",self.attr.filled)
	self.shape_cbox = JComboBox(SymbolProps.sym_shape_map.keys())
	self.shape_cbox.setSelectedItem(self.attr.shape)
	self.shape_cbox.setBorder(BorderFactory.createTitledBorder("Shape"))
	panel1 = JPanel()
	panel1.setLayout(BorderLayout())
	panel1.add(szpanel,BorderLayout.NORTH)
	panel2 = JPanel()
	panel2.setLayout(GridLayout(1,2))
	panel2.add(self.shape_cbox)
	panel2.add(self.filled_box)
	panel1.add(panel2,BorderLayout.SOUTH)
	self.setLayout(BorderLayout())
	self.add(self.cbox,BorderLayout.CENTER)
	self.add(panel1,BorderLayout.SOUTH)
    def setAttribute(self,sattr):
	self.attr = sattr
	self.cbox.color = self.attr.color
	self.sz_field.text = str(self.attr.size)
	self.shape_cbox.setSelectedItem(self.attr.shape)
    def update(self):
	self.attr.color = self.cbox.getColor()
	self.attr.size = string.atoi(self.sz_field.getText())
	self.attr.filled = self.filled_box.isSelected()
	self.attr.shape = self.shape_cbox.getSelectedItem()
	self.attr.sym = self.attr.createSymbol()
开发者ID:CalSimCalLite,项目名称:CalLiteGUI,代码行数:34,代码来源:xattr.py

示例11: initComponents

    def initComponents(self):
        self.setLayout(BoxLayout(self, BoxLayout.Y_AXIS))
        #self.setLayout(GridLayout(0,1))
        self.setAlignmentX(JComponent.LEFT_ALIGNMENT)
        self.panel1 = JPanel()
        self.panel1.setLayout(BoxLayout(self.panel1, BoxLayout.Y_AXIS))
        self.panel1.setAlignmentY(JComponent.LEFT_ALIGNMENT)
        self.checkbox = JCheckBox("Check to activate/deactivate TextArea", actionPerformed=self.checkBoxEvent)
        self.label0 = JLabel(" ")
        self.label1 = JLabel("Input in SQLite DB's in area below,")
        self.label2 = JLabel("seperate values by commas.")
        self.label3 = JLabel("then check the box above.")
        self.label4 = JLabel(" ")
        self.panel1.add(self.checkbox)
        self.panel1.add(self.label0)
        self.panel1.add(self.label1)
        self.panel1.add(self.label2)
        self.panel1.add(self.label3)
        self.panel1.add(self.label4)
        self.add(self.panel1)
 
        self.area = JTextArea(5,25)
        #self.area.getDocument().addDocumentListener(self.area)
        #self.area.addKeyListener(listener)
        self.area.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0))
        self.pane = JScrollPane()
        self.pane.getViewport().add(self.area)
        #self.pane.addKeyListener(self.area)
        #self.add(self.area)
        self.add(self.pane)
开发者ID:markmckinnon,项目名称:Autopsy-Plugins,代码行数:30,代码来源:Parse_Plist.py

示例12: __init__

 def __init__(self,view):
     self.view=view
     self.layout=BorderLayout()
     self.run_sim=JCheckBox('generate more data',False)
     self.add(self.run_sim)
     self.thread=java.lang.Thread(self)
     self.thread.priority=java.lang.Thread.MIN_PRIORITY
     self.thread.start()
开发者ID:Elhamahm,项目名称:nengo_1.4,代码行数:8,代码来源:run.py

示例13: __init__

 def __init__(self, amgui):
     self.amgui = amgui
     self.am = amgui.acctmanager
     self.buildgwinfo()
     self.autologin = JCheckBox("Automatically Log In")
     self.acctname = JTextField()
     self.gwoptions = JPanel(doublebuffered)
     self.gwoptions.border = TitledBorder("Gateway Options")
     self.buildgwoptions("Twisted")
     self.mainframe = JFrame("New Account Window")
     self.buildpane()
开发者ID:galaxysd,项目名称:BitTorrent,代码行数:11,代码来源:jyaccount.py

示例14: changeDomainPopup

    def changeDomainPopup(self, oldDomain, index):
        hostField = JTextField(25)
        checkbox = JCheckBox()
        domainPanel = JPanel(GridLayout(0,1))
        domainPanel.add(JLabel("Request %s: Domain %s inaccessible. Enter new domain." % (str(index),oldDomain)))

        firstline = JPanel()
        firstline.add(JLabel("Host:"))
        firstline.add(hostField)
        domainPanel.add(firstline)
        secondline = JPanel()
        secondline.add(JLabel("Replace domain for all requests?"))
        secondline.add(checkbox)
        domainPanel.add(secondline)
        result = JOptionPane.showConfirmDialog(
            self._splitpane,domainPanel, "Domain Inaccessible", JOptionPane.OK_CANCEL_OPTION)
        cancelled = (result == JOptionPane.CANCEL_OPTION)
        if cancelled:
            return (False, None, False)
        return (True, hostField.getText(), checkbox.isSelected())
开发者ID:webpentest-factory,项目名称:AuthMatrix,代码行数:20,代码来源:AuthMatrix.py

示例15: SampleFileIngestModuleWithUISettingsPanel

class SampleFileIngestModuleWithUISettingsPanel(IngestModuleIngestJobSettingsPanel):
    # Note, we can't use a self.settings instance variable.
    # Rather, self.local_settings is used.
    # https://wiki.python.org/jython/UserGuide#javabean-properties
    # Jython Introspector generates a property - 'settings' on the basis
    # of getSettings() defined in this class. Since only getter function
    # is present, it creates a read-only 'settings' property. This auto-
    # generated read-only property overshadows the instance-variable -
    # 'settings'

    # We get passed in a previous version of the settings so that we can
    # prepopulate the UI
    # TODO: Update this for your UI
    def __init__(self, settings):
        self.local_settings = settings
        self.initComponents()
        self.customizeComponents()

    # TODO: Update this for your UI
    def checkBoxEvent(self, event):
        if self.checkbox.isSelected():
            self.local_settings.setFlag(True)
        else:
            self.local_settings.setFlag(False)

    # TODO: Update this for your UI
    def initComponents(self):
        self.setLayout(BoxLayout(self, BoxLayout.Y_AXIS))
        self.checkbox = JCheckBox("Flag", actionPerformed=self.checkBoxEvent)
        self.add(self.checkbox)

    # TODO: Update this for your UI
    def customizeComponents(self):
        self.checkbox.setSelected(self.local_settings.getFlag())

    # Return the settings used
    def getSettings(self):
        return self.local_settings
开发者ID:RahulSDeshpande,项目名称:autopsy,代码行数:38,代码来源:fileIngestModuleWithGui.py


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