From 131f12c69fb6510e7f613158077da9f676c63746 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 2 Sep 2008 07:13:57 +0000 Subject: [PATCH] Updated #2033 test case to include GridLayout svn changeset:5323/svn branch:trunk --- .../toolkit/tests/tickets/Ticket2033.java | 42 ++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/com/itmill/toolkit/tests/tickets/Ticket2033.java b/src/com/itmill/toolkit/tests/tickets/Ticket2033.java index eac7168d74..b1d2aae2a7 100644 --- a/src/com/itmill/toolkit/tests/tickets/Ticket2033.java +++ b/src/com/itmill/toolkit/tests/tickets/Ticket2033.java @@ -15,7 +15,7 @@ public class Ticket2033 extends Application { Window w = new Window(getClass().getSimpleName()); setMainWindow(w); // setTheme("tests-tickets"); - GridLayout layout = new GridLayout(10, 10); + GridLayout layout = new GridLayout(2, 2); w.setLayout(layout); createUI(layout); } @@ -23,6 +23,7 @@ public class Ticket2033 extends Application { private void createUI(GridLayout layout) { layout.addComponent(createExpandLayoutPanel()); layout.addComponent(createOrderedLayoutPanel()); + layout.addComponent(createGridLayoutPanel()); } private Panel createExpandLayoutPanel() { @@ -103,4 +104,43 @@ public class Ticket2033 extends Application { return p; } + + private Panel createGridLayoutPanel() { + GridLayout gl = new GridLayout(4, 1); + Panel p = new Panel("GridLayout", gl); + p.setWidth(600); + p.setHeight(500); + p.getLayout().setSizeFull(); + + TextField tf = new TextField("TextField 1"); + tf.setValue("Expanded"); + gl.addComponent(tf); + // ol.expand(tf); + tf.setSizeFull(); + + tf = new TextField("TextField 2 has a longer caption"); + // tf.setComponentError(new UserError("Error")); + tf.setWidth(100); + tf.setValue("Vertical bottom"); + // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT, + // ExpandLayout.ALIGNMENT_BOTTOM); + gl.addComponent(tf); + + tf = new TextField( + "TextField 3 has a very, very long caption for some weird reason."); + tf.setWidth(100); + tf.setComponentError(new UserError("Error")); + gl.addComponent(tf); + tf.setValue("Vertical top"); + // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT, + // ExpandLayout.ALIGNMENT_TOP); + tf = new TextField("TextField 4"); + gl.addComponent(tf); + tf.setValue("Vertical center"); + // tf.setComponentError(new UserError("Error")); + // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT, + // ExpandLayout.ALIGNMENT_VERTICAL_CENTER); + + return p; + } } -- 2.39.5