Exemplo n.º 1
0
    def getUiComponent(self):
        self.panel = JPanel()
        self.panel.setLayout(BoxLayout(self.panel, BoxLayout.PAGE_AXIS))

        self.uiCommandLine = JPanel()
        self.uiCommandLine.setLayout(
            BoxLayout(self.uiCommandLine, BoxLayout.LINE_AXIS))
        self.uiCommandLine.setAlignmentX(JPanel.LEFT_ALIGNMENT)
        self.uiCommandLine.add(JLabel("Command line for local search: "))
        self.uiCommand = JTextField(40)
        self.uiCommand.setMaximumSize(self.uiCommand.getPreferredSize())
        self.uiCommandLine.add(self.uiCommand)
        self.panel.add(self.uiCommandLine)

        uiOptionsLine = JPanel()
        uiOptionsLine.setLayout(BoxLayout(uiOptionsLine, BoxLayout.LINE_AXIS))
        uiOptionsLine.setAlignmentX(JPanel.LEFT_ALIGNMENT)
        self.uiHaveIBeenPwnd = JCheckBox("haveibeenpwned")
        uiOptionsLine.add(self.uiHaveIBeenPwnd)
        uiOptionsLine.add(Box.createRigidArea(Dimension(10, 0)))

        self.uiLocalCheck = JCheckBox("Local check")
        uiOptionsLine.add(self.uiLocalCheck)
        uiOptionsLine.add(Box.createRigidArea(Dimension(10, 0)))
        self.panel.add(uiOptionsLine)
        self.panel.add(Box.createRigidArea(Dimension(0, 10)))

        uiButtonsLine = JPanel()
        uiButtonsLine.setLayout(BoxLayout(uiButtonsLine, BoxLayout.LINE_AXIS))
        uiButtonsLine.setAlignmentX(JPanel.LEFT_ALIGNMENT)
        uiButtonsLine.add(JButton("Apply", actionPerformed=self.applyConfigUI))
        uiButtonsLine.add(JButton("Reset", actionPerformed=self.resetConfigUI))
        self.panel.add(uiButtonsLine)

        self.uiAbout = JPanel()
        self.uiAbout.setLayout(BoxLayout(self.uiAbout, BoxLayout.LINE_AXIS))
        self.uiAbout.setAlignmentX(JPanel.LEFT_ALIGNMENT)
        self.uiAbout.add(
            JLabel(
                "<html><a href=\"https://twitter.com/_chipik\">https://twitter.com/_chipik</a></html>"
            ))
        self.panel.add(self.uiAbout)

        self.resetConfigUI(None)
        return self.panel
Exemplo n.º 2
0
 def create_cont_panel (self,layout):
     titles = self._info['title']
     self.compartment = swing.JPanel()
     self.compartment.setBorder(EtchedBorder(EtchedBorder.RAISED))
     self.compartment.setLayout(BoxLayout(self.compartment, layout))
     self.compartment.setLayout(GridLayout())
     for title in titles:
         content = ContentView(title,self._contents[title])
         self.compartment.add(content.fetch_content())
Exemplo n.º 3
0
 def initComponents(self):
     self.setLayout(BoxLayout(self, BoxLayout.Y_AXIS))
     self.cache_parse_checkbox = JCheckBox(
         "Parse Cached Files", actionPerformed=self.cache_checkbox_event)
     self.add(self.cache_parse_checkbox)
     self.settings_parse_checkbox = JCheckBox(
         "Parse Setting Files",
         actionPerformed=self.settings_checkbox_event)
     self.add(self.settings_parse_checkbox)
Exemplo n.º 4
0
    def buildpane(self):
        buttons = JPanel(doublebuffered)
        buttons.add(JButton("Hide", actionPerformed=self.hidewindow))

        memberpane = JTable(self.memberdata)
        memberframe = JScrollPane(memberpane)

        chat = JPanel(doublebuffered)
        chat.setLayout(BoxLayout(chat, BoxLayout.Y_AXIS))
        chat.add(JScrollPane(self.display))
        self.typepad.actionPerformed = self.send
        chat.add(self.typepad)
        chat.add(buttons)

        mainpane = self.mainframe.getContentPane()
        mainpane.setLayout(BoxLayout(mainpane, BoxLayout.X_AXIS))
        mainpane.add(chat)
        mainpane.add(memberframe)
 def _create_panel(self, message, widget):
     panel = JPanel()
     panel.setLayout(BoxLayout(panel, BoxLayout.Y_AXIS))
     label = self._create_label(message)
     label.setAlignmentX(Component.LEFT_ALIGNMENT)
     panel.add(label)
     widget.setAlignmentX(Component.LEFT_ALIGNMENT)
     panel.add(widget)
     return panel
