本文整理汇总了Python中javax.swing.JList方法的典型用法代码示例。如果您正苦于以下问题:Python swing.JList方法的具体用法?Python swing.JList怎么用?Python swing.JList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing
的用法示例。
在下文中一共展示了swing.JList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JList [as 别名]
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)
示例2: findInteresting
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JList [as 别名]
def findInteresting(self, host, headers):
list_boring_headers = []
model = self.boringHeadersList.getModel()
# Get list of boring headers from the GUI JList
for i in range(0, model.getSize()):
list_boring_headers.append(model.getElementAt(i))
issuename = "Interesting Header(s)"
issuelevel = "Low"
issuedetail = "<p>The response includes the following potentially interesting headers:</p><ul>"
log = "[+] Interesting Headers found: " + host + "\n"
found = 0
for header in headers:
if header.lower() not in list_boring_headers:
issuedetail += "<li>Header name: <b>" + header + "</b>. Header value: <b>" + headers[header] + "</b></li>"
log += " Header name:" + header + " Header value:" + headers[header] + "\n"
host = self._requestResponse.getHttpService().getHost()
report = header + ":" + headers[header]
if report not in self.global_issues[host]["Interesting"]: # If header not already in the list we store it
self.global_issues[host]["Interesting"].append(report)
found += 1
issuedetail += "</ul>"
if found > 0:
# Create a ScanIssue object and append it to our list of issues, marking the reflected parameter value in the response.
self.scan_issues.append(ScanIssue(self._requestResponse.getHttpService(),
self._helpers.analyzeRequest(self._requestResponse).getUrl(),
issuename, issuelevel, issuedetail))
self.logsTA.append(log)