@@ -34,7 +34,7 @@ public class RSAAttackView extends Composite {
3434
3535 private Composite cAttackFixed ;
3636 private Composite cFieldsFixed ;
37- private Composite cButtonsFixed ;
37+ private Group cButtonsFixed ;
3838 private Group gPublicKeysFixed ;
3939 private Group gCalculationsFixed ;
4040 private Group gCipherTextFixed ;
@@ -91,7 +91,7 @@ public class RSAAttackView extends Composite {
9191 private Text tTextSETUP1 ;
9292 private Text tTextSETUP2 ;
9393 private Composite cAttackSETUP ;
94- private Composite cButtonsSETUP ;
94+ private Group cButtonsSETUP ;
9595 private Button bCalcPrivateKeysSETUP ;
9696 private Button bDecryptTextsSETUP ;
9797 private Label lQSETUP1 ;
@@ -106,10 +106,12 @@ public class RSAAttackView extends Composite {
106106 private Label lCalculationsFixed ;
107107 private Label lCipherTextFixed ;
108108 private Label lDecryptionsFixed ;
109+ private Label lhorizontalSeparatorFixed ;
109110 private Label lPublicKeysSETUP ;
110111 private Label lCalculationsSETUP ;
111112 private Label lCipherTextSETUP ;
112113 private Label lDecryptionsSETUP ;
114+ private Label lhorizontalSeparatorSETUP ;
113115 private Composite cDescriptionFixed ;
114116 private Label lDescTitleFixed ;
115117 private StyledText stSpecDescFixed ;
@@ -209,17 +211,21 @@ private void setUpAttackStack(Composite localParent) {
209211 * @param localParent The Fixed P composite contained in the StackLayout.
210212 */
211213 private void setUpAttackFixed (Composite localParent ) {
212- cButtonsFixed = new Composite (localParent , SWT .BORDER );
213- cButtonsFixed .setLayout (new GridLayout (1 , false ));
214- cButtonsFixed .setLayoutData (new GridData (SWT .FILL , SWT .FILL , false , true , 1 , 1 ));
215-
216- setUpButtonsFixed (cButtonsFixed );
217214
218- cFieldsFixed = new Composite (localParent , SWT .BORDER );
219- cFieldsFixed .setLayout (new GridLayout (1 , false ));
215+ cFieldsFixed = new Composite (localParent , SWT .NONE );
216+ GridLayout gl_cFieldsFixed = new GridLayout (1 , false );
217+ gl_cFieldsFixed .marginWidth = 0 ;
218+ gl_cFieldsFixed .marginHeight = 0 ;
219+ cFieldsFixed .setLayout (gl_cFieldsFixed );
220220 cFieldsFixed .setLayoutData (new GridData (SWT .FILL , SWT .FILL , true , true , 3 , 1 ));
221221
222222 setUpFieldsFixed (cFieldsFixed );
223+
224+ cButtonsFixed = new Group (localParent , SWT .NONE );
225+ cButtonsFixed .setLayout (new GridLayout (1 , false ));
226+ cButtonsFixed .setLayoutData (new GridData (SWT .FILL , SWT .FILL , false , true , 1 , 1 ));
227+
228+ setUpButtonsFixed (cButtonsFixed );
223229 }
224230
225231 /**
@@ -238,6 +244,11 @@ private void setUpButtonsFixed(Composite localParent) {
238244 bDecryptTextsFixed = new Button (localParent , SWT .PUSH );
239245 bDecryptTextsFixed .setLayoutData (new GridData (SWT .FILL , SWT .TOP , false , false , 1 , 1 ));
240246 bDecryptTextsFixed .setText (Messages .RSAAttackView_Fixed_Decrypt_Cipher );
247+
248+ lhorizontalSeparatorFixed = new Label (localParent , SWT .HORIZONTAL | SWT .SEPARATOR );
249+ GridData gd_lhorizontalSeparatorFixed = new GridData (SWT .FILL , SWT .CENTER , false , false );
250+ gd_lhorizontalSeparatorFixed .verticalIndent = 15 ;
251+ lhorizontalSeparatorFixed .setLayoutData (gd_lhorizontalSeparatorFixed );
241252
242253 bBackFixed = new Button (localParent , SWT .PUSH );
243254 bBackFixed .setLayoutData (new GridData (SWT .FILL , SWT .TOP , false , false , 1 , 1 ));
@@ -524,17 +535,21 @@ private void setUpDecryptionsFixed(Composite localParent) {
524535 * @param localParent The parent control of the SETUP fields.
525536 */
526537 private void setUpAttackSETUP (Composite localParent ) {
527- cButtonsSETUP = new Composite (localParent , SWT .BORDER );
528- cButtonsSETUP .setLayout (new GridLayout (1 , false ));
529- cButtonsSETUP .setLayoutData (new GridData (SWT .FILL , SWT .FILL , false , true , 1 , 1 ));
530-
531- setUpButtonsSETUP (cButtonsSETUP );
532538
533- cFieldsSETUP = new Composite (localParent , SWT .BORDER );
534- cFieldsSETUP .setLayout (new GridLayout (1 , false ));
539+ cFieldsSETUP = new Composite (localParent , SWT .NONE );
540+ GridLayout gl_cFieldsSETUP = new GridLayout (1 , false );
541+ gl_cFieldsSETUP .marginWidth = 0 ;
542+ gl_cFieldsSETUP .marginHeight = 0 ;
543+ cFieldsSETUP .setLayout (gl_cFieldsSETUP );
535544 cFieldsSETUP .setLayoutData (new GridData (SWT .FILL , SWT .FILL , true , true , 3 , 1 ));
536545
537546 setUpFieldsSETUP (cFieldsSETUP );
547+
548+ cButtonsSETUP = new Group (localParent , SWT .NONE );
549+ cButtonsSETUP .setLayout (new GridLayout (1 , false ));
550+ cButtonsSETUP .setLayoutData (new GridData (SWT .FILL , SWT .FILL , false , true , 1 , 1 ));
551+
552+ setUpButtonsSETUP (cButtonsSETUP );
538553 }
539554
540555 /**
@@ -553,6 +568,11 @@ private void setUpButtonsSETUP(Composite localParent) {
553568 bDecryptTextsSETUP = new Button (localParent , SWT .PUSH );
554569 bDecryptTextsSETUP .setLayoutData (new GridData (SWT .FILL , SWT .TOP , false , false , 1 , 1 ));
555570 bDecryptTextsSETUP .setText (Messages .RSAAttackView_SETUP_Decrypt_Cipher );
571+
572+ lhorizontalSeparatorSETUP = new Label (localParent , SWT .HORIZONTAL | SWT .SEPARATOR );
573+ GridData gd_lhorizontalSeparatorSETUP = new GridData (SWT .FILL , SWT .CENTER , false , false );
574+ gd_lhorizontalSeparatorSETUP .verticalIndent = 15 ;
575+ lhorizontalSeparatorSETUP .setLayoutData (gd_lhorizontalSeparatorSETUP );
556576
557577 bBackSETUP = new Button (localParent , SWT .PUSH );
558578 bBackSETUP .setLayoutData (new GridData (SWT .FILL , SWT .TOP , false , false , 1 , 1 ));
@@ -948,9 +968,11 @@ public void saveCipherTextSETUP() {
948968 */
949969 private void setUpAttackListeners () {
950970 bCalcGCD .addSelectionListener (new SelectionListener () {
971+ @ Override
951972 public void widgetDefaultSelected (SelectionEvent e ) {
952973 widgetSelected (e );
953974 }
975+ @ Override
954976 public void widgetSelected (SelectionEvent e ) {
955977 // If the user used the same N to generate both saved ciphertexts,
956978 // the attack won't work. Let the user know and don't bother trying.
@@ -972,9 +994,11 @@ public void widgetSelected(SelectionEvent e) {
972994 });
973995
974996 bCalcPrivateKeysFixed .addSelectionListener (new SelectionListener () {
997+ @ Override
975998 public void widgetDefaultSelected (SelectionEvent e ) {
976999 widgetSelected (e );
9771000 }
1001+ @ Override
9781002 public void widgetSelected (SelectionEvent e ) {
9791003 kleptoView .currentStep = 18 ;
9801004 kleptoView .klepto .attack .calculatePrivateKeysFixed ();
@@ -992,9 +1016,11 @@ public void widgetSelected(SelectionEvent e) {
9921016 });
9931017
9941018 bDecryptTextsFixed .addSelectionListener (new SelectionListener () {
1019+ @ Override
9951020 public void widgetDefaultSelected (SelectionEvent e ) {
9961021 widgetSelected (e );
9971022 }
1023+ @ Override
9981024 public void widgetSelected (SelectionEvent e ) {
9991025 kleptoView .currentStep = 19 ;
10001026 kleptoView .klepto .attack .decryptFixed ();
@@ -1005,9 +1031,11 @@ public void widgetSelected(SelectionEvent e) {
10051031 });
10061032
10071033 bDecryptP .addSelectionListener (new SelectionListener () {
1034+ @ Override
10081035 public void widgetDefaultSelected (SelectionEvent e ) {
10091036 widgetSelected (e );
10101037 }
1038+ @ Override
10111039 public void widgetSelected (SelectionEvent e ) {
10121040 kleptoView .currentStep = 10 ;
10131041 kleptoView .klepto .attack .getPFromN (
@@ -1022,9 +1050,11 @@ public void widgetSelected(SelectionEvent e) {
10221050 });
10231051
10241052 bCalcPrivateKeysSETUP .addSelectionListener (new SelectionListener () {
1053+ @ Override
10251054 public void widgetDefaultSelected (SelectionEvent e ) {
10261055 widgetSelected (e );
10271056 }
1057+ @ Override
10281058 public void widgetSelected (SelectionEvent e ) {
10291059 kleptoView .currentStep = 11 ;
10301060 kleptoView .klepto .attack .calculatePrivateKeysSETUP ();
@@ -1042,9 +1072,11 @@ public void widgetSelected(SelectionEvent e) {
10421072 });
10431073
10441074 bDecryptTextsSETUP .addSelectionListener (new SelectionListener () {
1075+ @ Override
10451076 public void widgetDefaultSelected (SelectionEvent e ) {
10461077 widgetSelected (e );
10471078 }
1079+ @ Override
10481080 public void widgetSelected (SelectionEvent e ) {
10491081 kleptoView .currentStep = 12 ;
10501082 kleptoView .klepto .attack .decryptSETUP ();
@@ -1055,18 +1087,22 @@ public void widgetSelected(SelectionEvent e) {
10551087 });
10561088
10571089 bBackFixed .addSelectionListener (new SelectionListener () {
1090+ @ Override
10581091 public void widgetDefaultSelected (SelectionEvent e ) {
10591092 widgetSelected (e );
10601093 }
1094+ @ Override
10611095 public void widgetSelected (SelectionEvent e ) {
10621096 kleptoView .setTabSelection (0 );
10631097 }
10641098 });
10651099
10661100 bBackSETUP .addSelectionListener (new SelectionListener () {
1101+ @ Override
10671102 public void widgetDefaultSelected (SelectionEvent e ) {
10681103 widgetSelected (e );
10691104 }
1105+ @ Override
10701106 public void widgetSelected (SelectionEvent e ) {
10711107 kleptoView .setTabSelection (0 );
10721108 }
0 commit comments