Exemplo n.º 6
0
    def addObject(self, objectID):
        """
        Creates new empty JPanel that'll contain the model for one object in
        the ATF file.
        """
        objectPanel = JPanel()
        objectPanel.setLayout(BoxLayout(objectPanel, BoxLayout.PAGE_AXIS))

        self.objectTabs[objectID] = objectPanel
Exemplo n.º 7
0
    def add_UI_entry(self,key, dico=dict()):
        UI_key_dict = dict()
        UI_key_dict['JP'] = JPanel()
        UI_key_dict['JP'].setLayout(BoxLayout(UI_key_dict['JP'], BoxLayout.X_AXIS))
        UI_key_dict['JRB'] = JRadioButton()
        self.select_key_rb_group.add(UI_key_dict['JRB'])
        self.hash4keys[UI_key_dict['JRB']] = key
        UI_key_dict['JB'] = JButton(key, actionPerformed=self.set_key)
        UI_key_dict['JB'].setPreferredSize(Dimension(100,25))
        UI_key_dict['JPP'] = JPanel()

        UI_key_dict['JP'].add(UI_key_dict['JRB'])
        UI_key_dict['JP'].add(UI_key_dict['JB'])
        UI_key_dict['JP'].add(Box.createRigidArea(Dimension(15, 0)))
        UI_key_dict['JP'].add(UI_key_dict['JPP'])
        UI_key_dict['JPP'].setLayout(BoxLayout(UI_key_dict['JPP'], BoxLayout.Y_AXIS))
        self.panelEntries.add(UI_key_dict['JP'])
        for param in self.param_list:
            if param not in dico.keys(): continue
            if param == 'DEFAULT':
                UI_key_dict[param] = {'JP':JPanel(), 'JRB': JRadioButton('is Default')}
                UI_key_dict[param]['JP'].setLayout(BoxLayout(
                                    UI_key_dict[param]['JP'], BoxLayout.X_AXIS))
                UI_key_dict[param]['JP'].add(UI_key_dict[param]['JRB'])
                UI_key_dict[param]['JP'].add(Box.createHorizontalGlue())
                self.select_default_rb_group.add(UI_key_dict[param]['JRB'])
                UI_key_dict['JPP'].add(UI_key_dict[param]['JP'])
                UI_key_dict[param]['JRB'].setSelected(dico[param])
                self.hash4keys[UI_key_dict[param]['JRB']] = key
                continue
            UI_key_dict[param] = { 'JP':JPanel(), 'JL': JLabel(param+": "), 
                                 'JB': JButton(dico[param]) }
            self.hash4keys[UI_key_dict[param]['JB']] = key
            UI_key_dict[param]['JL'].setPreferredSize(Dimension(100,25)) 
            UI_key_dict[param]['JB'].actionPerformed = self.actions_list[param] 
            UI_key_dict[param]['JP'].setLayout(BoxLayout(UI_key_dict[param]['JP'], BoxLayout.X_AXIS))
            UI_key_dict[param]['JP'].add(UI_key_dict[param]['JL'])
            UI_key_dict[param]['JP'].add(UI_key_dict[param]['JB'])
            UI_key_dict[param]['JP'].add(Box.createHorizontalGlue())
            UI_key_dict['JPP'].add(UI_key_dict[param]['JP'])
        UI_key_dict['JPP'].add(Box.createRigidArea(Dimension(0, 20)))
        self.config_item_dict[key]=UI_key_dict
        self.pack()
        pass
Exemplo n.º 8
0
 def __init__(self):
     self.setLayout(
             BoxLayout(
                 self,
                 BoxLayout.X_AXIS
             )
         )
     self.setBorder(
             BorderFactory.createEmptyBorder(5, 5, 5, 5)
         )
    def initComponents(self):
        self.setLayout(BoxLayout(self, BoxLayout.Y_AXIS))
        self.file_checkbox = JCheckBox("Look for Files relating to Dropbox",
                                       actionPerformed=self.checkBoxEvent)
        self.add(self.file_checkbox)

        self.dir_checkbox = JCheckBox(
            "Look for Directories relating to Dropbox",
            actionPerformed=self.checkBoxEvent)
        self.add(self.dir_checkbox)
