Esempio n. 1
0
    def set_advisory_tab_pane(self, scanner_issue):
        advisory_pane = JEditorPane()
        advisory_pane.setEditable(False)
        advisory_pane.setEnabled(True)
        advisory_pane.setContentType("text/html")
        link_listener = LinkListener()
        advisory_pane.addHyperlinkListener(link_listener)
        advisory = "<html><b>Location</b>: {}<br><br>{}</html>"
        advisory_pane.setText(
            advisory.format(scanner_issue.getUrl().encode("utf-8"),
                            scanner_issue.getIssueDetail()))

        return JScrollPane(advisory_pane)
Esempio n. 2
0
    def set_advisory_tab_pane(self, scanner_issue):
        advisory_pane = JEditorPane()
        advisory_pane.setEditable(False)
        advisory_pane.setEnabled(True)
        advisory_pane.setContentType("text/html")
        link_listener = LinkListener()
        advisory_pane.addHyperlinkListener(link_listener)
        fmt = "<html><b>Location</b>: {}<br><br>{}</html>"
        advisory_pane.setText(fmt.format(scanner_issue.getUrl(),
                                         scanner_issue.getIssueDetail()))

        # Set a context menu
        self.set_context_menu(advisory_pane, scanner_issue)

        return JScrollPane(advisory_pane)