1
1
package org.zaproxy.zap.extension.reflect
2
2
3
3
import org.parosproxy.paros.extension.AbstractPanel
4
+ import org.parosproxy.paros.view.View
4
5
import java.awt.BorderLayout
5
6
import javax.swing.JScrollPane
6
- import javax.swing.JSplitPane
7
7
import javax.swing.JTable
8
8
import javax.swing.ListSelectionModel
9
9
import javax.swing.table.AbstractTableModel
@@ -13,7 +13,6 @@ import javax.swing.table.TableRowSorter
13
13
class ReflectPanel : AbstractPanel () {
14
14
val model = ReflectionsModel ()
15
15
val table = JTable (model)
16
- private val reqResEditor = ReflectMessage ()
17
16
18
17
init {
19
18
ReflectionActions (this , model.reflections)
@@ -37,20 +36,13 @@ class ReflectPanel : AbstractPanel() {
37
36
val displayedReflections = model.displayedReflections
38
37
val selectedRow = table.convertRowIndexToModel(table.selectedRow)
39
38
val requestResponse = displayedReflections[selectedRow].msg
40
- reqResEditor.displayReqRes (requestResponse)
39
+ View .getSingleton().displayMessage (requestResponse)
41
40
}
42
41
}
43
42
name = " Reflect"
44
43
layout = BorderLayout ()
45
44
val reflectionsTable = JScrollPane (table)
46
- val panel = JSplitPane (JSplitPane .VERTICAL_SPLIT )
47
- val reqResSplit =
48
- JSplitPane (JSplitPane .HORIZONTAL_SPLIT , reqResEditor.requestPanel, reqResEditor.responsePanel)
49
- reqResSplit.resizeWeight = 0.5
50
- panel.topComponent = reflectionsTable
51
- panel.bottomComponent = reqResSplit
52
- panel.resizeWeight = 0.5
53
- add(panel)
45
+ add(reflectionsTable)
54
46
}
55
47
56
48
fun addReflection (reflection : ReflectedResponse ) {
@@ -141,5 +133,4 @@ class ReflectionsModel : AbstractTableModel() {
141
133
displayedReflections = updatedReflection
142
134
fireTableDataChanged()
143
135
}
144
-
145
- }
136
+ }
0 commit comments