Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.github.bordertech.wcomponents.ActionEvent;
import com.github.bordertech.wcomponents.RenderContext;
import com.github.bordertech.wcomponents.Request;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.WButton;
import com.github.bordertech.wcomponents.WContainer;
import com.github.bordertech.wcomponents.WPanel;
Expand Down Expand Up @@ -40,7 +41,7 @@ public class ErrorGenerator extends WPanel {
* Creates an ErrorGenerator.
*/
public ErrorGenerator() {
setLayout(new FlowLayout(FlowLayout.VERTICAL, 24));
setLayout(new FlowLayout(FlowLayout.VERTICAL, Size.XL));

actionErrorBtn.setAction(new Action() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void execute(final ActionEvent event) {
add(messages);

WPanel buttons = new WPanel(WPanel.Type.FEATURE);
buttons.setLayout(new FlowLayout(Alignment.LEFT, 10, 0));
buttons.setLayout(new FlowLayout(Alignment.LEFT, Size.LARGE));
add(buttons);

buttons.add(new ChangeLocaleButton(null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.github.bordertech.wcomponents.Input;
import com.github.bordertech.wcomponents.RadioButtonGroup;
import com.github.bordertech.wcomponents.Request;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.SubordinateTarget;
import com.github.bordertech.wcomponents.WAjaxControl;
import com.github.bordertech.wcomponents.WBeanComponent;
Expand Down Expand Up @@ -481,7 +482,7 @@ public MyPanel(final Input input) {
add(input);

WPanel details = new WPanel();
details.setLayout(new FlowLayout(Alignment.VERTICAL, 0, 5));
details.setLayout(new FlowLayout(Alignment.VERTICAL, Size.MEDIUM));
add(details);
details.add(stringValue);
details.add(dataValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package com.github.bordertech.wcomponents.examples;

import com.github.bordertech.wcomponents.Request;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.WAjaxControl;
import com.github.bordertech.wcomponents.WDateField;
import com.github.bordertech.wcomponents.WPanel;
Expand All @@ -29,7 +30,7 @@ public class MultiPollingExample extends WPanel {
* Construct example.
*/
public MultiPollingExample() {
setLayout(new FlowLayout(FlowLayout.VERTICAL, 0, 12));
setLayout(new FlowLayout(FlowLayout.VERTICAL, Size.LARGE));
add(new WText(
"This example is for framework testing only. It is not to be used as an example of setting up a polling region."));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.bordertech.wcomponents.examples;

import com.github.bordertech.wcomponents.RadioButtonGroup;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.WLabel;
import com.github.bordertech.wcomponents.WPanel;
import com.github.bordertech.wcomponents.WRadioButton;
Expand Down Expand Up @@ -54,7 +55,7 @@ public RadioButtonExample() {
WRadioButton rb6 = group.addRadioButton("C");

panel = new WPanel();
panel.setLayout(new FlowLayout(Alignment.LEFT, 5, 0));
panel.setLayout(new FlowLayout(Alignment.LEFT, Size.MEDIUM));
add(new WLabel("Group"));
panel.add(new WLabel("A", rb4));
panel.add(rb4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.github.bordertech.wcomponents.Action;
import com.github.bordertech.wcomponents.ActionEvent;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.WButton;
import com.github.bordertech.wcomponents.WPanel;
import com.github.bordertech.wcomponents.WText;
Expand Down Expand Up @@ -36,7 +37,7 @@ public class WButtonActionExample extends WPanel {
* Creates a WButtonActionExample.
*/
public WButtonActionExample() {
setLayout(new FlowLayout(Alignment.VERTICAL, 0, 6));
setLayout(new FlowLayout(Alignment.VERTICAL, Size.MEDIUM));
add(message);

// Add the button to the panel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.github.bordertech.wcomponents.HeadingLevel;
import com.github.bordertech.wcomponents.MessageContainer;
import com.github.bordertech.wcomponents.Request;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.WApplication;
import com.github.bordertech.wcomponents.WButton;
import com.github.bordertech.wcomponents.WButton.ImagePosition;
Expand Down Expand Up @@ -144,7 +145,7 @@ private void addImageExamples() {
add(new WHeading(HeadingLevel.H4, "Rendered as a button"));

WPanel buttonLayoutPanel = new WPanel(WPanel.Type.BOX);
buttonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
buttonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, Size.MEDIUM,
FlowLayout.ContentAlignment.BOTTOM));
add(buttonLayoutPanel);
buttonLayoutPanel.
Expand All @@ -158,7 +159,7 @@ private void addImageExamples() {
add(new ExplanatoryText(
"This example shows how to use an image and text as the content of a button without the button styling."));
buttonLayoutPanel = new WPanel(WPanel.Type.BOX);
buttonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
buttonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, Size.MEDIUM,
FlowLayout.ContentAlignment.BOTTOM));
add(buttonLayoutPanel);
buttonLayoutPanel.add(makeImageButtonWithPosition("Image on the North", ImagePosition.NORTH,
Expand Down Expand Up @@ -317,7 +318,7 @@ private void addDisabledExamples() {
add(new WHeading(HeadingLevel.H2, "Examples of disabled buttons"));

WPanel disabledButtonLayoutPanel = new WPanel(WPanel.Type.BOX);
disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, Size.MEDIUM,
FlowLayout.ContentAlignment.BASELINE));
add(disabledButtonLayoutPanel);

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

add(new WHeading(HeadingLevel.H3, "Examples of disabled buttons displaying only an image"));
disabledButtonLayoutPanel = new WPanel(WPanel.Type.BOX);
disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, Size.MEDIUM,
FlowLayout.ContentAlignment.BASELINE));
add(disabledButtonLayoutPanel);

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

disabledButtonLayoutPanel = new WPanel(WPanel.Type.BOX);
disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, Size.MEDIUM,
FlowLayout.ContentAlignment.BASELINE));
add(disabledButtonLayoutPanel);
button = new WButton("Disabled button");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.github.bordertech.wcomponents.Action;
import com.github.bordertech.wcomponents.ActionEvent;
import com.github.bordertech.wcomponents.Request;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.SubordinateTarget;
import com.github.bordertech.wcomponents.WAjaxControl;
import com.github.bordertech.wcomponents.WButton;
Expand Down Expand Up @@ -147,7 +148,7 @@ public WDropdownOptionsExample() {
WFieldSet fieldSet = getDropDownControls();
add(fieldSet);
add(new WHorizontalRule());
container.setLayout(new FlowLayout(Alignment.VERTICAL, 0, 6));
container.setLayout(new FlowLayout(Alignment.VERTICAL, Size.MEDIUM));
add(container);
add(new WHorizontalRule());
add(infoPanel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.github.bordertech.wcomponents.ActionEvent;
import com.github.bordertech.wcomponents.Image;
import com.github.bordertech.wcomponents.ImageResource;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.WButton;
import com.github.bordertech.wcomponents.WImage;
import com.github.bordertech.wcomponents.WPanel;
Expand Down Expand Up @@ -43,7 +44,7 @@ public class WImageExample extends WPanel {
* Creates a WImageExample.
*/
public WImageExample() {
setLayout(new FlowLayout(Alignment.VERTICAL, 0, 6));
setLayout(new FlowLayout(Alignment.VERTICAL, Size.MEDIUM));

// This image is a static resource, and will be cached on the client.
final ImageResource bannerImage = new ImageResource(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.github.bordertech.wcomponents.examples;

import com.github.bordertech.wcomponents.HeadingLevel;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.WHeading;
import com.github.bordertech.wcomponents.WHorizontalRule;
import com.github.bordertech.wcomponents.WLabel;
Expand Down Expand Up @@ -27,11 +29,11 @@ public class WSkipLinksExample extends WPanel {
* Creates a WSkipLinksExample.
*/
public WSkipLinksExample() {
setLayout(new FlowLayout(Alignment.VERTICAL, 0, 10));
setLayout(new FlowLayout(Alignment.VERTICAL, Size.LARGE));
//note: the WSKipLinks component is actually added to the ancestor WApplication
//and is invoked by the presence of WPanel with an accessKey.

add(new WHeading(WHeading.SECTION, "WPanel skip-links targets"));
add(new WHeading(HeadingLevel.H3, "WPanel skip-links targets"));

add(buildPanel("Panel One Title", '1'));
add(buildPanel("Panel 2 - no access key is set on this panel"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.bordertech.wcomponents.examples;

import com.github.bordertech.wcomponents.HeadingLevel;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.WContainer;
import com.github.bordertech.wcomponents.WHeading;
import com.github.bordertech.wcomponents.WPanel;
Expand All @@ -24,7 +25,7 @@ public class WStyledTextFontAwesomeExample extends WPanel {
* Create the example.
*/
public WStyledTextFontAwesomeExample() {
setLayout(new FlowLayout(FlowLayout.Alignment.VERTICAL, 0, 12));
setLayout(new FlowLayout(FlowLayout.Alignment.VERTICAL, Size.LARGE));

add(new WHeading(HeadingLevel.H2, "A simple icon"));
WStyledText text = new WStyledText("Fort Awesome");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.github.bordertech.wcomponents.ActionEvent;
import com.github.bordertech.wcomponents.Request;
import com.github.bordertech.wcomponents.SimpleBeanBoundTableDataModel;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.WButton;
import com.github.bordertech.wcomponents.WDataTable;
import com.github.bordertech.wcomponents.WDateField;
Expand Down Expand Up @@ -37,7 +38,7 @@ public class DataTableBeanExample extends WPanel {
* Creates a DataTableBeanExample.
*/
public DataTableBeanExample() {
setLayout(new FlowLayout(Alignment.VERTICAL, 0, 5));
setLayout(new FlowLayout(Alignment.VERTICAL, Size.MEDIUM));

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

WPanel buttonPanel = new WPanel();
buttonPanel.setLayout(new FlowLayout(Alignment.LEFT, 5, 0));
buttonPanel.setLayout(new FlowLayout(Alignment.LEFT, Size.MEDIUM));
buttonPanel.add(saveButton);
buttonPanel.add(new WButton("Refresh page"));
add(buttonPanel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.github.bordertech.wcomponents.Action;
import com.github.bordertech.wcomponents.ActionEvent;
import com.github.bordertech.wcomponents.Request;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.TableDataModel;
import com.github.bordertech.wcomponents.TableTreeNode;
import com.github.bordertech.wcomponents.TreeTableDataModel;
Expand Down Expand Up @@ -859,7 +860,7 @@ public static final class ExtraDetailsPanel extends WBeanContainer {
*/
public ExtraDetailsPanel() {
WPanel panel = new WPanel();
panel.setLayout(new FlowLayout(Alignment.LEFT, 5, 0));
panel.setLayout(new FlowLayout(Alignment.LEFT, Size.MEDIUM));
add(panel);

WText colA = new WText();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,23 +137,23 @@ public FlowLayoutExample() {

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

add(new WHeading(HeadingLevel.H3, "Vertical, ignored horizontal gap and implemented vertical gap"));
flowPanel = new WPanel();
flowPanel.setLayout(new FlowLayout(Alignment.VERTICAL, 6, 12));
flowPanel.setLayout(new FlowLayout(Alignment.VERTICAL, Size.LARGE));
add(flowPanel);
addBoxes(flowPanel, 5);
flowPanel.add(new WText("some text"));


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

add(new WHeading(HeadingLevel.H3, "VERTICAL, ignored horizontal gap, vertical gap, ignored content align bottom"));
flowPanel = new WPanel();
flowPanel.setLayout(new FlowLayout(Alignment.VERTICAL, 6, 12, ContentAlignment.BOTTOM));
flowPanel.setLayout(new FlowLayout(Alignment.VERTICAL, Size.LARGE, ContentAlignment.BOTTOM));
add(flowPanel);
addBoxes(flowPanel, 5);
flowPanel.add(new WText("some text"));
Expand Down Expand Up @@ -191,7 +191,7 @@ private static void addBoxes(final WPanel panel, final int amount) {
private static void addBoxesWithDiffContent(final WPanel panel, final int amount) {
for (int i = 1; i <= amount; i++) {
WPanel content = new WPanel(WPanel.Type.BOX);
content.setLayout(new FlowLayout(FlowLayout.VERTICAL, 3));
content.setLayout(new FlowLayout(FlowLayout.VERTICAL, Size.SMALL));
for (int j = 1; j <= i; j++) {
content.add(new WText(Integer.toString(i)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.github.bordertech.wcomponents.Action;
import com.github.bordertech.wcomponents.ActionEvent;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.WComponent;
import com.github.bordertech.wcomponents.WDecoratedLabel;
import com.github.bordertech.wcomponents.WImage;
Expand Down Expand Up @@ -33,7 +34,7 @@ public class TreeMenuExample extends WPanel {
* Creates a TreeMenuExample.
*/
public TreeMenuExample() {
setLayout(new FlowLayout(Alignment.VERTICAL, 0, 24));
setLayout(new FlowLayout(Alignment.VERTICAL, Size.XL));
add(new WText("Example java object hierarchy"));

WPanel content = new WPanel(WPanel.Type.BLOCK);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.bordertech.wcomponents.examples.subordinate;

import com.github.bordertech.wcomponents.RadioButtonGroup;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.WContainer;
import com.github.bordertech.wcomponents.WDropdown;
import com.github.bordertech.wcomponents.WField;
Expand Down Expand Up @@ -93,7 +94,7 @@ private CreditCardPanel() {
WRadioButton cardCButton = creditCardType.addRadioButton("cardC");

WPanel cardTypePanel = new WPanel();
cardTypePanel.setLayout(new FlowLayout(Alignment.LEFT, 10, 0));
cardTypePanel.setLayout(new FlowLayout(Alignment.LEFT, Size.LARGE));
cardTypePanel.add(cardAButton);
cardTypePanel.add(createCardImage("A"));
cardTypePanel.add(cardBButton);
Expand Down Expand Up @@ -182,7 +183,7 @@ private static final class TransferPanel extends WPanel {
*/
private TransferPanel() {
super(WPanel.Type.BLOCK);
setLayout(new FlowLayout(Alignment.VERTICAL, 0, 10));
setLayout(new FlowLayout(Alignment.VERTICAL, Size.LARGE));

add(new WHeading(WHeading.SECTION, "Transfer details"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.github.bordertech.wcomponents.ActionEvent;
import com.github.bordertech.wcomponents.Message;
import com.github.bordertech.wcomponents.MessageContainer;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.WButton;
import com.github.bordertech.wcomponents.WCancelButton;
import com.github.bordertech.wcomponents.WCardManager;
Expand Down Expand Up @@ -80,7 +81,7 @@ public WCancelButtonExample() {
}

WPanel buttonPanel = new WPanel(Type.FEATURE);
buttonPanel.setLayout(new FlowLayout(Alignment.LEFT, 3, 0));
buttonPanel.setLayout(new FlowLayout(Alignment.LEFT, Size.SMALL));
buttonPanel.setMargin(new com.github.bordertech.wcomponents.Margin(12, 0, 0, 0));
buttonPanel.add(prevButton);
buttonPanel.add(nextButton);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.github.bordertech.wcomponents.CollapsibleGroup;
import com.github.bordertech.wcomponents.HeadingLevel;
import com.github.bordertech.wcomponents.Size;
import com.github.bordertech.wcomponents.WCollapsible;
import com.github.bordertech.wcomponents.WCollapsibleToggle;
import com.github.bordertech.wcomponents.WDecoratedLabel;
Expand All @@ -26,7 +27,7 @@ public class WCollapsibleExample extends WPanel {
* Creates a WCollapsibleExample.
*/
public WCollapsibleExample() {
setLayout(new FlowLayout(FlowLayout.Alignment.VERTICAL, 0, 12));
setLayout(new FlowLayout(FlowLayout.Alignment.VERTICAL, Size.LARGE));

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