2
* Copyright (c) 2002-2004 JGoodies Karsten Lentzsch. All Rights Reserved.
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions are met:
7
* o Redistributions of source code must retain the above copyright notice,
8
* this list of conditions and the following disclaimer.
10
* o Redistributions in binary form must reproduce the above copyright notice,
11
* this list of conditions and the following disclaimer in the documentation
12
* and/or other materials provided with the distribution.
14
* o Neither the name of JGoodies Karsten Lentzsch nor the names of
15
* its contributors may be used to endorse or promote products derived
16
* from this software without specific prior written permission.
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
20
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
22
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
27
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
package com.jgoodies.forms.factories;
33
import javax.swing.JButton;
34
import javax.swing.JPanel;
36
import com.jgoodies.forms.builder.ButtonBarBuilder;
39
* A factory class that consists only of static methods to build frequently used
40
* button bars. Utilizes the {@link com.jgoodies.forms.builder.ButtonBarBuilder}
41
* that in turn uses the {@link com.jgoodies.forms.layout.FormLayout}
42
* to lay out the bars.<p>
44
* The button bars returned by this builder comply with popular UI style guides.
46
* @author Karsten Lentzsch
47
* @version $Revision: 1.8 $
49
* @see com.jgoodies.forms.builder.ButtonBarBuilder
50
* @see com.jgoodies.forms.util.LayoutStyle
53
public final class ButtonBarFactory {
56
private ButtonBarFactory() {
57
// Suppresses default constructor, ensuring non-instantiability.
61
// General Purpose Factory Methods: Left Aligned ************************
64
* Builds and returns a left aligned bar with one button.
66
* @param button1 the first button to add
67
* @return a button bar with the given button
69
public static JPanel buildLeftAlignedBar(JButton button1) {
70
return buildLeftAlignedBar(new JButton[]{
77
* Builds and returns a left aligned bar with two buttons.
79
* @param button1 the first button to add
80
* @param button2 the second button to add
81
* @return a button bar with the given buttons
83
public static JPanel buildLeftAlignedBar(
84
JButton button1, JButton button2) {
85
return buildLeftAlignedBar(new JButton[]{
93
* Builds and returns a left aligned bar with three buttons.
95
* @param button1 the first button to add
96
* @param button2 the second button to add
97
* @param button3 the third button to add
98
* @return a button bar with the given buttons
100
public static JPanel buildLeftAlignedBar(
101
JButton button1, JButton button2, JButton button3) {
102
return buildLeftAlignedBar(new JButton[]{
103
button1, button2, button3
110
* Builds and returns a left aligned bar with four buttons.
112
* @param button1 the first button to add
113
* @param button2 the second button to add
114
* @param button3 the third button to add
115
* @param button4 the fourth button to add
116
* @return a button bar with the given buttons
118
public static JPanel buildLeftAlignedBar(
119
JButton button1, JButton button2, JButton button3, JButton button4) {
120
return buildLeftAlignedBar(new JButton[]{
121
button1, button2, button3, button4
128
* Builds and returns a left aligned bar with five buttons.
130
* @param button1 the first button to add
131
* @param button2 the second button to add
132
* @param button3 the third button to add
133
* @param button4 the fourth button to add
134
* @param button5 the fifth button to add
135
* @return a button bar with the given buttons
137
public static JPanel buildLeftAlignedBar(
138
JButton button1, JButton button2, JButton button3,
139
JButton button4, JButton button5) {
140
return buildLeftAlignedBar(new JButton[]{
141
button1, button2, button3, button4, button5
148
* Builds and returns a left aligned button bar with the given buttons.
150
* @param buttons an array of buttons to add
151
* @return a left aligned button bar with the given buttons
153
public static JPanel buildLeftAlignedBar(JButton[] buttons) {
154
ButtonBarBuilder builder = new ButtonBarBuilder();
155
builder.addGriddedButtons(buttons);
157
return builder.getPanel();
162
* Builds and returns a left aligned button bar with the given buttons.
164
* @param buttons an array of buttons to add
165
* @param leftToRightButtonOrder the order in which the buttons to add
166
* @return a left aligned button bar with the given buttons
168
public static JPanel buildLeftAlignedBar(
170
boolean leftToRightButtonOrder) {
171
ButtonBarBuilder builder = new ButtonBarBuilder();
172
builder.setLeftToRightButtonOrder(leftToRightButtonOrder);
173
builder.addGriddedButtons(buttons);
175
return builder.getPanel();
179
// General Purpose Factory Methods: Centered ****************************
182
* Builds and returns a centered bar with one button.
184
* @param button1 the first button to add
185
* @return a button bar with the given button
187
public static JPanel buildCenteredBar(JButton button1) {
188
return buildCenteredBar(new JButton[]{
195
* Builds and returns a centered bar with two buttons.
197
* @param button1 the first button to add
198
* @param button2 the second button to add
199
* @return a button bar with the given buttons
201
public static JPanel buildCenteredBar(
202
JButton button1, JButton button2) {
203
return buildCenteredBar(new JButton[]{
210
* Builds and returns a centered bar with three buttons.
212
* @param button1 the first button to add
213
* @param button2 the second button to add
214
* @param button3 the third button to add
215
* @return a button bar with the given buttons
217
public static JPanel buildCenteredBar(
218
JButton button1, JButton button2, JButton button3) {
219
return buildCenteredBar(new JButton[]{
220
button1, button2, button3
226
* Builds and returns a centered bar with four buttons.
228
* @param button1 the first button to add
229
* @param button2 the second button to add
230
* @param button3 the third button to add
231
* @param button4 the fourth button to add
232
* @return a button bar with the given buttons
234
public static JPanel buildCenteredBar(
235
JButton button1, JButton button2, JButton button3, JButton button4) {
236
return buildCenteredBar(new JButton[]{
237
button1, button2, button3, button4
243
* Builds and returns a centered bar with five buttons.
245
* @param button1 the first button to add
246
* @param button2 the second button to add
247
* @param button3 the third button to add
248
* @param button4 the fourth button to add
249
* @param button5 the fifth button to add
250
* @return a button bar with the given buttons
252
public static JPanel buildCenteredBar(
253
JButton button1, JButton button2, JButton button3,
254
JButton button4, JButton button5) {
255
return buildCenteredBar(new JButton[]{
256
button1, button2, button3, button4, button5
262
* Builds and returns a centered button bar with the given buttons.
264
* @param buttons an array of buttons to add
265
* @return a centered button bar with the given buttons
267
public static JPanel buildCenteredBar(JButton[] buttons) {
268
ButtonBarBuilder builder = new ButtonBarBuilder();
270
builder.addGriddedButtons(buttons);
272
return builder.getPanel();
277
* Builds and returns a filled bar with one button.
279
* @param button1 the first button to add
280
* @return a button bar with the given button
282
public static JPanel buildGrowingBar(JButton button1) {
283
return buildGrowingBar(new JButton[]{
290
* Builds and returns a filled button bar with two buttons.
292
* @param button1 the first button to add
293
* @param button2 the second button to add
294
* @return a button bar with the given buttons
296
public static JPanel buildGrowingBar(
297
JButton button1, JButton button2) {
298
return buildGrowingBar(new JButton[]{
305
* Builds and returns a filled bar with three buttons.
307
* @param button1 the first button to add
308
* @param button2 the second button to add
309
* @param button3 the third button to add
310
* @return a button bar with the given buttons
312
public static JPanel buildGrowingBar(
313
JButton button1, JButton button2, JButton button3) {
314
return buildGrowingBar(new JButton[]{
315
button1, button2, button3
321
* Builds and returns a filled bar with four buttons.
323
* @param button1 the first button to add
324
* @param button2 the second button to add
325
* @param button3 the third button to add
326
* @param button4 the fourth button to add
327
* @return a button bar with the given buttons
329
public static JPanel buildGrowingBar(
330
JButton button1, JButton button2, JButton button3, JButton button4) {
331
return buildGrowingBar(new JButton[]{
332
button1, button2, button3, button4
338
* Builds and returns a filled bar with five buttons.
340
* @param button1 the first button to add
341
* @param button2 the second button to add
342
* @param button3 the third button to add
343
* @param button4 the fourth button to add
344
* @param button5 the fifth button to add
345
* @return a button bar with the given buttons
347
public static JPanel buildGrowingBar(
348
JButton button1, JButton button2, JButton button3,
349
JButton button4, JButton button5) {
350
return buildGrowingBar(new JButton[]{
351
button1, button2, button3, button4, button5
357
* Builds and returns a button bar with the given buttons. All button
358
* columns will grow with the bar.
360
* @param buttons an array of buttons to add
361
* @return a filled button bar with the given buttons
363
public static JPanel buildGrowingBar(JButton[] buttons) {
364
ButtonBarBuilder builder = new ButtonBarBuilder();
365
builder.addGriddedGrowingButtons(buttons);
366
return builder.getPanel();
370
// General Purpose Factory Methods: Right Aligned ***********************
373
* Builds and returns a right aligned bar with one button.
375
* @param button1 the first button to add
376
* @return a button bar with the given button
378
public static JPanel buildRightAlignedBar(JButton button1) {
379
return buildRightAlignedBar(new JButton[]{
386
* Builds and returns a right aligned bar with two buttons.
388
* @param button1 the first button to add
389
* @param button2 the second button to add
390
* @return a button bar with the given buttons
392
public static JPanel buildRightAlignedBar(
393
JButton button1, JButton button2) {
394
return buildRightAlignedBar(new JButton[]{
402
* Builds and returns a right aligned bar with three buttons.
404
* @param button1 the first button to add
405
* @param button2 the second button to add
406
* @param button3 the third button to add
407
* @return a button bar with the given buttons
409
public static JPanel buildRightAlignedBar(
410
JButton button1, JButton button2, JButton button3) {
411
return buildRightAlignedBar(new JButton[]{
412
button1, button2, button3
419
* Builds and returns a right aligned bar with four buttons.
421
* @param button1 the first button to add
422
* @param button2 the second button to add
423
* @param button3 the third button to add
424
* @param button4 the fourth button to add
425
* @return a button bar with the given buttons
427
public static JPanel buildRightAlignedBar(
428
JButton button1, JButton button2, JButton button3, JButton button4) {
429
return buildRightAlignedBar(new JButton[]{
430
button1, button2, button3, button4
437
* Builds and returns a right aligned bar with five buttons.
439
* @param button1 the first button to add
440
* @param button2 the second button to add
441
* @param button3 the third button to add
442
* @param button4 the fourth button to add
443
* @param button5 the fifth button to add
444
* @return a button bar with the given buttons
446
public static JPanel buildRightAlignedBar(
447
JButton button1, JButton button2, JButton button3,
448
JButton button4, JButton button5) {
449
return buildRightAlignedBar(new JButton[]{
450
button1, button2, button3, button4, button5
457
* Builds and returns a right aligned button bar with the given buttons.
459
* @param buttons an array of buttons to add
460
* @return a right aligned button bar with the given buttons
462
public static JPanel buildRightAlignedBar(JButton[] buttons) {
463
ButtonBarBuilder builder = new ButtonBarBuilder();
465
builder.addGriddedButtons(buttons);
466
return builder.getPanel();
471
* Builds and returns a right aligned button bar with the given buttons.
473
* @param buttons an array of buttons to add
474
* @param leftToRightButtonOrder the order in which the buttons to add
475
* @return a right aligned button bar with the given buttons
477
public static JPanel buildRightAlignedBar(
479
boolean leftToRightButtonOrder) {
480
ButtonBarBuilder builder = new ButtonBarBuilder();
481
builder.setLeftToRightButtonOrder(leftToRightButtonOrder);
483
builder.addGriddedButtons(buttons);
484
return builder.getPanel();
488
// Right Aligned Button Bars with Help in the Left **********************
491
* Builds and returns a right aligned bar with help and one button.
493
* @param help the help button to add on the left side
494
* @param button1 the first button to add
495
* @return a button bar with the given buttons
497
public static JPanel buildHelpBar(JButton help,
499
return buildHelpBar(help, new JButton[]{
506
* Builds and returns a right aligned bar with help and two buttons.
508
* @param help the help button to add on the left side
509
* @param button1 the first button to add
510
* @param button2 the second button to add
511
* @return a button bar with the given buttons
513
public static JPanel buildHelpBar(JButton help,
514
JButton button1, JButton button2) {
515
return buildHelpBar(help, new JButton[]{
522
* Builds and returns a right aligned bar with help and three buttons.
524
* @param help the help button to add on the left side
525
* @param button1 the first button to add
526
* @param button2 the second button to add
527
* @param button3 the third button to add
528
* @return a button bar with the given buttons
530
public static JPanel buildHelpBar(JButton help,
531
JButton button1, JButton button2, JButton button3) {
532
return buildHelpBar(help, new JButton[]{
533
button1, button2, button3
539
* Builds and returns a right aligned bar with help and four buttons.
541
* @param help the help button to add on the left side
542
* @param button1 the first button to add
543
* @param button2 the second button to add
544
* @param button3 the third button to add
545
* @param button4 the fourth button to add
546
* @return a button bar with the given buttons
548
public static JPanel buildHelpBar(JButton help,
549
JButton button1, JButton button2, JButton button3, JButton button4) {
550
return buildHelpBar(help, new JButton[]{
551
button1, button2, button3, button4
557
* Builds and returns a right aligned bar with help and other buttons.
559
* @param help the help button to add on the left side
560
* @param buttons an array of buttons to add
561
* @return a right aligned button bar with the given buttons
563
public static JPanel buildHelpBar(JButton help, JButton[] buttons) {
564
ButtonBarBuilder builder = new ButtonBarBuilder();
565
builder.addGridded(help);
566
builder.addRelatedGap();
568
builder.addGriddedButtons(buttons);
569
return builder.getPanel();
573
// Popular Dialog Button Bars: No Help **********************************
576
* Builds and returns a button bar with Close.
578
* @param close the Close button
579
* @return a panel that contains the button(s)
581
public static JPanel buildCloseBar(JButton close) {
582
return buildRightAlignedBar(close);
587
* Builds and returns a button bar with OK.
589
* @param ok the OK button
590
* @return a panel that contains the button(s)
592
public static JPanel buildOKBar(JButton ok) {
593
return buildRightAlignedBar(ok);
598
* Builds and returns a button bar with OK and Cancel.
600
* @param ok the OK button
601
* @param cancel the Cancel button
602
* @return a panel that contains the button(s)
604
public static JPanel buildOKCancelBar(
605
JButton ok, JButton cancel) {
606
return buildRightAlignedBar(new JButton[] {ok, cancel});
611
* Builds and returns a button bar with OK, Cancel and Apply.
613
* @param ok the OK button
614
* @param cancel the Cancel button
615
* @param apply the Apply button
616
* @return a panel that contains the button(s)
618
public static JPanel buildOKCancelApplyBar(
619
JButton ok, JButton cancel, JButton apply) {
620
return buildRightAlignedBar(new JButton[] {ok, cancel, apply});
624
// Popular Dialog Button Bars: Help in the Left *************************
627
* Builds and returns a button bar with
630
* @param help the Help button
631
* @param close the Close button
632
* @return a panel that contains the button(s)
634
public static JPanel buildHelpCloseBar(
635
JButton help, JButton close) {
636
return buildHelpBar(help, close);
641
* Builds and returns a button bar with
644
* @param help the Help button
645
* @param ok the OK button
646
* @return a panel that contains the button(s)
648
public static JPanel buildHelpOKBar(
649
JButton help, JButton ok) {
650
return buildHelpBar(help, ok);
655
* Builds and returns a button bar with
656
* Help, OK and Cancel.
658
* @param help the Help button
659
* @param ok the OK button
660
* @param cancel the Cancel button
661
* @return a panel that contains the button(s)
663
public static JPanel buildHelpOKCancelBar(
664
JButton help, JButton ok, JButton cancel) {
665
return buildHelpBar(help, ok, cancel);
670
* Builds and returns a button bar with
671
* Help, OK, Cancel and Apply.
673
* @param help the Help button
674
* @param ok the OK button
675
* @param cancel the Cancel button
676
* @param apply the Apply button
677
* @return a panel that contains the button(s)
679
public static JPanel buildHelpOKCancelApplyBar(
680
JButton help, JButton ok, JButton cancel, JButton apply) {
681
return buildHelpBar(help, ok, cancel, apply);
685
// Popular Dialog Button Bars: Help in the Right Hand Side **************
688
* Builds and returns a button bar with
691
* @param close the Close button
692
* @param help the Help button
693
* @return a panel that contains the button(s)
695
public static JPanel buildCloseHelpBar(
696
JButton close, JButton help) {
697
return buildRightAlignedBar(new JButton[] {close, help});
702
* Builds and returns a button bar with
705
* @param ok the OK button
706
* @param help the Help button
707
* @return a panel that contains the button(s)
709
public static JPanel buildOKHelpBar(
710
JButton ok, JButton help) {
711
return buildRightAlignedBar(new JButton[] {ok, help});
716
* Builds and returns a button bar with
717
* OK, Cancel, and Help.
719
* @param ok the OK button
720
* @param cancel the Cancel button
721
* @param help the Help button
722
* @return a panel that contains the button(s)
724
public static JPanel buildOKCancelHelpBar(
725
JButton ok, JButton cancel, JButton help) {
726
return buildRightAlignedBar(new JButton[] {ok, cancel, help});
731
* Builds and returns a button bar with
732
* OK, Cancel, Apply and Help.
734
* @param ok the OK button
735
* @param cancel the Cancel button
736
* @param apply the Apply button
737
* @param help the Help button
738
* @return a panel that contains the button(s)
740
public static JPanel buildOKCancelApplyHelpBar(
741
JButton ok, JButton cancel, JButton apply, JButton help) {
742
return buildRightAlignedBar(new JButton[] {ok, cancel, apply, help});
746
// Add..., Remove *******************************************************
749
* Builds and returns a left aligned button bar with
752
* @param add the Add button
753
* @param remove the Remove button
754
* @return a panel that contains the button(s)
756
public static JPanel buildAddRemoveLeftBar(
757
JButton add, JButton remove) {
758
return buildLeftAlignedBar(add, remove);
763
* Builds and returns a filled button bar with Add and Remove.
765
* @param add the Add button
766
* @param remove the Remove button
767
* @return a panel that contains the button(s)
769
public static JPanel buildAddRemoveBar(
770
JButton add, JButton remove) {
771
return buildGrowingBar(add, remove);
776
* Builds and returns a right aligned button bar with
779
* @param add the Add button
780
* @param remove the Remove button
781
* @return a panel that contains the button(s)
783
public static JPanel buildAddRemoveRightBar(
784
JButton add, JButton remove) {
785
return buildRightAlignedBar(add, remove);
789
// Add..., Remove, Properties... ****************************************
792
* Builds and returns a left aligned button bar with
793
* Add, Remove, and Properties.
795
* @param add the Add button
796
* @param remove the Remove button
797
* @param properties the Properties button
798
* @return a panel that contains the button(s)
800
public static JPanel buildAddRemovePropertiesLeftBar(
801
JButton add, JButton remove, JButton properties) {
802
return buildLeftAlignedBar(add, remove, properties);
807
* Builds and returns a filled button bar with Add, Remove, and
810
* @param add the Add button
811
* @param remove the Remove button
812
* @param properties the Properties button
813
* @return a panel that contains the button(s)
815
public static JPanel buildAddRemovePropertiesBar(
816
JButton add, JButton remove, JButton properties) {
817
ButtonBarBuilder builder = new ButtonBarBuilder();
818
builder.addGriddedGrowing(add);
819
builder.addRelatedGap();
820
builder.addGriddedGrowing(remove);
821
builder.addRelatedGap();
822
builder.addGriddedGrowing(properties);
823
return builder.getPanel();
828
* Builds and returns a right aligned button bar with
829
* Add, Remove, and Properties.
831
* @param add the Add button
832
* @param remove the Remove button
833
* @param properties the Properties button
834
* @return a panel that contains the button(s)
836
public static JPanel buildAddRemovePropertiesRightBar(
837
JButton add, JButton remove, JButton properties) {
838
return buildRightAlignedBar(add, remove, properties);
842
// Wizard Bars **********************************************************
845
* Builds and returns a wizard button bar with
846
* Back, Next, Finish, Cancel
848
* @param back the Back button
849
* @param next the Next button
850
* @param finish the Finish button
851
* @param cancel the Cancel button
852
* @return a wizard button bar for back, next, finish, cancel
854
public static JPanel buildWizardBar(
855
JButton back, JButton next, JButton finish, JButton cancel) {
856
return buildWizardBar(back, next, new JButton[]{finish, cancel});
861
* Builds and returns a wizard button bar with
862
* Help and Back, Next, Finish, Cancel
864
* @param help the Help button
865
* @param back the Back button
866
* @param next the Next button
867
* @param finish the Finish button
868
* @param cancel the Cancel button
869
* @return a wizard button bar for help, back, next, finish, cancel
871
public static JPanel buildWizardBar(
872
JButton help, JButton back, JButton next, JButton finish, JButton cancel) {
873
return buildWizardBar(new JButton[]{help},
875
new JButton[]{finish, cancel});
880
* Builds and returns a wizard button bar that consists of the back and
881
* next buttons, and some right aligned buttons.
883
* @param back the mandatory back button
884
* @param next the mandatory next button
885
* @param rightAlignedButtons an optional array of buttons that will be
886
* located in the bar's right hand side
887
* @return a wizard button bar with back, next and a bunch of buttons
889
public static JPanel buildWizardBar(JButton back, JButton next,
890
JButton[] rightAlignedButtons) {
891
return buildWizardBar(null, back, next, rightAlignedButtons);
896
* Builds and returns a wizard button bar. It consists of some left
897
* aligned buttons, the back and next buttons, and some right aligned
900
* @param leftAlignedButtons an optional array of buttons that will be
901
* positioned in the bar's left hand side
902
* @param back the mandatory back button
903
* @param next the mandatory next button
904
* @param rightAlignedButtons an optional array of buttons that will be
905
* located in the bar's right hand side
906
* @return a wizard button bar with back, next and a bunch of buttons
908
public static JPanel buildWizardBar(JButton[] leftAlignedButtons,
909
JButton back, JButton next,
910
JButton[] rightAlignedButtons) {
911
return buildWizardBar(leftAlignedButtons,
913
rightAlignedButtons);
918
* Builds and returns a wizard button bar. It consists of some left
919
* aligned buttons, the back, next group, and some right aligned buttons.
920
* To allow the finish button to overlay the next button, you can
921
* optionally provide the <code>overlayedFinish</code> parameter.
923
* @param leftAlignedButtons an optional array of buttons that will be
924
* positioned in the bar's left hand side
925
* @param back the mandatory back button
926
* @param next the mandatory next button
927
* @param overlayedFinish the optional overlayed finish button
928
* @param rightAlignedButtons an optional array of buttons that will be
929
* located in the bar's right hand side
930
* @return a wizard button bar with back, next and a bunch of buttons
932
public static JPanel buildWizardBar(JButton[] leftAlignedButtons,
935
JButton overlayedFinish,
936
JButton[] rightAlignedButtons) {
938
ButtonBarBuilder builder = new ButtonBarBuilder();
939
if (leftAlignedButtons != null) {
940
builder.addGriddedButtons(leftAlignedButtons);
941
builder.addRelatedGap();
944
builder.addGridded(back);
945
builder.addGridded(next);
947
// Optionally overlay the finish and next button.
948
if (overlayedFinish != null) {
949
builder.nextColumn(-1);
950
builder.add(overlayedFinish);
951
builder.nextColumn();
954
if (rightAlignedButtons != null) {
955
builder.addRelatedGap();
956
builder.addGriddedButtons(rightAlignedButtons);
958
return builder.getPanel();
b'\\ No newline at end of file'