Exemplo n.º 10
0
    def buildpane(self):
        buttons = JPanel(FlowLayout(), doublebuffered)
        buttons.add(JButton("Send Message", actionPerformed=self.message))
        buttons.add(JButton("Add Contact", actionPerformed=self.addContact))
        #buttons.add(JButton("Quit", actionPerformed=self.quit))

        mainpane = self.mainframe.getContentPane()
        mainpane.setLayout(BoxLayout(mainpane, BoxLayout.Y_AXIS))
        mainpane.add(JScrollPane(self.table))
        mainpane.add(buttons)
        self.update()
Exemplo n.º 11
0
    def buildpane(self):
        buttons = JPanel(doublebuffered)
        buttons.add(JButton("Send", actionPerformed=self.send))
        buttons.add(JButton("Hide", actionPerformed=self.hidewindow))

        mainpane = self.mainframe.getContentPane()
        mainpane.setLayout(BoxLayout(mainpane, BoxLayout.Y_AXIS))
        mainpane.add(JScrollPane(self.display))
        self.typepad.actionPerformed = self.send
        mainpane.add(self.typepad)
        mainpane.add(buttons)
Exemplo n.º 12
0
 def __init__(self, employees):
     JPanel.__init__(self, preferredSize=(400, 200))
     layout = BoxLayout(self, BoxLayout.Y_AXIS)
     self.setLayout(layout)
     self._employees = employees
     employees.add_change_listener(self)
     self._create_status_label()
     self._create_name_editor()
     self._create_start_date_editor()
     self._create_save_button()
     self._adding_employee = False
Exemplo n.º 13
0
 def __init__(self, parentCrate=None):
     JPanel.__init__(self)
     self.spy = None
     self.parentCrate = parentCrate
     self.nw = 10  # Number of words (total)
     self.upperPanel = JPanel()
     self.lowerPanel = JPanel()
     self.add(self.upperPanel)
     self.add(self.lowerPanel)
     self.nameLabel = JLabel("n/a")
     self.slotLabel = JLabel("n/a")
     self.textArea = JTextArea("n/a", 1, 70, editable=0)
     self.scrollPane = JScrollPane(self.textArea)
     self.textField = JTextField(3,
                                 actionCommand="textField",
                                 text=("%d" % self.nw))
     self.textField.addActionListener(self)
     self.clearButton = JButton("Stop", actionCommand="button")
     self.clearButton.addActionListener(self)
     self.border = BorderFactory.createEmptyBorder(5, 5, 5, 5)
     self.layout = BoxLayout(self, BoxLayout.Y_AXIS)
     self.upperPanel.layout = BoxLayout(self.upperPanel, BoxLayout.X_AXIS)
     self.lowerPanel.layout = BoxLayout(self.lowerPanel, BoxLayout.X_AXIS)
     self.upperPanel.add(self.clearButton)
     self.upperPanel.add(Box.createRigidArea(Dimension(20, 0)))
     self.upperPanel.add(JLabel("Spy:"))
     self.upperPanel.add(Box.createRigidArea(Dimension(5, 0)))
     self.upperPanel.add(self.nameLabel)
     self.upperPanel.add(Box.createRigidArea(Dimension(20, 0)))
     self.upperPanel.add(JLabel("Slot:"))
     self.upperPanel.add(Box.createRigidArea(Dimension(5, 0)))
     self.upperPanel.add(self.slotLabel)
     self.upperPanel.add(Box.createRigidArea(Dimension(20, 0)))
     self.upperPanel.add(JLabel("Number of words:"))
     self.upperPanel.add(Box.createRigidArea(Dimension(5, 0)))
     self.upperPanel.add(self.textField)
     self.upperPanel.add(Box.createHorizontalGlue())
     self.lowerPanel.add(JLabel("Tail contents:"))
     self.lowerPanel.add(Box.createRigidArea(Dimension(5, 0)))
     self.lowerPanel.add(self.scrollPane)
     self.lowerPanel.add(Box.createHorizontalGlue())
Exemplo n.º 14
0
    def createButtonPane(self):
        """Create a new button pane with the type editor window"""
        self._button_listener = TypeEditorButtonListener(self)

        panel = JPanel()
        panel.setLayout(BoxLayout(panel, BoxLayout.Y_AXIS))

        panel.add(self.createButton("Validate", "validate"))
        panel.add(self.createButton("Apply", "apply"))
        panel.add(self.createButton("Reset", "reset"))
        panel.add(self.createButton("Exit", "exit"))
        return panel
