Skip to content

Commit cd95551

Browse files
Merge branch 'georgie' into ensure-consistent-usage-of-HeadingLevel
Merge branch 'georgie' into ensure-consistent-usage-of-HeadingLevel
2 parents 9269628 + c5c8efe commit cd95551

28 files changed

+63
-40
lines changed

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/ErrorGenerator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.github.bordertech.wcomponents.ActionEvent;
55
import com.github.bordertech.wcomponents.RenderContext;
66
import com.github.bordertech.wcomponents.Request;
7+
import com.github.bordertech.wcomponents.Size;
78
import com.github.bordertech.wcomponents.WButton;
89
import com.github.bordertech.wcomponents.WContainer;
910
import com.github.bordertech.wcomponents.WPanel;
@@ -40,7 +41,7 @@ public class ErrorGenerator extends WPanel {
4041
* Creates an ErrorGenerator.
4142
*/
4243
public ErrorGenerator() {
43-
setLayout(new FlowLayout(FlowLayout.VERTICAL, 24));
44+
setLayout(new FlowLayout(FlowLayout.VERTICAL, Size.XL));
4445

4546
actionErrorBtn.setAction(new Action() {
4647
@Override

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/I18nExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void execute(final ActionEvent event) {
6666
add(messages);
6767

6868
WPanel buttons = new WPanel(WPanel.Type.FEATURE);
69-
buttons.setLayout(new FlowLayout(Alignment.LEFT, 10, 0));
69+
buttons.setLayout(new FlowLayout(Alignment.LEFT, Size.LARGE));
7070
add(buttons);
7171

7272
buttons.add(new ChangeLocaleButton(null));

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/InputBeanBindingExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.github.bordertech.wcomponents.Input;
66
import com.github.bordertech.wcomponents.RadioButtonGroup;
77
import com.github.bordertech.wcomponents.Request;
8+
import com.github.bordertech.wcomponents.Size;
89
import com.github.bordertech.wcomponents.SubordinateTarget;
910
import com.github.bordertech.wcomponents.WAjaxControl;
1011
import com.github.bordertech.wcomponents.WBeanComponent;
@@ -481,7 +482,7 @@ public MyPanel(final Input input) {
481482
add(input);
482483

483484
WPanel details = new WPanel();
484-
details.setLayout(new FlowLayout(Alignment.VERTICAL, 0, 5));
485+
details.setLayout(new FlowLayout(Alignment.VERTICAL, Size.MEDIUM));
485486
add(details);
486487
details.add(stringValue);
487488
details.add(dataValue);

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/MultiPollingExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package com.github.bordertech.wcomponents.examples;
66

77
import com.github.bordertech.wcomponents.Request;
8+
import com.github.bordertech.wcomponents.Size;
89
import com.github.bordertech.wcomponents.WAjaxControl;
910
import com.github.bordertech.wcomponents.WDateField;
1011
import com.github.bordertech.wcomponents.WPanel;
@@ -29,7 +30,7 @@ public class MultiPollingExample extends WPanel {
2930
* Construct example.
3031
*/
3132
public MultiPollingExample() {
32-
setLayout(new FlowLayout(FlowLayout.VERTICAL, 0, 12));
33+
setLayout(new FlowLayout(FlowLayout.VERTICAL, Size.LARGE));
3334
add(new WText(
3435
"This example is for framework testing only. It is not to be used as an example of setting up a polling region."));
3536

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/RadioButtonExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.github.bordertech.wcomponents.examples;
22

33
import com.github.bordertech.wcomponents.RadioButtonGroup;
4+
import com.github.bordertech.wcomponents.Size;
45
import com.github.bordertech.wcomponents.WLabel;
56
import com.github.bordertech.wcomponents.WPanel;
67
import com.github.bordertech.wcomponents.WRadioButton;
@@ -54,7 +55,7 @@ public RadioButtonExample() {
5455
WRadioButton rb6 = group.addRadioButton("C");
5556

5657
panel = new WPanel();
57-
panel.setLayout(new FlowLayout(Alignment.LEFT, 5, 0));
58+
panel.setLayout(new FlowLayout(Alignment.LEFT, Size.MEDIUM));
5859
add(new WLabel("Group"));
5960
panel.add(new WLabel("A", rb4));
6061
panel.add(rb4);

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WButtonActionExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.github.bordertech.wcomponents.Action;
44
import com.github.bordertech.wcomponents.ActionEvent;
5+
import com.github.bordertech.wcomponents.Size;
56
import com.github.bordertech.wcomponents.WButton;
67
import com.github.bordertech.wcomponents.WPanel;
78
import com.github.bordertech.wcomponents.WText;
@@ -36,7 +37,7 @@ public class WButtonActionExample extends WPanel {
3637
* Creates a WButtonActionExample.
3738
*/
3839
public WButtonActionExample() {
39-
setLayout(new FlowLayout(Alignment.VERTICAL, 0, 6));
40+
setLayout(new FlowLayout(Alignment.VERTICAL, Size.MEDIUM));
4041
add(message);
4142

4243
// Add the button to the panel.

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WButtonExample.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.github.bordertech.wcomponents.HeadingLevel;
66
import com.github.bordertech.wcomponents.MessageContainer;
77
import com.github.bordertech.wcomponents.Request;
8+
import com.github.bordertech.wcomponents.Size;
89
import com.github.bordertech.wcomponents.WApplication;
910
import com.github.bordertech.wcomponents.WButton;
1011
import com.github.bordertech.wcomponents.WButton.ImagePosition;
@@ -144,7 +145,7 @@ private void addImageExamples() {
144145
add(new WHeading(HeadingLevel.H4, "Rendered as a button"));
145146

146147
WPanel buttonLayoutPanel = new WPanel(WPanel.Type.BOX);
147-
buttonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
148+
buttonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, Size.MEDIUM,
148149
FlowLayout.ContentAlignment.BOTTOM));
149150
add(buttonLayoutPanel);
150151
buttonLayoutPanel.
@@ -158,7 +159,7 @@ private void addImageExamples() {
158159
add(new ExplanatoryText(
159160
"This example shows how to use an image and text as the content of a button without the button styling."));
160161
buttonLayoutPanel = new WPanel(WPanel.Type.BOX);
161-
buttonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
162+
buttonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, Size.MEDIUM,
162163
FlowLayout.ContentAlignment.BOTTOM));
163164
add(buttonLayoutPanel);
164165
buttonLayoutPanel.add(makeImageButtonWithPosition("Image on the North", ImagePosition.NORTH,
@@ -317,7 +318,7 @@ private void addDisabledExamples() {
317318
add(new WHeading(HeadingLevel.H2, "Examples of disabled buttons"));
318319

319320
WPanel disabledButtonLayoutPanel = new WPanel(WPanel.Type.BOX);
320-
disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
321+
disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, Size.MEDIUM,
321322
FlowLayout.ContentAlignment.BASELINE));
322323
add(disabledButtonLayoutPanel);
323324

@@ -331,7 +332,7 @@ private void addDisabledExamples() {
331332

332333
add(new WHeading(HeadingLevel.H3, "Examples of disabled buttons displaying only an image"));
333334
disabledButtonLayoutPanel = new WPanel(WPanel.Type.BOX);
334-
disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
335+
disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, Size.MEDIUM,
335336
FlowLayout.ContentAlignment.BASELINE));
336337
add(disabledButtonLayoutPanel);
337338

@@ -351,7 +352,7 @@ private void addDisabledExamples() {
351352
"Examples of disabled buttons displaying an image with imagePosition EAST"));
352353

353354
disabledButtonLayoutPanel = new WPanel(WPanel.Type.BOX);
354-
disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
355+
disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, Size.MEDIUM,
355356
FlowLayout.ContentAlignment.BASELINE));
356357
add(disabledButtonLayoutPanel);
357358
button = new WButton("Disabled button");

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WDropdownOptionsExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.github.bordertech.wcomponents.Action;
44
import com.github.bordertech.wcomponents.ActionEvent;
55
import com.github.bordertech.wcomponents.Request;
6+
import com.github.bordertech.wcomponents.Size;
67
import com.github.bordertech.wcomponents.SubordinateTarget;
78
import com.github.bordertech.wcomponents.WAjaxControl;
89
import com.github.bordertech.wcomponents.WButton;
@@ -147,7 +148,7 @@ public WDropdownOptionsExample() {
147148
WFieldSet fieldSet = getDropDownControls();
148149
add(fieldSet);
149150
add(new WHorizontalRule());
150-
container.setLayout(new FlowLayout(Alignment.VERTICAL, 0, 6));
151+
container.setLayout(new FlowLayout(Alignment.VERTICAL, Size.MEDIUM));
151152
add(container);
152153
add(new WHorizontalRule());
153154
add(infoPanel);

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WImageExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.github.bordertech.wcomponents.ActionEvent;
55
import com.github.bordertech.wcomponents.Image;
66
import com.github.bordertech.wcomponents.ImageResource;
7+
import com.github.bordertech.wcomponents.Size;
78
import com.github.bordertech.wcomponents.WButton;
89
import com.github.bordertech.wcomponents.WImage;
910
import com.github.bordertech.wcomponents.WPanel;
@@ -43,7 +44,7 @@ public class WImageExample extends WPanel {
4344
* Creates a WImageExample.
4445
*/
4546
public WImageExample() {
46-
setLayout(new FlowLayout(Alignment.VERTICAL, 0, 6));
47+
setLayout(new FlowLayout(Alignment.VERTICAL, Size.MEDIUM));
4748

4849
// This image is a static resource, and will be cached on the client.
4950
final ImageResource bannerImage = new ImageResource(

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WSkipLinksExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.github.bordertech.wcomponents.examples;
22

33
import com.github.bordertech.wcomponents.HeadingLevel;
4+
import com.github.bordertech.wcomponents.Size;
45
import com.github.bordertech.wcomponents.WHeading;
56
import com.github.bordertech.wcomponents.WHorizontalRule;
67
import com.github.bordertech.wcomponents.WLabel;
@@ -28,7 +29,7 @@ public class WSkipLinksExample extends WPanel {
2829
* Creates a WSkipLinksExample.
2930
*/
3031
public WSkipLinksExample() {
31-
setLayout(new FlowLayout(Alignment.VERTICAL, 0, 10));
32+
setLayout(new FlowLayout(Alignment.VERTICAL, Size.LARGE));
3233
//note: the WSKipLinks component is actually added to the ancestor WApplication
3334
//and is invoked by the presence of WPanel with an accessKey.
3435

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WStyledTextFontAwesomeExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.github.bordertech.wcomponents.examples;
22

33
import com.github.bordertech.wcomponents.HeadingLevel;
4+
import com.github.bordertech.wcomponents.Size;
45
import com.github.bordertech.wcomponents.WContainer;
56
import com.github.bordertech.wcomponents.WHeading;
67
import com.github.bordertech.wcomponents.WPanel;
@@ -24,7 +25,7 @@ public class WStyledTextFontAwesomeExample extends WPanel {
2425
* Create the example.
2526
*/
2627
public WStyledTextFontAwesomeExample() {
27-
setLayout(new FlowLayout(FlowLayout.Alignment.VERTICAL, 0, 12));
28+
setLayout(new FlowLayout(FlowLayout.Alignment.VERTICAL, Size.LARGE));
2829

2930
add(new WHeading(HeadingLevel.H2, "A simple icon"));
3031
WStyledText text = new WStyledText("Fort Awesome");

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/datatable/DataTableBeanExample.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.github.bordertech.wcomponents.ActionEvent;
55
import com.github.bordertech.wcomponents.Request;
66
import com.github.bordertech.wcomponents.SimpleBeanBoundTableDataModel;
7+
import com.github.bordertech.wcomponents.Size;
78
import com.github.bordertech.wcomponents.WButton;
89
import com.github.bordertech.wcomponents.WDataTable;
910
import com.github.bordertech.wcomponents.WDateField;
@@ -37,7 +38,7 @@ public class DataTableBeanExample extends WPanel {
3738
* Creates a DataTableBeanExample.
3839
*/
3940
public DataTableBeanExample() {
40-
setLayout(new FlowLayout(Alignment.VERTICAL, 0, 5));
41+
setLayout(new FlowLayout(Alignment.VERTICAL, Size.MEDIUM));
4142

4243
// Since this data model doesn't store any user state information within it,
4344
// we can safely use a single shared instance.
@@ -66,7 +67,7 @@ public void execute(final ActionEvent event) {
6667
});
6768

6869
WPanel buttonPanel = new WPanel();
69-
buttonPanel.setLayout(new FlowLayout(Alignment.LEFT, 5, 0));
70+
buttonPanel.setLayout(new FlowLayout(Alignment.LEFT, Size.MEDIUM));
7071
buttonPanel.add(saveButton);
7172
buttonPanel.add(new WButton("Refresh page"));
7273
add(buttonPanel);

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/datatable/DataTableOptionsExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.github.bordertech.wcomponents.ActionEvent;
77
import com.github.bordertech.wcomponents.HeadingLevel;
88
import com.github.bordertech.wcomponents.Request;
9+
import com.github.bordertech.wcomponents.Size;
910
import com.github.bordertech.wcomponents.TableDataModel;
1011
import com.github.bordertech.wcomponents.TableTreeNode;
1112
import com.github.bordertech.wcomponents.TreeTableDataModel;
@@ -860,7 +861,7 @@ public static final class ExtraDetailsPanel extends WBeanContainer {
860861
*/
861862
public ExtraDetailsPanel() {
862863
WPanel panel = new WPanel();
863-
panel.setLayout(new FlowLayout(Alignment.LEFT, 5, 0));
864+
panel.setLayout(new FlowLayout(Alignment.LEFT, Size.MEDIUM));
864865
add(panel);
865866

866867
WText colA = new WText();

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/FlowLayoutExample.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,23 +137,23 @@ public FlowLayoutExample() {
137137

138138
add(new WHeading(HeadingLevel.H3, "Flow layout - left, horizontal gap and ignored vertical gap"));
139139
flowPanel = new WPanel();
140-
flowPanel.setLayout(new FlowLayout(Alignment.LEFT, 6, 12));
140+
flowPanel.setLayout(new FlowLayout(Alignment.LEFT, Size.MEDIUM));
141141
add(flowPanel);
142142
addBoxes(flowPanel, 12);
143143
flowPanel.add(new WText("some text"));
144144
flowPanel.add(new WText("some more text"));
145145

146146
add(new WHeading(HeadingLevel.H3, "Vertical, ignored horizontal gap and implemented vertical gap"));
147147
flowPanel = new WPanel();
148-
flowPanel.setLayout(new FlowLayout(Alignment.VERTICAL, 6, 12));
148+
flowPanel.setLayout(new FlowLayout(Alignment.VERTICAL, Size.LARGE));
149149
add(flowPanel);
150150
addBoxes(flowPanel, 5);
151151
flowPanel.add(new WText("some text"));
152152

153153

154154
add(new WHeading(HeadingLevel.H3, "Left, horizontal gap and ignored vertical gap, content align bottom"));
155155
flowPanel = new WPanel();
156-
flowPanel.setLayout(new FlowLayout(Alignment.LEFT, 6, 12, ContentAlignment.BOTTOM));
156+
flowPanel.setLayout(new FlowLayout(Alignment.LEFT, Size.MEDIUM, ContentAlignment.BOTTOM));
157157
add(flowPanel);
158158
addBoxesWithDiffContent(flowPanel, 5);
159159
flowPanel.add(new WText("some text"));
@@ -162,7 +162,7 @@ public FlowLayoutExample() {
162162

163163
add(new WHeading(HeadingLevel.H3, "VERTICAL, ignored horizontal gap, vertical gap, ignored content align bottom"));
164164
flowPanel = new WPanel();
165-
flowPanel.setLayout(new FlowLayout(Alignment.VERTICAL, 6, 12, ContentAlignment.BOTTOM));
165+
flowPanel.setLayout(new FlowLayout(Alignment.VERTICAL, Size.LARGE, ContentAlignment.BOTTOM));
166166
add(flowPanel);
167167
addBoxes(flowPanel, 5);
168168
flowPanel.add(new WText("some text"));
@@ -191,7 +191,7 @@ private static void addBoxes(final WPanel panel, final int amount) {
191191
private static void addBoxesWithDiffContent(final WPanel panel, final int amount) {
192192
for (int i = 1; i <= amount; i++) {
193193
WPanel content = new WPanel(WPanel.Type.BOX);
194-
content.setLayout(new FlowLayout(FlowLayout.VERTICAL, 3));
194+
content.setLayout(new FlowLayout(FlowLayout.VERTICAL, Size.SMALL));
195195
for (int j = 1; j <= i; j++) {
196196
content.add(new WText(Integer.toString(i)));
197197
}

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/menu/TreeMenuExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.github.bordertech.wcomponents.Action;
44
import com.github.bordertech.wcomponents.ActionEvent;
5+
import com.github.bordertech.wcomponents.Size;
56
import com.github.bordertech.wcomponents.WComponent;
67
import com.github.bordertech.wcomponents.WDecoratedLabel;
78
import com.github.bordertech.wcomponents.WImage;
@@ -33,7 +34,7 @@ public class TreeMenuExample extends WPanel {
3334
* Creates a TreeMenuExample.
3435
*/
3536
public TreeMenuExample() {
36-
setLayout(new FlowLayout(Alignment.VERTICAL, 0, 24));
37+
setLayout(new FlowLayout(Alignment.VERTICAL, Size.XL));
3738
add(new WText("Example java object hierarchy"));
3839

3940
WPanel content = new WPanel(WPanel.Type.BLOCK);

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/subordinate/SubordinateBuilderComplexExample.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.github.bordertech.wcomponents.HeadingLevel;
44
import com.github.bordertech.wcomponents.RadioButtonGroup;
5+
import com.github.bordertech.wcomponents.Size;
56
import com.github.bordertech.wcomponents.WContainer;
67
import com.github.bordertech.wcomponents.WDropdown;
78
import com.github.bordertech.wcomponents.WField;
@@ -94,7 +95,7 @@ private CreditCardPanel() {
9495
WRadioButton cardCButton = creditCardType.addRadioButton("cardC");
9596

9697
WPanel cardTypePanel = new WPanel();
97-
cardTypePanel.setLayout(new FlowLayout(Alignment.LEFT, 10, 0));
98+
cardTypePanel.setLayout(new FlowLayout(Alignment.LEFT, Size.LARGE));
9899
cardTypePanel.add(cardAButton);
99100
cardTypePanel.add(createCardImage("A"));
100101
cardTypePanel.add(cardBButton);
@@ -183,7 +184,7 @@ private static final class TransferPanel extends WPanel {
183184
*/
184185
private TransferPanel() {
185186
super(WPanel.Type.BLOCK);
186-
setLayout(new FlowLayout(Alignment.VERTICAL, 0, 10));
187+
setLayout(new FlowLayout(Alignment.VERTICAL, Size.LARGE));
187188

188189
add(new WHeading(HeadingLevel.H3, "Transfer details"));
189190

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WCancelButtonExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.github.bordertech.wcomponents.HeadingLevel;
66
import com.github.bordertech.wcomponents.Message;
77
import com.github.bordertech.wcomponents.MessageContainer;
8+
import com.github.bordertech.wcomponents.Size;
89
import com.github.bordertech.wcomponents.WButton;
910
import com.github.bordertech.wcomponents.WCancelButton;
1011
import com.github.bordertech.wcomponents.WCardManager;
@@ -81,7 +82,7 @@ public WCancelButtonExample() {
8182
}
8283

8384
WPanel buttonPanel = new WPanel(Type.FEATURE);
84-
buttonPanel.setLayout(new FlowLayout(Alignment.LEFT, 3, 0));
85+
buttonPanel.setLayout(new FlowLayout(Alignment.LEFT, Size.SMALL));
8586
buttonPanel.setMargin(new com.github.bordertech.wcomponents.Margin(12, 0, 0, 0));
8687
buttonPanel.add(prevButton);
8788
buttonPanel.add(nextButton);

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WCollapsibleExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.github.bordertech.wcomponents.CollapsibleGroup;
44
import com.github.bordertech.wcomponents.HeadingLevel;
5+
import com.github.bordertech.wcomponents.Size;
56
import com.github.bordertech.wcomponents.WCollapsible;
67
import com.github.bordertech.wcomponents.WCollapsibleToggle;
78
import com.github.bordertech.wcomponents.WDecoratedLabel;
@@ -26,7 +27,7 @@ public class WCollapsibleExample extends WPanel {
2627
* Creates a WCollapsibleExample.
2728
*/
2829
public WCollapsibleExample() {
29-
setLayout(new FlowLayout(FlowLayout.Alignment.VERTICAL, 0, 12));
30+
setLayout(new FlowLayout(FlowLayout.Alignment.VERTICAL, Size.LARGE));
3031

3132
WTextField component3 = new WTextField() {
3233
// We want some dynamic text to show that there's a trip to the server.

wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WConfirmationButtonExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.github.bordertech.wcomponents.Action;
44
import com.github.bordertech.wcomponents.ActionEvent;
55
import com.github.bordertech.wcomponents.HeadingLevel;
6+
import com.github.bordertech.wcomponents.Size;
67
import com.github.bordertech.wcomponents.WAjaxControl;
78
import com.github.bordertech.wcomponents.WButton;
89
import com.github.bordertech.wcomponents.WConfirmationButton;
@@ -53,7 +54,7 @@ public WConfirmationButtonExample() {
5354
clearLink.setRenderAsLink(true);
5455

5556
WPanel buttonPanel = new WPanel();
56-
buttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
57+
buttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT, Size.MEDIUM,
5758
FlowLayout.ContentAlignment.BASELINE));
5859
buttonPanel.add(clear);
5960
buttonPanel.add(clearLink);

0 commit comments

Comments
 (0)