import com.vaadin.ui.Accordion;
import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
-import com.vaadin.ui.ExpandLayout;
+import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.OptionGroup;
-import com.vaadin.ui.OrderedLayout;
import com.vaadin.ui.Panel;
import com.vaadin.ui.SplitPanel;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
}
});
- OrderedLayout ol = new OrderedLayout(
- OrderedLayout.ORIENTATION_HORIZONTAL);
+ HorizontalLayout ol = new HorizontalLayout();
ol.addComponent(context);
ol.addComponent(testComponent);
ol.addComponent(width);
ol.setMargin(true);
Window controller = new Window("Controller");
- controller.setLayout(ol);
+ controller.setContent(ol);
main.addWindow(controller);
}
protected void drawInExpandLayout() {
main.removeAllComponents();
- main.getLayout().setSizeFull();
+ main.getContent().setSizeFull();
- OrderedLayout ol = new OrderedLayout();
+ VerticalLayout ol = new VerticalLayout();
- ExpandLayout el = new ExpandLayout();
+ VerticalLayout el = new VerticalLayout();
el.removeAllComponents();
el.addComponent(ol);
- main.getLayout().addComponent(el);
+ main.getContent().addComponent(el);
main.removeWindow(subwindow);
}
protected void drawInTabSheet(boolean verticalAkaAccordion) {
main.removeAllComponents();
- main.getLayout().setSizeFull();
+ main.getContent().setSizeFull();
- OrderedLayout ol = new OrderedLayout();
+ VerticalLayout ol = new VerticalLayout();
ol.setCaption("Tab 1");
- OrderedLayout ol2 = new OrderedLayout();
+ VerticalLayout ol2 = new VerticalLayout();
ol2.setCaption("Tab 2");
TabSheet ts = (verticalAkaAccordion ? accordion : tabsheet);
private void drawInSplitPanel() {
main.removeAllComponents();
- main.getLayout().setSizeFull();
+ main.getContent().setSizeFull();
- OrderedLayout ol = new OrderedLayout();
- OrderedLayout ol2 = new OrderedLayout();
+ VerticalLayout ol = new VerticalLayout();
+ VerticalLayout ol2 = new VerticalLayout();
splitPanel.setFirstComponent(ol);
splitPanel.setSecondComponent(ol2);
private void drawInPanel() {
main.removeAllComponents();
- main.getLayout().setSizeFull();
+ main.getContent().setSizeFull();
- OrderedLayout ol = new OrderedLayout();
+ VerticalLayout ol = new VerticalLayout();
panel.setSizeFull();
- panel.setLayout(ol);
+ panel.setContent(ol);
ol.setWidth((String) width.getValue());
ol.setHeight((String) height.getValue());
private void drawInSubwindow() {
main.removeAllComponents();
- main.getLayout().setSizeFull();
- OrderedLayout ol = new OrderedLayout();
+ main.getContent().setSizeFull();
+ VerticalLayout ol = new VerticalLayout();
ol.setWidth((String) width.getValue());
ol.setHeight((String) height.getValue());
ol.addComponent(getTestComponent());
- subwindow.setLayout(ol);
+ subwindow.setContent(ol);
main.addWindow(subwindow);
}
private void drawInMainWindow() {
main.removeAllComponents();
- OrderedLayout ol = new OrderedLayout();
- main.setLayout(ol);
+ VerticalLayout ol = new VerticalLayout();
+ main.setContent(ol);
ol.setWidth((String) width.getValue());
ol.setHeight((String) height.getValue());
import com.vaadin.terminal.ExternalResource;
import com.vaadin.ui.Component;
import com.vaadin.ui.CustomComponent;
-import com.vaadin.ui.ExpandLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Link;
bodyLayout.addStyleName("light");
bodyLayout.setSizeFull();
- bodyLayout.setLayout(new ExpandLayout());
+ bodyLayout.setContent(new VerticalLayout());
mainLayout.addComponent(bodyLayout);
mainLayout.setSplitPosition(30);
- mainWindow.setLayout(mainLayout);
+ mainWindow.setContent(mainLayout);
setMainWindow(mainWindow);
}
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.DateField;
import com.vaadin.ui.Embedded;
-import com.vaadin.ui.ExpandLayout;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Link;
import com.vaadin.ui.NativeSelect;
import com.vaadin.ui.OptionGroup;
-import com.vaadin.ui.OrderedLayout;
import com.vaadin.ui.Panel;
import com.vaadin.ui.ProgressIndicator;
import com.vaadin.ui.RichTextArea;
import com.vaadin.ui.Tree;
import com.vaadin.ui.TwinColSelect;
import com.vaadin.ui.Upload;
+import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.Component.Listener;
public class TestCaptionWrapper extends CustomComponent implements Listener {
- OrderedLayout main = new OrderedLayout();
+ VerticalLayout main = new VerticalLayout();
final String eventListenerString = "Component.Listener feedback: ";
Label eventListenerFeedback = new Label(eventListenerString
final Panel panel = new Panel("Panel");
test(panel);
- populateLayout(panel.getLayout());
+ populateLayout((Layout) panel.getContent());
final TabSheet tabsheet = new TabSheet();
test(tabsheet);
- final OrderedLayout tab1 = new OrderedLayout();
+ final VerticalLayout tab1 = new VerticalLayout();
tab1.addComponent(new Label("try tab2"));
- final OrderedLayout tab2 = new OrderedLayout();
+ final VerticalLayout tab2 = new VerticalLayout();
test(tab2);
populateLayout(tab2);
tabsheet.addTab(tab1, "TabSheet tab1", new ClassResource("m.gif",
tabsheet.addTab(tab2, "TabSheet tab2", new ClassResource("m.gif",
getApplication()));
- final ExpandLayout expandLayout = new ExpandLayout();
+ final VerticalLayout expandLayout = new VerticalLayout();
test(expandLayout);
populateLayout(expandLayout);
final Window window = new Window("TEST: Window");
test(window);
- populateLayout(window.getLayout());
+ populateLayout((Layout) window.getContent());
}
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.DateField;
import com.vaadin.ui.Embedded;
-import com.vaadin.ui.ExpandLayout;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Tree;
import com.vaadin.ui.TwinColSelect;
import com.vaadin.ui.Upload;
+import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.Component.Event;
import com.vaadin.ui.Component.Listener;
// test(gridLayout);
}
- // //////////////////////////////////////////////////////////////////////
- // ////
- if (false) {
- target
- .addComponent(new Label(
- "<hr /><h1>Components inside ExpandLayout (height 250px)</h3>",
- Label.CONTENT_XHTML));
- final ExpandLayout el = new ExpandLayout();
- el.setHeight(250, Component.UNITS_PIXELS);
- el.expand(new Label("This label will expand on expand layout"));
- populateLayout(el);
- target.addComponent(el);
- }
-
// //////////////////////////////////////////////////////////////////////
// ////
if (false) {
target.addComponent(panel);
}
- // //////////////////////////////////////////////////////////////////////
- // ////
- if (false) {
- target
- .addComponent(new Label(
- "<hr /><h1>Components inside vertical SplitPanel (splitpanel is under 250height ExpandLayout)</h3>",
- Label.CONTENT_XHTML));
- final ExpandLayout sp1l = new ExpandLayout();
- sp1l.setHeight(250, ExpandLayout.UNITS_PIXELS);
- final SplitPanel sp1 = new SplitPanel(
- SplitPanel.ORIENTATION_VERTICAL);
- sp1l.addComponent(sp1);
- final OrderedLayout sp1first = new OrderedLayout();
- final OrderedLayout sp1second = new OrderedLayout();
- sp1.setFirstComponent(sp1first);
- populateLayout(sp1first);
- populateLayout(sp1second);
- sp1.setSecondComponent(sp1second);
- target.addComponent(sp1l);
- }
-
// //////////////////////////////////////////////////////////////////////
// ////
if (false) {
.addComponent(new Label(
"<hr /><h1>Components inside horizontal SplitPanel (splitpanel is under 250px height ExpandLayout)</h3>",
Label.CONTENT_XHTML));
- final ExpandLayout sp2l = new ExpandLayout();
+ final VerticalLayout sp2l = new VerticalLayout();
sp2l.setHeight(250, SplitPanel.UNITS_PIXELS);
final SplitPanel sp2 = new SplitPanel(
SplitPanel.ORIENTATION_HORIZONTAL);
sp2l.addComponent(sp2);
- final OrderedLayout sp2first = new OrderedLayout();
- final OrderedLayout sp2second = new OrderedLayout();
+ final VerticalLayout sp2first = new VerticalLayout();
+ final VerticalLayout sp2second = new VerticalLayout();
sp2.setFirstComponent(sp2first);
populateLayout(sp2first);
populateLayout(sp2second);
final Embedded emb = new Embedded("Embedded " + count++, flashResource);
emb.setType(Embedded.TYPE_OBJECT);
emb.setMimeType("application/x-shockwave-flash");
- emb.setWidth(250);
- emb.setHeight(100);
+ emb.setWidth("250px");
+ emb.setHeight("100px");
test(layout, emb);
final Panel panel = new Panel("Panel " + count++);
test(layout, table);
final TabSheet tabsheet = new TabSheet();
- final OrderedLayout tab1 = new OrderedLayout();
+ final VerticalLayout tab1 = new VerticalLayout();
tab1.addComponent(new Label("tab1 " + count++));
- final OrderedLayout tab2 = new OrderedLayout();
+ final VerticalLayout tab2 = new VerticalLayout();
tab2.addComponent(new Label("tab2 " + count++));
tabsheet.addTab(tab1, "Default (not configured) TabSheet tab1",
new ClassResource("m.gif", this));
test(layout, tabsheet);
final Accordion accordion = new Accordion();
- final OrderedLayout acc1 = new OrderedLayout();
+ final VerticalLayout acc1 = new VerticalLayout();
acc1.addComponent(new Label("acc1 " + count++));
- final OrderedLayout acc2 = new OrderedLayout();
+ final VerticalLayout acc2 = new VerticalLayout();
acc2.addComponent(new Label("acc2 " + count++));
accordion.addTab(acc1, "Default (not configured) Accordion acc1",
new ClassResource("m.gif", this));
+++ /dev/null
-/* \r
-@ITMillApache2LicenseForJavaFiles@\r
- */\r
-\r
-package com.vaadin.tests;\r
-\r
-import com.vaadin.ui.CustomComponent;\r
-import com.vaadin.ui.DateField;\r
-import com.vaadin.ui.ExpandLayout;\r
-import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
-import com.vaadin.ui.Panel;\r
-\r
-/**\r
- * \r
- * @author IT Mill Ltd.\r
- */\r
-public class TestForExpandLayout extends CustomComponent {\r
-\r
- ExpandLayout main = new ExpandLayout();\r
-\r
- DateField df;\r
-\r
- public TestForExpandLayout() {\r
- setCompositionRoot(main);\r
- createNewView();\r
- }\r
-\r
- public void createNewView() {\r
- main.removeAllComponents();\r
- for (int i = 0; i < 6; i++) {\r
- final ExpandLayout el = new ExpandLayout(\r
- OrderedLayout.ORIENTATION_HORIZONTAL);\r
- for (int j = 0; j < i + 3; j++) {\r
- final Label l = new Label("label" + i + ":" + j);\r
- el.addComponent(l);\r
- }\r
- if (i > 0) {\r
- // el.setMargin(true);\r
- el.setSizeUndefined();\r
- el.setWidth("100%");\r
- if (i % 2 == 0) {\r
- el.setHeight("8em");\r
- Panel p = new Panel("tp");\r
- p.addComponent(new Label("panelc"));\r
- p.setHeight("100%");\r
- p.setWidth("100px");\r
- el.addComponent(p);\r
- }\r
- }\r
- main.addComponent(el);\r
- }\r
-\r
- }\r
-}\r
+++ /dev/null
-/* \r
-@ITMillApache2LicenseForJavaFiles@\r
- */\r
-\r
-package com.vaadin.tests;\r
-\r
-import com.vaadin.ui.Button;\r
-import com.vaadin.ui.CustomComponent;\r
-import com.vaadin.ui.ExpandLayout;\r
-import com.vaadin.ui.Label;\r
-import com.vaadin.ui.Panel;\r
-\r
-/**\r
- * \r
- * @author IT Mill Ltd.\r
- */\r
-public class TestForExpandLayout2 extends CustomComponent {\r
-\r
- ExpandLayout main;\r
-\r
- public TestForExpandLayout2() {\r
- createNewView();\r
- setCompositionRoot(main);\r
- }\r
-\r
- public void createNewView() {\r
- main = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
-\r
- Panel left = new Panel("Left column");\r
- left.setHeight(100, Panel.UNITS_PERCENTAGE);\r
- left.setWidth(150);\r
- main.addComponent(left);\r
-\r
- ExpandLayout center = new ExpandLayout();\r
- center.addComponent(new Label("header"));\r
- Panel mainContent = new Panel();\r
- center.addComponent(mainContent);\r
- center.expand(mainContent);\r
- mainContent.setSizeFull();\r
-\r
- ExpandLayout buttons = new ExpandLayout(\r
- ExpandLayout.ORIENTATION_HORIZONTAL);\r
- buttons.setHeight(30, ExpandLayout.UNITS_PIXELS);\r
- Button b1 = new Button("Save");\r
- Button b2 = new Button("Cancel");\r
- Button b3 = new Button("Logout");\r
- buttons.addComponent(b1);\r
- buttons.setComponentAlignment(b1, ExpandLayout.ALIGNMENT_RIGHT,\r
- ExpandLayout.ALIGNMENT_TOP);\r
- buttons.addComponent(b2);\r
- buttons.addComponent(b3);\r
- center.addComponent(buttons);\r
-\r
- main.addComponent(center);\r
- main.expand(center);\r
-\r
- Panel right = new Panel("Right column");\r
- right.setHeight(100, Panel.UNITS_PERCENTAGE);\r
- right.setWidth(200);\r
-\r
- main.addComponent(right);\r
-\r
- }\r
-}\r
+++ /dev/null
-/* \r
-@ITMillApache2LicenseForJavaFiles@\r
- */\r
-\r
-package com.vaadin.tests;\r
-\r
-import com.vaadin.ui.Button;\r
-import com.vaadin.ui.CustomComponent;\r
-import com.vaadin.ui.DateField;\r
-import com.vaadin.ui.ExpandLayout;\r
-\r
-/**\r
- * \r
- * @author IT Mill Ltd.\r
- */\r
-public class TestForExpandLayout3 extends CustomComponent {\r
-\r
- ExpandLayout main = new ExpandLayout();\r
-\r
- DateField df;\r
-\r
- public TestForExpandLayout3() {\r
- setCompositionRoot(main);\r
- createNewView();\r
- }\r
-\r
- public void createNewView() {\r
- main.removeAllComponents();\r
-\r
- ExpandLayout el;\r
- Button b;\r
- Button b2;\r
-\r
- el = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
-\r
- b = new Button("SDFS");\r
- b2 = new Button("DSFSDFDFSSDF");\r
-\r
- el.addComponent(b);\r
- el.addComponent(b2);\r
-\r
- el.expand(b);\r
- el.setComponentAlignment(b, ExpandLayout.ALIGNMENT_RIGHT,\r
- ExpandLayout.ALIGNMENT_VERTICAL_CENTER);\r
- main.addComponent(el);\r
-\r
- el = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
-\r
- b = new Button("SDFS");\r
- b2 = new Button("DSFSDFDFSSDF");\r
-\r
- el.addComponent(b);\r
- el.addComponent(b2);\r
-\r
- el.expand(b);\r
- el.setComponentAlignment(b, ExpandLayout.ALIGNMENT_HORIZONTAL_CENTER,\r
- ExpandLayout.ALIGNMENT_VERTICAL_CENTER);\r
- el.setHeight(60, ExpandLayout.UNITS_PIXELS);\r
- el.setMargin(true);\r
- main.addComponent(el);\r
-\r
- el = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
-\r
- b = new Button("SDFS");\r
- b2 = new Button("DSFSDFDFSSDF");\r
-\r
- el.addComponent(b);\r
- el.addComponent(b2);\r
-\r
- el.expand(b);\r
- el.setComponentAlignment(b, ExpandLayout.ALIGNMENT_RIGHT,\r
- ExpandLayout.ALIGNMENT_BOTTOM);\r
- el.setHeight(100, ExpandLayout.UNITS_PIXELS);\r
- el.setSpacing(true);\r
-\r
- main.addComponent(el);\r
-\r
- }\r
-}\r
import com.vaadin.ui.Component;
import com.vaadin.ui.ComponentContainer;
import com.vaadin.ui.Embedded;
-import com.vaadin.ui.ExpandLayout;
+import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.Button.ClickEvent;
setMainWindow(w);
w.setTheme("demo");
- final ExpandLayout main = new ExpandLayout();
- w.setLayout(main);
+ final VerticalLayout main = new VerticalLayout();
+ w.setContent(main);
select = new ComboBox();
select.setImmediate(true);
}
});
- OrderedLayout controllers = new OrderedLayout(
- OrderedLayout.ORIENTATION_HORIZONTAL);
+ HorizontalLayout controllers = new HorizontalLayout();
controllers.addComponent(prev);
controllers.addComponent(select);
controllers.addComponent(next);
testPanel = new Panel();
testPanel.setSizeFull();
- testPanel.setLayout(new ExpandLayout());
+ testPanel.setContent(new VerticalLayout());
testPanel.setStyleName("testable");
main.addComponent(testPanel);
- main.expand(testPanel);
+ main.setExpandRatio(testPanel, 1);
}
t.addConfiguration(new Configuration("100px*100px") {
@Override
void configure(Component c) {
- c.setWidth(60);
- c.setHeight(60);
+ c.setWidth("60px");
+ c.setHeight("60px");
}
});
t = new Testable(c);
Panel p = new Panel(
"Wrapper panel (400px*400px)");
- p.setLayout(new ExpandLayout());
+ p.setContent(new VerticalLayout());
p.setWidth("400px");
p.setHeight("400px");
p.addComponent(c);
import com.vaadin.data.util.FilesystemContainer;
import com.vaadin.data.util.FilesystemContainer.FileItem;
import com.vaadin.demo.util.SampleDirectory;
-import com.vaadin.ui.ExpandLayout;
import com.vaadin.ui.Field;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Tree;
+import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.Component.Event;
import com.vaadin.ui.Component.Listener;
public void init() {
final Window w = new Window("Tree FilesystemContainer demo");
setMainWindow(w);
- final ExpandLayout main = new ExpandLayout();
- w.setLayout(main);
+ final VerticalLayout main = new VerticalLayout();
+ w.setContent(main);
main.setMargin(true);
main.setSpacing(true);
- propertyPanel.setHeight(120);
+ propertyPanel.setHeight("120px");
main.addComponent(propertyPanel);
- explorerPanel.setHeight(100);
- explorerPanel.setHeightUnits(Panel.UNITS_PERCENTAGE);
+ explorerPanel.setHeight("100%");
main.addComponent(explorerPanel);
- main.expand(explorerPanel);
+ main.setExpandRatio(explorerPanel, 1);
// Explorer panel contains tree
explorerPanel.addComponent(filesystem);
+++ /dev/null
-package com.vaadin.tests.tickets;
-
-import com.vaadin.Application;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.OrderedLayout;
-import com.vaadin.ui.TextField;
-import com.vaadin.ui.Window;
-import com.vaadin.ui.Button.ClickEvent;
-
-public class Ticket1902 extends Application {
-
- @Override
- public void init() {
-
- // Main layout and main window
- final OrderedLayout mainLayout = new OrderedLayout();
- setMainWindow(new Window("Testcase for #1902", mainLayout));
- setTheme("tests-tickets");
- mainLayout.setMargin(false);
- mainLayout.setSpacing(true);
- mainLayout.addComponent(new Button("mainLayout.setSizeFull()",
- new Button.ClickListener() {
- public void buttonClick(ClickEvent event) {
- mainLayout.setSizeFull();
- getMainWindow().showNotification(
- "Set the main layout size full");
- }
- }));
- mainLayout.addComponent(new Button("mainLayout.setWidth(\"100%\")",
- new Button.ClickListener() {
- public void buttonClick(ClickEvent event) {
- mainLayout.setWidth("100%");
- getMainWindow().showNotification(
- "Set the main layout width 100%");
- }
- }));
-
- // 100% wide component
- TextField b2 = new TextField("100% wide field");
- mainLayout.addComponent(b2);
- b2.setWidth("100%");
-
- // 400px wide colored layout
- OrderedLayout lo = new OrderedLayout();
- lo.setStyleName("red-background");
- mainLayout.addComponent(lo);
- lo.setWidth(400);
-
- Button b = new Button("100% wide button");
- lo.addComponent(b);
- b.setWidth("100%");
-
- TextField tf = new TextField("100% wide textfield");
- lo.addComponent(tf);
- tf.setWidth("100%");
-
- // 400x100 colored layout
- OrderedLayout lo2 = new OrderedLayout();
- lo2.setStyleName("red-background");
- mainLayout.addComponent(lo2);
- lo2.setWidth("50%");
- lo2.setHeight(200);
-
- Button b3 = new Button("100% wide button");
- lo2.addComponent(b3);
- b3.setWidth("100%");
-
- TextField tf2 = new TextField("100% wide textfield");
- lo2.addComponent(tf2);
- tf2.setWidth("100%");
- // tf2 = new TextField("50% wide, 100% height textfield"); // does not
- // work with caption (10.7.2008 mac hosted mode) due layouts are broken
- // in trunk
- tf2 = new TextField();
- tf2.setRows(2); // trigger textArea impl.
- tf2.setHeight("100%");
- tf2.setWidth("50%");
- lo2.addComponent(tf2);
- }
-}
\ No newline at end of file
+++ /dev/null
-package com.vaadin.tests.tickets;
-
-import com.vaadin.Application;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.ExpandLayout;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.Window;
-
-public class Ticket1934 extends Application {
-
- @Override
- public void init() {
- Window w = new Window(
- "#1934 : Horizontal ExpandLayout completely broken");
- setMainWindow(w);
- w.addComponent(new Label(
- "Horizontal 500x200 ExpandLayout with two components:"));
-
- ExpandLayout testedLayout = new ExpandLayout(
- ExpandLayout.ORIENTATION_HORIZONTAL);
- testedLayout.setWidth("500px");
- testedLayout.setHeight("200px");
-
- Button b1 = new Button("b1");
- testedLayout.addComponent(b1);
- testedLayout.expand(b1);
- testedLayout.addComponent(new Button("b2"));
-
- w.addComponent(testedLayout);
- }
-
-}
+++ /dev/null
-package com.vaadin.tests.tickets;\r
-\r
-import com.vaadin.Application;\r
-import com.vaadin.terminal.UserError;\r
-import com.vaadin.ui.ExpandLayout;\r
-import com.vaadin.ui.GridLayout;\r
-import com.vaadin.ui.Panel;\r
-import com.vaadin.ui.TextField;\r
-import com.vaadin.ui.Window;\r
-\r
-public class Ticket2032 extends Application {\r
-\r
- @Override\r
- public void init() {\r
- Window w = new Window(getClass().getSimpleName());\r
- setMainWindow(w);\r
- // setTheme("tests-tickets");\r
- GridLayout layout = new GridLayout(10, 10);\r
- w.setLayout(layout);\r
- createUI(layout);\r
- }\r
-\r
- private void createUI(GridLayout layout) {\r
- ExpandLayout el = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
- Panel p = new Panel(el);\r
- p.setWidth(600);\r
- p.setHeight(500);\r
- p.getLayout().setSizeFull();\r
-\r
- TextField tf = new TextField("Field caption");\r
- tf.setValue("Expanded");\r
- el.addComponent(tf);\r
- el.expand(tf);\r
- tf.setSizeFull();\r
-\r
- tf = new TextField("Vertical bottom");\r
- // tf.setComponentError(new UserError("Error"));\r
- tf.setValue("Vertical bottom");\r
- el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
- ExpandLayout.ALIGNMENT_BOTTOM);\r
- el.addComponent(tf);\r
-\r
- tf = new TextField("Vertical top");\r
- tf.setComponentError(new UserError("Error"));\r
- el.addComponent(tf);\r
- tf.setValue("Vertical top");\r
- el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
- ExpandLayout.ALIGNMENT_TOP);\r
- tf = new TextField("Vertical center");\r
- el.addComponent(tf);\r
- tf.setValue("Vertical center");\r
- // tf.setComponentError(new UserError("Error"));\r
- el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
- ExpandLayout.ALIGNMENT_VERTICAL_CENTER);\r
-\r
- layout.addComponent(p);\r
- }\r
-}\r
+++ /dev/null
-package com.vaadin.tests.tickets;\r
-\r
-import com.vaadin.Application;\r
-import com.vaadin.terminal.UserError;\r
-import com.vaadin.ui.ExpandLayout;\r
-import com.vaadin.ui.GridLayout;\r
-import com.vaadin.ui.OrderedLayout;\r
-import com.vaadin.ui.Panel;\r
-import com.vaadin.ui.TextField;\r
-import com.vaadin.ui.Window;\r
-\r
-public class Ticket2033 extends Application {\r
-\r
- @Override\r
- public void init() {\r
- Window w = new Window(getClass().getSimpleName());\r
- setMainWindow(w);\r
- // setTheme("tests-tickets");\r
- GridLayout layout = new GridLayout(2, 2);\r
- w.setLayout(layout);\r
- createUI(layout);\r
- }\r
-\r
- private void createUI(GridLayout layout) {\r
- layout.addComponent(createExpandLayoutPanel());\r
- layout.addComponent(createOrderedLayoutPanel());\r
- layout.addComponent(createGridLayoutPanel());\r
- }\r
-\r
- private Panel createExpandLayoutPanel() {\r
- ExpandLayout el = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
- Panel p = new Panel("ExpandLayout", el);\r
- p.setWidth(600);\r
- p.setHeight(500);\r
- p.getLayout().setSizeFull();\r
-\r
- TextField tf = new TextField("TextField 1");\r
- tf.setValue("Expanded");\r
- el.addComponent(tf);\r
- el.expand(tf);\r
- tf.setSizeFull();\r
-\r
- tf = new TextField("TextField 2 has a longer caption");\r
- // tf.setComponentError(new UserError("Error"));\r
- tf.setWidth(100);\r
- tf.setValue("Vertical bottom");\r
- // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
- // ExpandLayout.ALIGNMENT_BOTTOM);\r
- el.addComponent(tf);\r
-\r
- tf = new TextField(\r
- "TextField 3 has a very, very long caption for some weird reason.");\r
- tf.setWidth(100);\r
- tf.setComponentError(new UserError("Error"));\r
- el.addComponent(tf);\r
- tf.setValue("Vertical top");\r
- // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
- // ExpandLayout.ALIGNMENT_TOP);\r
- tf = new TextField("TextField 4");\r
- el.addComponent(tf);\r
- tf.setValue("Vertical center");\r
- // tf.setComponentError(new UserError("Error"));\r
- // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
- // ExpandLayout.ALIGNMENT_VERTICAL_CENTER);\r
-\r
- return p;\r
- }\r
-\r
- private Panel createOrderedLayoutPanel() {\r
- OrderedLayout ol = new OrderedLayout(\r
- ExpandLayout.ORIENTATION_HORIZONTAL);\r
- Panel p = new Panel("OrderedLayout", ol);\r
- p.setWidth(600);\r
- p.setHeight(500);\r
- p.getLayout().setSizeFull();\r
-\r
- TextField tf = new TextField("TextField 1");\r
- tf.setValue("Expanded");\r
- ol.addComponent(tf);\r
- // ol.expand(tf);\r
- tf.setSizeFull();\r
-\r
- tf = new TextField("TextField 2 has a longer caption");\r
- // tf.setComponentError(new UserError("Error"));\r
- tf.setWidth(100);\r
- tf.setValue("Vertical bottom");\r
- // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
- // ExpandLayout.ALIGNMENT_BOTTOM);\r
- ol.addComponent(tf);\r
-\r
- tf = new TextField(\r
- "TextField 3 has a very, very long caption for some weird reason.");\r
- tf.setWidth(100);\r
- tf.setComponentError(new UserError("Error"));\r
- ol.addComponent(tf);\r
- tf.setValue("Vertical top");\r
- // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
- // ExpandLayout.ALIGNMENT_TOP);\r
- tf = new TextField("TextField 4");\r
- ol.addComponent(tf);\r
- tf.setValue("Vertical center");\r
- // tf.setComponentError(new UserError("Error"));\r
- // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
- // ExpandLayout.ALIGNMENT_VERTICAL_CENTER);\r
-\r
- return p;\r
- }\r
-\r
- private Panel createGridLayoutPanel() {\r
- GridLayout gl = new GridLayout(4, 1);\r
- Panel p = new Panel("GridLayout", gl);\r
- p.setWidth(600);\r
- p.setHeight(500);\r
- p.getLayout().setSizeFull();\r
-\r
- TextField tf = new TextField("TextField 1");\r
- tf.setValue("Expanded");\r
- gl.addComponent(tf);\r
- // ol.expand(tf);\r
- tf.setSizeFull();\r
-\r
- tf = new TextField("TextField 2 has a longer caption");\r
- // tf.setComponentError(new UserError("Error"));\r
- tf.setWidth(100);\r
- tf.setValue("Vertical bottom");\r
- // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
- // ExpandLayout.ALIGNMENT_BOTTOM);\r
- gl.addComponent(tf);\r
-\r
- tf = new TextField(\r
- "TextField 3 has a very, very long caption for some weird reason.");\r
- tf.setWidth(100);\r
- tf.setComponentError(new UserError("Error"));\r
- gl.addComponent(tf);\r
- tf.setValue("Vertical top");\r
- // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
- // ExpandLayout.ALIGNMENT_TOP);\r
- tf = new TextField("TextField 4");\r
- gl.addComponent(tf);\r
- tf.setValue("Vertical center");\r
- // tf.setComponentError(new UserError("Error"));\r
- // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
- // ExpandLayout.ALIGNMENT_VERTICAL_CENTER);\r
-\r
- return p;\r
- }\r
-}\r
import com.vaadin.ui.Accordion;
import com.vaadin.ui.Component;
import com.vaadin.ui.CustomComponent;
-import com.vaadin.ui.ExpandLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
import com.vaadin.ui.Panel;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.TabSheet.SelectedTabChangeEvent;
import com.vaadin.ui.TabSheet.SelectedTabChangeListener;
public void init() {
mainWindow = new Window("Vaadin");
mainWindow.setSizeFull();
- mainWindow.getLayout().setSizeFull();
+ mainWindow.getContent().setSizeFull();
setMainWindow(mainWindow);
- OrderedLayout ol = new OrderedLayout();
+ VerticalLayout ol = new VerticalLayout();
ol.setWidth("200px");
ol.setHeight("200px");
- OrderedLayout ol2 = new OrderedLayout();
+ VerticalLayout ol2 = new VerticalLayout();
ol2.setSizeFull();
p = new Panel("This is a panel");
private Table table = new Table();
private String[] columns;
- private ExpandLayout layout = new ExpandLayout();
+ private VerticalLayout layout = new VerticalLayout();
public MyTable(int columnNumber, String id) {
setDebugId(id);