Exemplo n.º 15
0
 def create_panel(self):
     self._panel = swing.JPanel()
     self._panel.setLayout(BoxLayout(self._panel, BoxLayout.Y_AXIS))
     self._panel.setBorder(EtchedBorder(EtchedBorder.RAISED))
     #各区画をadd
     for compartment in self._compartments.keys():
         if compartment in self._contents.keys():
             content = self._contents[compartment]
         else :
             content = None
         compartment_panel = CompartmentView(compartment,self._compartments[compartment],content)
         self._panel.add(compartment_panel.fetch_compartment())
     return self._panel
Exemplo n.º 16
0
 def getUiComponent(self):
     self.panel = JPanel()
     self.main = JPanel()
     self.main.setLayout(BoxLayout(self.main, BoxLayout.Y_AXIS))
     self.target_host_panel = JPanel()
     self.main.add(self.target_host_panel)
     self.target_host_panel.setLayout(
         BoxLayout(self.target_host_panel, BoxLayout.X_AXIS))
     self.target_host_panel.add(JLabel('Listen Prot:'))
     self.target_host = JTextField('127.0.0.1:8080', 25)
     self.target_host_panel.add(self.target_host)
     self.buttons_panel = JPanel()
     self.main.add(self.buttons_panel)
     self.buttons_panel.setLayout(
         BoxLayout(self.buttons_panel, BoxLayout.X_AXIS))
     self.enable_button = JButton('Enable', actionPerformed= self.enableGateway)
     self.buttons_panel.add(self.enable_button)
     self.disable_button = JButton('Disable', actionPerformed= self.disableGateway)
     self.buttons_panel.add(self.disable_button)
     self.disable_button.setEnabled(False)
     self.panel.add(self.main)
     return self.panel
Exemplo n.º 17
0
    def initComponents(self):
        self.setLayout(BoxLayout(self, BoxLayout.Y_AXIS))
        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 pHashToCheck",
                                  actionPerformed=self.checkBoxEvent)
        self.label0 = JLabel(" ")
        self.label1 = JLabel("Input your phash value for checking: ")
        self.label2 = JLabel(" ")
        self.panel1.add(self.checkbox)
        self.panel1.add(self.label0)
        self.panel1.add(self.label1)
        self.panel1.add(self.label2)
        self.add(self.panel1)

        self.area = JTextArea(5, 25)
        self.area.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0))
        self.pane = JScrollPane()
        self.pane.getViewport().add(self.area)
        self.add(self.pane)
Exemplo n.º 18
0
    def createPanel(scroll=False, ptop=0, pleft=0, pbottom=0, pright=0):
        panel = JPanel()
        panel.setLayout(BoxLayout(panel, BoxLayout.PAGE_AXIS))
        panel.setAlignmentX(Component.LEFT_ALIGNMENT)
        panel.setBorder(EmptyBorder(ptop, pleft, pbottom, pright))

        # if scroll:
        # scrollpane = JScrollPane(panel)
        # scrollpane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED)
        # scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER)
        # return JPanel().add(scrollpane)

        return panel
Exemplo n.º 19
0
    def timeline(self, username):
        timeline = self.api.GetFriendsTimeline(username)
        self.resultPanel = JPanel()
        self.resultPanel.layout = BoxLayout(self.resultPanel, BoxLayout.Y_AXIS)
        for s in timeline:
            self.showTweet(s)

        scrollpane = JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
                                 JScrollPane.HORIZONTAL_SCROLLBAR_NEVER)
        scrollpane.preferredSize = 400, 800
        scrollpane.viewport.view = self.resultPanel

        self.frame.add(scrollpane)
Exemplo n.º 20
0
    def buildpane(self):
        buttons = JPanel(FlowLayout(), doublebuffered)
        buttons.add(self.connectbutton)
        buttons.add(self.dconnbutton)
        buttons.add(JButton("New", actionPerformed=self.addNewAccount))
        buttons.add(self.deletebutton)
        buttons.add(JButton("Quit", actionPerformed=self.quit))

        mainpane = self.mainframe.getContentPane()
        mainpane.layout = BoxLayout(mainpane, BoxLayout.Y_AXIS)
        mainpane.add(JScrollPane(self.table))
        mainpane.add(buttons)
        self.update()
