Python javax.swing.JPanel() Examples

The following are 9 code examples of javax.swing.JPanel(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module javax.swing , or try the search function .
Example #1
Source File: tracer.py    From burp-tracer with GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, extender):
        # Initialize self
        super(TitlePanel, self).__init__()
        self.extender = extender
        self.setLayout(GridLayout(2, 1))
        # Create children
        self.title = JLabel('Tracer')
        self.subtitle = JPanel()
        self.label = JLabel('Allows you to trace where inputs are reflected back to the user. Click "Start" to analyze the current site map.')
        # Configure children
        self.title.setFont(Fonts.Heading)
        self.title.setForeground(Colors.Orange)
        self.subtitle.layout.hgap = 0
        # Add children
        self.add(self.title)
        self.add(self.subtitle)
        self.subtitle.add(self.label) 
Example #2
Source File: tracer.py    From burp-tracer with GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, extender):
        # Initialize self
        super(FooterPanel, self).__init__()
        self.extender = extender
        self.setLayout(GridLayout(2, 1))
        # Create children
        self.progressInput = JProgressBar(0, 10000)
        self.progressOutput = JProgressBar(0, 10000)
        self.credit = JPanel()
        # Configure children
        self.progressInput.string = 'Ready'
        self.progressOutput.string = 'Ready'
        self.progressInput.stringPainted = True
        self.progressOutput.stringPainted = True
        # Add children
        self.add(self.progressInput)
        self.add(self.progressOutput) 
Example #3
Source File: tracer.py    From burp-tracer with GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, extender):
        # Initialize self
        super(ActionsPanel, self).__init__()
        self.extender = extender
        self.setLayout(GridLayout(2, 1))
        # Create children
        self.title = JLabel('Actions')
        self.actions = JPanel(GridLayout(1, 3))
        self.start = JButton('Start')
        self.info = JButton('Info')
        # Configure children
        self.title.setFont(Fonts.Heading)
        self.title.setForeground(Colors.Orange)
        self.actions.layout.vgap = 0
        self.actions.layout.hgap = 0
        self.start.addActionListener(StartActionListener(extender))
        self.info.addActionListener(InfoActionListener(extender))
        # Add children
        self.add(self.title)
        self.add(self.actions)
        self.actions.add(self.start)
        self.actions.add(self.info) 
Example #4
Source File: typedef_editor.py    From blackboxprotobuf with MIT License 4 votes vote down vote up
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 
Example #5
Source File: typedef_tab.py    From blackboxprotobuf with MIT License 4 votes vote down vote up
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 
Example #6
Source File: editor.py    From blackboxprotobuf with MIT License 4 votes vote down vote up
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 
Example #7
Source File: omnibar.py    From inql with Apache License 2.0 4 votes vote down vote up
def __init__(self, hint=None, label=None, action=None):
        if not hint: hint = 'Omnibar hint'
        if not label: label = 'Run'
        if not action: action = nop_evt
        self.this = JPanel()
        self.this.setLayout(BorderLayout())

        # Add an hinttextfield
        self._text = _HintTextField(hint, action)
        self.this.add(BorderLayout.CENTER, self._text.this)

        # Add a run buttpn
        button = JButton(label)
        button.addActionListener(action)
        self.this.add(BorderLayout.EAST, button) 
Example #8
Source File: main.py    From aws-extender with MIT License 3 votes vote down vote up
def build_gui(self):
        """Construct GUI elements."""
        panel = JPanel(BorderLayout(3, 3))
        panel.setBorder(EmptyBorder(160, 160, 160, 160))

        self.aws_access_key_inpt = JTextField(10)
        self.aws_secret_key_inpt = JTextField(10)
        self.aws_session_token_inpt = JTextField(10)
        self.gs_access_key_inpt = JTextField(10)
        self.gs_secret_key_inpt = JTextField(10)
        self.wordlist_path_inpt = JTextField(10)
        self.passive_mode = JCheckBox('Enabled')
        self.ssl_verification = JCheckBox('Enabled')

        save_btn = JButton('Save', actionPerformed=self.save_config)

        labels = JPanel(GridLayout(0, 1))
        inputs = JPanel(GridLayout(0, 1))
        panel.add(labels, BorderLayout.WEST)
        panel.add(inputs, BorderLayout.CENTER)

        top_label = JLabel('<html><b>Settings</b><br><br></html>')
        top_label.setHorizontalAlignment(JLabel.CENTER)
        panel.add(top_label, BorderLayout.NORTH)
        labels.add(JLabel('AWS Access Key:'))
        inputs.add(self.aws_access_key_inpt)
        labels.add(JLabel('AWS Secret Key:'))
        inputs.add(self.aws_secret_key_inpt)
        labels.add(JLabel('AWS Session Key (optional):'))
        inputs.add(self.aws_session_token_inpt)
        labels.add(JLabel('GS Access Key:'))
        inputs.add(self.gs_access_key_inpt)
        labels.add(JLabel('GS Secret Key:'))
        inputs.add(self.gs_secret_key_inpt)
        labels.add(JLabel('Wordlist Filepath (optional):'))
        inputs.add(self.wordlist_path_inpt)
        labels.add(JLabel('Passive Mode:'))
        inputs.add(self.passive_mode)
        labels.add(JLabel('SSL Verification:'))
        inputs.add(self.ssl_verification)
        panel.add(save_btn, BorderLayout.SOUTH)
        return panel 
Example #9
Source File: FransLinkfinder.py    From BurpJSLinkFinder with MIT License 3 votes vote down vote up
def initUI(self):
        self.tab = swing.JPanel()

        # UI for Output
        self.outputLabel = swing.JLabel("LinkFinder Log:")
        self.outputLabel.setFont(Font("Tahoma", Font.BOLD, 14))
        self.outputLabel.setForeground(Color(255,102,52))
        self.logPane = swing.JScrollPane()
        self.outputTxtArea = swing.JTextArea()
        self.outputTxtArea.setFont(Font("Consolas", Font.PLAIN, 12))
        self.outputTxtArea.setLineWrap(True)
        self.logPane.setViewportView(self.outputTxtArea)
        self.clearBtn = swing.JButton("Clear Log", actionPerformed=self.clearLog)
        self.exportBtn = swing.JButton("Export Log", actionPerformed=self.exportLog)
        self.parentFrm = swing.JFileChooser()



        # Layout
        layout = swing.GroupLayout(self.tab)
        layout.setAutoCreateGaps(True)
        layout.setAutoCreateContainerGaps(True)
        self.tab.setLayout(layout)
      
        layout.setHorizontalGroup(
            layout.createParallelGroup()
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup()
                    .addComponent(self.outputLabel)
                    .addComponent(self.logPane)
                    .addComponent(self.clearBtn)
                    .addComponent(self.exportBtn)
                )
            )
        )
        
        layout.setVerticalGroup(
            layout.createParallelGroup()
            .addGroup(layout.createParallelGroup()
                .addGroup(layout.createSequentialGroup()
                    .addComponent(self.outputLabel)
                    .addComponent(self.logPane)
                    .addComponent(self.clearBtn)
                    .addComponent(self.exportBtn)
                )
            )
        )