4
4
import burp .BurpExtender ;
5
5
import burp .api .montoya .core .ByteArray ;
6
6
import burp .api .montoya .ui .editor .RawEditor ;
7
- import java . awt . BorderLayout ;
8
- import javax .swing .JPanel ;
9
- import javax .swing .JSplitPane ;
10
- import javax . swing . JTabbedPane ;
7
+
8
+ import javax .swing .* ;
9
+ import javax .swing .border . EmptyBorder ;
10
+ import java . awt .* ;
11
11
12
12
import static java .util .Objects .requireNonNull ;
13
13
@@ -26,52 +26,62 @@ public SamlMain(SamlTabController controller) {
26
26
}
27
27
28
28
private void initializeUI () {
29
- setLayout (new BorderLayout (0 , 0 ));
30
-
31
- JSplitPane splitPaneAction = new JSplitPane ();
32
- splitPaneAction .setOrientation (JSplitPane .VERTICAL_SPLIT );
33
- splitPaneAction .setDividerSize (5 );
34
- add (splitPaneAction , BorderLayout .CENTER );
29
+ panelAction = new SamlPanelAction (controller );
35
30
36
31
JPanel panelActionTop = new JPanel ();
37
- splitPaneAction .setLeftComponent (panelActionTop );
38
- panelActionTop .setLayout (new BorderLayout (0 , 0 ));
39
- panelAction = new SamlPanelAction (controller );
32
+ panelActionTop .setLayout (new BorderLayout ());
33
+ panelActionTop .setPreferredSize (new Dimension (0 , 460 ));
40
34
panelActionTop .add (panelAction );
41
35
42
- JPanel panelActionBottom = new JPanel ();
43
- splitPaneAction .setRightComponent (panelActionBottom );
44
- panelActionBottom .setLayout (new BorderLayout (0 , 0 ));
45
36
textEditorAction = BurpExtender .api .userInterface ().createRawEditor ();
46
37
textEditorAction .setContents (ByteArray .byteArray ("<SAMLRaiderFailureInInitialization></SAMLRaiderFailureInInitialization>" ));
47
38
textEditorAction .setEditable (false );
39
+
40
+ JPanel panelActionBottom = new JPanel ();
41
+ panelActionBottom .setLayout (new BorderLayout ());
42
+ panelActionBottom .setPreferredSize (new Dimension (0 , 100 ));
48
43
panelActionBottom .add (textEditorAction .uiComponent (), BorderLayout .CENTER );
49
44
50
- JSplitPane splitPaneInformation = new JSplitPane ();
51
- splitPaneInformation .setOrientation (JSplitPane .VERTICAL_SPLIT );
52
- splitPaneAction .setDividerSize (5 );
53
- add (splitPaneInformation , BorderLayout .CENTER );
45
+ JSplitPane splitPaneAction = new JSplitPane ();
46
+ splitPaneAction .setOrientation (JSplitPane .VERTICAL_SPLIT );
47
+ splitPaneAction .setLeftComponent (panelActionTop );
48
+ splitPaneAction .setRightComponent (panelActionBottom );
49
+ splitPaneAction .resetToPreferredSizes ();
54
50
55
- JPanel panelInformationTop = new JPanel ();
56
- splitPaneInformation .setLeftComponent ((panelInformationTop ));
57
- panelInformationTop .setLayout (new BorderLayout (0 , 0 ));
58
51
panelInformation = new SamlPanelInfo ();
52
+
53
+ JPanel panelInformationTop = new JPanel ();
54
+ panelInformationTop .setLayout (new BorderLayout ());
55
+ panelInformationTop .setPreferredSize (new Dimension (0 , 375 ));
59
56
panelInformationTop .add (panelInformation );
60
57
61
- JPanel panelInformationBottom = new JPanel ();
62
- splitPaneInformation .setRightComponent (panelInformationBottom );
63
- panelInformationBottom .setLayout (new BorderLayout (0 , 0 ));
64
58
textEditorInformation = BurpExtender .api .userInterface ().createRawEditor ();
65
59
textEditorInformation .setContents (ByteArray .byteArray ("" ));
60
+
61
+ var panelInformationBottomLabel = new JLabel ("Parsed & Prettified" );
62
+ panelInformationBottomLabel .setBorder (new EmptyBorder (5 , 5 , 5 , 5 ));
63
+
64
+ JPanel panelInformationBottom = new JPanel ();
65
+ panelInformationBottom .setLayout (new BorderLayout ());
66
+ panelInformationBottom .setPreferredSize (new Dimension (0 , 100 ));
67
+ panelInformationBottom .add (panelInformationBottomLabel , BorderLayout .NORTH );
66
68
panelInformationBottom .add (textEditorInformation .uiComponent (), BorderLayout .CENTER );
67
69
70
+ JSplitPane splitPaneInformation = new JSplitPane ();
71
+ splitPaneInformation .setOrientation (JSplitPane .VERTICAL_SPLIT );
72
+ splitPaneInformation .setLeftComponent ((panelInformationTop ));
73
+ splitPaneInformation .setRightComponent (panelInformationBottom );
74
+ splitPaneInformation .resetToPreferredSizes ();
75
+
68
76
JTabbedPane tabbedPane = new JTabbedPane ();
69
- add (tabbedPane );
70
77
tabbedPane .addTab ("SAML Attacks" , null , splitPaneAction , "SAML Attacks" );
71
78
tabbedPane .addTab ("SAML Message Info" , null , splitPaneInformation , "SAML Message Info" );
72
79
73
- this .invalidate ();
74
- this .updateUI ();
80
+ setLayout (new BorderLayout ());
81
+ add (tabbedPane );
82
+
83
+ invalidate ();
84
+ updateUI ();
75
85
}
76
86
77
87
public RawEditor getTextEditorAction () {
0 commit comments