Python javax.swing.JScrollPane() Examples

The following are 10 code examples of javax.swing.JScrollPane(). 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: BurpExtension.py    From lightbulb-framework with MIT License 6 votes vote down vote up
def createLibraryTabs(self):
        self._libraryTabs = JTabbedPane()
        self.LearningViewer = JTabbedPane()
        self.DifferentialViewer = JTabbedPane()
        self._libraryTabs.addTab("Learning", self.LearningViewer)
        self._libraryTabs.addTab(
            "Differential Learning",
            self.DifferentialViewer)
        TreesViewer = LibraryTable(
            self, model=LibraryTableModel(
                self._db, "Tree"))
        ScrollTreesViewer = JScrollPane(TreesViewer)
        TreesViewer.redrawTable()
        self._libraryTabs.addTab("Tree", ScrollTreesViewer)
        self._callbacks.customizeUiComponent(self._libraryTabs)
        return self.LearningViewer, self.DifferentialViewer, TreesViewer 
Example #2
Source File: BurpExtension.py    From lightbulb-framework with MIT License 6 votes vote down vote up
def createLibrarySubSubTabs(self, jtabbedpane, subcategory):
        RegexesViewer = LibraryTable(
            self, model=LibraryTableModel(
                self._db, "Regex", subcategory))
        # RegexesViewer.setAutoCreateRowSorter()
        ScrollRegexesViewer = JScrollPane(RegexesViewer)
        RegexesViewer.redrawTable()
        GrammarsViewer = LibraryTable(
            self, model=LibraryTableModel(
                self._db, "Grammar", subcategory + 1))
        # GrammarsViewer.setAutoCreateRowSorter()
        ScrollGrammarsViewer = JScrollPane(GrammarsViewer)
        GrammarsViewer.redrawTable()
        jtabbedpane.addTab("Regex", ScrollRegexesViewer)
        jtabbedpane.addTab("Grammar", ScrollGrammarsViewer)
        self._callbacks.customizeUiComponent(jtabbedpane)
        return RegexesViewer, GrammarsViewer 
Example #3
Source File: BurpExtension.py    From lightbulb-framework with MIT License 6 votes vote down vote up
def createSettingsTabs(self):
        settignsTabs = JTabbedPane()
        self.ServerViewer = SettingsTable(
            self, model=SettingsTableModel(
                self._db, "Browser"))
        ScrollServerViewer = JScrollPane(self.ServerViewer)
        self.ServerViewer.redrawTable()
        self.MysqlViewer = SettingsTable(
            self, model=SettingsTableModel(
                self._db, "MySQL"))
        ScrollMysqlViewer = JScrollPane(self.MysqlViewer)
        self.MysqlViewer.redrawTable()
        self.LearningViewer = SettingsTable(
            self, model=SettingsTableModel(
                self._db, "Learning"))
        ScrollLearningViewer = JScrollPane(self.LearningViewer)
        self.LearningViewer.redrawTable()
        settignsTabs.addTab("Web Browser", ScrollServerViewer)
        settignsTabs.addTab("MySQL Client", ScrollMysqlViewer)
        settignsTabs.addTab("Learning", ScrollLearningViewer)
        self._callbacks.customizeUiComponent(settignsTabs)
        # TODO: consider adding the results when clicking the tab (lazy
        # instantiation) since it can get slow

        return settignsTabs 
Example #4
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(MainPanel, self).__init__()
        self.extender = extender
        self.setLayout(BorderLayout())
        self.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        # Create children
        self.tree = ResultTree(extender)
        # Add children
        self.add(JScrollPane(self.tree), BorderLayout.CENTER) 
Example #5
Source File: BurpExtension.py    From lightbulb-framework with MIT License 5 votes vote down vote up
def createLibrarySubSubTabs2(self, jtabbedpane, subcategory):
        RegexesViewer = LibraryTable(
            self, model=LibraryTableModel(
                self._db, "Regex", subcategory))
        ScrollRegexesViewer = JScrollPane(RegexesViewer)
        RegexesViewer.redrawTable()
        jtabbedpane.addTab("Regex", ScrollRegexesViewer)
        self._callbacks.customizeUiComponent(jtabbedpane)
        return RegexesViewer, None 
Example #6
Source File: blind_xss.py    From femida with MIT License 5 votes vote down vote up
def createAnyTable(self, table_model, table_number, min_size):
        _table = JTable(table_model)
        _table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS)
        for i in range(2):
            column = _table.getColumnModel().getColumn(i)
            if i == 0:
                column.setPreferredWidth(250)
            else:
                column.setPreferredWidth(50)

        _scrolltable = JScrollPane(_table)
        _scrolltable.setMinimumSize(min_size)
        return _scrolltable 
Example #7
Source File: burp_git_bridge.py    From burp-git-bridge with MIT License 5 votes vote down vote up
def __init__(self, callbacks, bottom_pane, log):
        self.logTable = UiLogTable(callbacks, bottom_pane, log.gui_log)
        scrollPane = JScrollPane(self.logTable)
        self.addTab("Repo", scrollPane)
        callbacks.customizeUiComponent(self) 
Example #8
Source File: typedef_tab.py    From blackboxprotobuf with MIT License 5 votes vote down vote up
def __init__(self, burp_callbacks):
        self._burp_callbacks = burp_callbacks

        self._type_list_component = JList(blackboxprotobuf.known_messages.keys())
        self._type_list_component.setSelectionMode(ListSelectionModel.SINGLE_SELECTION)

        self._component = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
        self._component.setLeftComponent(JScrollPane(self._type_list_component))
        self._component.setRightComponent(self.createButtonPane())
        self._component.setResizeWeight(0.9) 
Example #9
Source File: propertyeditor.py    From inql with Apache License 2.0 4 votes vote down vote up
def __private_init__(self, text="Property Editor", columns=None, data=None, empty=None, add_actions=True, actions=None):
        if not actions: actions = []
        if not columns: columns = []
        if data == None: data = []
        if not empty: empty = []

        self._text = text
        self.this = JFrame(text)
        self._table = JTable()
        self._dtm = DefaultTableModel(0, 0)
        self._dtm.setColumnIdentifiers(columns)
        self._table.setModel(self._dtm)
        self._data = data
        for d in data:
            self._dtm.addRow(d)
        self._pane = JScrollPane(self._table)
        self.this.add(self._pane)
        self._empty = empty

        self.this.addWindowListener(self)

        self._dtm.addTableModelListener(lambda _: self._update_model())
        self.this.setLocation(PropertyEditor.NEW_WINDOW_OFFSET, PropertyEditor.NEW_WINDOW_OFFSET)

        if add_actions:
            self._popup = JPopupMenu()
            self._pane.setComponentPopupMenu(self._popup)
            inherits_popup_menu(self._pane)

            self._actions = actions
            self._actions.append(ExecutorAction('Remove Selected Rows', action=lambda e: self._remove_row()))
            self._actions.append(ExecutorAction('Add New Row', action=lambda e: self._add_row()))

            for action in self._actions:
                self._popup.add(action.menuitem)

        self.this.setForeground(Color.black)
        self.this.setBackground(Color.lightGray)
        self.this.pack()
        self.this.setVisible(True)
        self.this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE)

        return self 
Example #10
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)
                )
            )
        )