本文整理匯總了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)