Exemplo n.º 21
0
    def createButtonPane(self):
        """Create AWT window panel for buttons"""
        self._button_listener = TypeDefinitionButtonListener(self)

        panel = JPanel()
        panel.setLayout(BoxLayout(panel, BoxLayout.Y_AXIS))

        panel.add(self.createButton("New Type", "new-type"))
        panel.add(self.createButton("Edit Type", "edit-type"))
        panel.add(self.createButton("Delete Type", "delete-type"))
        panel.add(self.createButton("Save All Types To File", "save-types"))
        panel.add(self.createButton("Load All Types To File", "load-types"))
        return panel
Exemplo n.º 22
0
    def __init__(self):
        self.dir_path = ''

        self.panel = JPanel()
        box_layout = BoxLayout(self.panel, BoxLayout.Y_AXIS)
        self.panel.setLayout(box_layout)
        self.panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10))

        self.choose_dir_label = JLabel('Experiment Folder:')
        self.choose_dir_textField = JTextField(30)
        self.choose_dir_textField.addActionListener(
            ActionListenerFactory(self, self.textField_al))
        self.choose_dir_button = JButton('open')
        self.choose_dir_button.addActionListener(
            ActionListenerFactory(self, self.choose_dir_al))

        self.choose_dir_panel = JPanel()
        self.choose_dir_panel.add(self.choose_dir_label)
        self.choose_dir_panel.add(self.choose_dir_textField)
        self.choose_dir_panel.add(self.choose_dir_button)

        self.panel.add(self.choose_dir_panel)

        # root = DefaultMutableTreeNode()

        # self.meta_data_mode_label = JLabel('Autogenerated meta_data file mode')
        # self.raw_stack_mode = JRadioButton('raw stack mode')
        # self.projection_mode = JRadioButton('projection files mode')
        #
        # self.meta_data_mode = ButtonGroup()
        # self.meta_data_mode.add(self.raw_stack_mode)
        # self.meta_data_mode.add(self.projection_mode)
        #
        # self.meta_data_mode_panel = JPanel(GridLayout(0, 1))
        # self.meta_data_mode_panel.add(self.meta_data_mode_label)
        # self.meta_data_mode_panel.add(self.raw_stack_mode)
        # self.meta_data_mode_panel.add(self.projection_mode)
        #
        # self.panel.add(self.meta_data_mode_panel)

        self.run_button = JButton('Run')
        self.run_button.addActionListener(
            ActionListenerFactory(self, self.run_button_al))
        self.panel.add(self.run_button)

        super(BobGui, self).__init__("BobPy")
        self.getContentPane().add(self.panel)
        self.pack()
        self.setLocationRelativeTo(None)
        self.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)
        self.setVisible(True)
Exemplo n.º 23
0
    def __init__(self):
        self.programs = []
        self.setLayout(BoxLayout(self, BoxLayout.PAGE_AXIS))

        self.JprogramList = JList()
        self.JprogramList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION)
        self.JprogramList.addListSelectionListener(self.handle_select)
        scrollPane = JScrollPane(self.JprogramList)
        scrollPane.setMinimumSize(Dimension(300, 0))

        self.splitPane = SplitPanel(scrollPane, JPanel())
        self.add(self.splitPane)
        context.addon.register_on_connect(self.load_program_list)
        context.addon.register_on_error(self.display_error)
Exemplo n.º 24
0
    def __init__(self):
        self.panel_update_cookies = Panel_Fetch_Update_Cookies()
        self.panel_remove_cookies = Panel_Remove_Cookies()
        self.panel_extension = Panel_Extension()

        self.setLayout(BoxLayout(self, BoxLayout.Y_AXIS))
        self.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20))

        self.add(self.panel_extension)
        self.add(SHA.sha_panel)
        self.add(self.panel_update_cookies)
        self.add(self.panel_remove_cookies)

        self.panel_extension.load_profiles()
Exemplo n.º 25
0
    def createButtonPane(self):
        """Create a new button pane for the message editor tab"""
        self._button_listener = EditorButtonListener(self)

        panel = JPanel()
        panel.setLayout(BoxLayout(panel, BoxLayout.Y_AXIS))

        if self._editable:
            panel.add(self.createButton("Validate", "validate"))
        panel.add(self.createButton("Save Type", "save-type"))
        panel.add(self.createButton("Load Type", "load-type"))
        panel.add(self.createButton("Edit Type", "edit-type"))
        panel.add(self.createButton("Reset", "reset"))
        return panel
Exemplo n.º 26
0
 def create_table_panel(self, opt):
     #テーブル系
     panel = swing.JPanel()
     panel.setPreferredSize(Dimension(Short.MAX_VALUE, 70))
     panel.setLayout(BorderLayout())
     panel.setLayout(BoxLayout(panel, BoxLayout.X_AXIS))
     #table
     list = self.create_table(opt, panel)
     #button
     buttons = self.create_buttons_y(opt)
     border = BevelBorder(BevelBorder.RAISED)
     panel.add(buttons)
     panel.add(list)
     return panel
Exemplo n.º 27
0
 def __init__(self):
     super(OptionsPanel, self).__init__()
     self.setLayout(BoxLayout(self, BoxLayout.Y_AXIS))
     self._add_label('Database')
     self._add_panel(DatabasePanel())
     self._add_label('Scope tools')
     self._add_panel(ScopeToolsPanel())
     self._add_label('Excluded extensions')
     self._add_panel(ExcludedExtensionsPanel())
     self._add_label('Excluded status codes')
     self._add_panel(ExcludedStatusCodesPanel())
     self._add_label('Misc')
     self._add_panel(OverwriteDuplicateItemsPanel())
     self._add_panel(ProcessOnlyInScopeRequestsPanel())
     self._add_panel(SetInProgressStatusWhenSendingItemToToolPanel())
Exemplo n.º 28
0
    def run( self ) :
        frame = JFrame(
           'GridLayoutDemo',
            defaultCloseOperation = JFrame.EXIT_ON_CLOSE
        )

        main = JPanel()
        main.setLayout( BoxLayout( main, BoxLayout.Y_AXIS ) )
        self.panes = []
        self.addButtons( main, 'Horizontal:' )
        self.addButtons( main, 'Vertical:' )
        frame.add( main )

        frame.setSize( 500, 250 )
        frame.setVisible( 1 )
Exemplo n.º 29
0
 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.label1 = JLabel("*** Default mime types.")
     self.label2 = JLabel(" ")
     self.label3 = JLabel("octet-stream x-splite3 vnd.ms-excel.sheet.4 msoffice")
     self.label4 = JLabel("msword vnd.ms-excel vnd.ms-powerpoint")
     self.label5 = JLabel(" ")
     self.checkbox = JCheckBox("Default Mime Types Files", actionPerformed=self.checkBoxEvent)
     self.checkbox1 = JCheckBox("All Mime Types Files", actionPerformed=self.checkBoxEvent)
     self.checkbox2 = JCheckBox("Include Slack Space Of Files", actionPerformed=self.checkBoxEvent)
     self.panel1.add(self.label1)
     self.panel1.add(self.label2)
     self.panel1.add(self.label3)
     self.panel1.add(self.label4)
     self.panel1.add(self.label5)
     self.panel1.add(self.checkbox)
     self.panel1.add(self.checkbox1)
     self.panel1.add(self.checkbox2)
     self.add(self.panel1)
Exemplo n.º 30
0
    def initUI(self, config):
        self.setLayout(BoxLayout(self.getContentPane(), BoxLayout.Y_AXIS))
        self.entries = config.keys()
        self.hash4keys = dict()

        self.panelEntries = JPanel()
        self.panelEntries.setLayout(BoxLayout(self.panelEntries,BoxLayout.Y_AXIS))
        self.add(self.panelEntries)

        #buttons
        self.panelButtons = JPanel()
        self.panelButtons.setLayout(BoxLayout(self.panelButtons,BoxLayout.X_AXIS))
        #'Configuration list:')
        self.addB = JButton('Add')
        self.addB.actionPerformed = self.add_entry
        self.removeB = JButton('Remove')
        self.removeB.actionPerformed = self.remove_entry
        self.saveB = JButton('Save')
        self.saveB.actionPerformed = self.save_config
        # pack buttons
        self.add(self.panelButtons)
        self.panelButtons.add(self.addB)
        self.panelButtons.add(self.removeB)
        self.panelButtons.add(self.saveB)

        self.config_item_dict = {}
        self.select_key_rb_group = ButtonGroup()
        self.select_default_rb_group = ButtonGroup()
        for key in self.entries:
            if key == 'default':
                continue
            self.add_UI_entry(key, config[key])
        self.pack()
        self.setLocation(150,150)

        self.setVisible(True)