Browse Source

Fixed use of deprecated alignment method and theme constants (#5749)

svn changeset:15433/svn branch:6.5
tags/6.7.0.beta1
Artur Signell 13 years ago
parent
commit
53c8314691
71 changed files with 150 additions and 128 deletions
  1. 0
    1
      src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
  2. 1
    0
      src/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java
  3. 2
    0
      src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
  4. 1
    1
      tests/src/com/vaadin/tests/TestBench.java
  5. 4
    3
      tests/src/com/vaadin/tests/TestContainerChanges.java
  6. 2
    1
      tests/src/com/vaadin/tests/TestForBasicApplicationLayout.java
  7. 0
    1
      tests/src/com/vaadin/tests/TestForPreconfiguredComponents.java
  8. 2
    1
      tests/src/com/vaadin/tests/components/form/UndefinedWideFormWithRelativeWideFooter.java
  9. 2
    1
      tests/src/com/vaadin/tests/components/table/TableRowHeight2.java
  10. 2
    1
      tests/src/com/vaadin/tests/components/table/TableRowHeight3.java
  11. 1
    1
      tests/src/com/vaadin/tests/components/tabsheet/TabSheetCaptions.java
  12. 1
    1
      tests/src/com/vaadin/tests/components/window/CenteredWindowWithUndefinedSize.java
  13. 4
    11
      tests/src/com/vaadin/tests/components/window/WindowResizeListener.java
  14. 4
    2
      tests/src/com/vaadin/tests/featurebrowser/PropertyPanel.java
  15. 1
    1
      tests/src/com/vaadin/tests/layouts/DeepComponentTrees.java
  16. 7
    8
      tests/src/com/vaadin/tests/layouts/GridLayoutInsidePanel.java
  17. 1
    1
      tests/src/com/vaadin/tests/layouts/GridLayoutInsidePanel2.java
  18. 16
    6
      tests/src/com/vaadin/tests/layouts/OrderedLayoutBasics.java
  19. 2
    2
      tests/src/com/vaadin/tests/layouts/TestAbsoluteLayout.java
  20. 1
    1
      tests/src/com/vaadin/tests/layouts/VerticalLayoutWithRelativeSizeComponents.java
  21. 1
    1
      tests/src/com/vaadin/tests/robustness/Robustness.java
  22. 2
    2
      tests/src/com/vaadin/tests/tickets/Ticket1245.java
  23. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket1362Login.java
  24. 4
    4
      tests/src/com/vaadin/tests/tickets/Ticket1435.java
  25. 2
    1
      tests/src/com/vaadin/tests/tickets/Ticket1805.java
  26. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket1878.java
  27. 5
    5
      tests/src/com/vaadin/tests/tickets/Ticket1966_2.java
  28. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket1966_3.java
  29. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket1969.java
  30. 4
    4
      tests/src/com/vaadin/tests/tickets/Ticket2024.java
  31. 5
    5
      tests/src/com/vaadin/tests/tickets/Ticket2029.java
  32. 3
    2
      tests/src/com/vaadin/tests/tickets/Ticket2040.java
  33. 2
    2
      tests/src/com/vaadin/tests/tickets/Ticket2048.java
  34. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2061.java
  35. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2083.java
  36. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2095.java
  37. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2101.java
  38. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2151.java
  39. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2157.java
  40. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2178.java
  41. 2
    2
      tests/src/com/vaadin/tests/tickets/Ticket2204.java
  42. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2209OL.java
  43. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2209OL2.java
  44. 2
    1
      tests/src/com/vaadin/tests/tickets/Ticket2215.java
  45. 2
    2
      tests/src/com/vaadin/tests/tickets/Ticket2221.java
  46. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2222.java
  47. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2231.java
  48. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2234.java
  49. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2235.java
  50. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2240.java
  51. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2242.java
  52. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2245.java
  53. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2271.java
  54. 3
    1
      tests/src/com/vaadin/tests/tickets/Ticket2279.java
  55. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2282.java
  56. 2
    2
      tests/src/com/vaadin/tests/tickets/Ticket2283.java
  57. 5
    5
      tests/src/com/vaadin/tests/tickets/Ticket2294.java
  58. 2
    1
      tests/src/com/vaadin/tests/tickets/Ticket2304.java
  59. 2
    1
      tests/src/com/vaadin/tests/tickets/Ticket2310.java
  60. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2323.java
  61. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2329.java
  62. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2341.java
  63. 2
    1
      tests/src/com/vaadin/tests/tickets/Ticket2344.java
  64. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2347.java
  65. 2
    2
      tests/src/com/vaadin/tests/tickets/Ticket2365.java
  66. 7
    5
      tests/src/com/vaadin/tests/tickets/Ticket2405.java
  67. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket2406.java
  68. 2
    2
      tests/src/com/vaadin/tests/tickets/Ticket2432.java
  69. 5
    4
      tests/src/com/vaadin/tests/tickets/Ticket2998.java
  70. 1
    1
      tests/src/com/vaadin/tests/tickets/Ticket34.java
  71. 2
    1
      tests/src/com/vaadin/tests/validation/EmptyFieldErrorIndicators.java

+ 0
- 1
src/com/vaadin/terminal/gwt/client/ApplicationConnection.java View File

@@ -221,7 +221,6 @@ public class ApplicationConnection {
/**
* Helper for tt initialization
*/
@SuppressWarnings("unused")
private JavaScriptObject getVersionInfo() {
return configuration.getVersionInfoJSObject();
}

+ 1
- 0
src/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java View File

@@ -21,6 +21,7 @@ import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.client.Paintable;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
import com.vaadin.terminal.gwt.client.ui.richtextarea.VRichTextArea;

/**
* A helper class to implement keyboard shorcut handling. Keeps a list of owners

+ 2
- 0
src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java View File

@@ -52,6 +52,8 @@ import com.vaadin.Application.SystemMessages;
import com.vaadin.external.org.apache.commons.fileupload.portlet.PortletFileUpload;
import com.vaadin.terminal.DownloadStream;
import com.vaadin.terminal.Terminal;
import com.vaadin.terminal.gwt.client.ApplicationConfiguration;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.ui.Window;

/**

+ 1
- 1
tests/src/com/vaadin/tests/TestBench.java View File

@@ -208,7 +208,7 @@ public class TestBench extends com.vaadin.Application implements Property.ValueC
try {
final Application app = (Application) c.newInstance();
app.init();
Layout lo = app.getMainWindow().getLayout();
Layout lo = (Layout) app.getMainWindow().getContent();
lo.setParent(null);
return lo;
} catch (final Exception e) {

+ 4
- 3
tests/src/com/vaadin/tests/TestContainerChanges.java View File

@@ -19,6 +19,7 @@ import com.vaadin.ui.Panel;
import com.vaadin.ui.Table;
import com.vaadin.ui.Tree;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.Reindeer;
/**
* @author marc
@@ -157,7 +158,7 @@ public class TestContainerChanges extends CustomComponent {
buttons.addComponent(b);
Panel p = new Panel("Tree");
p.setStyleName(Panel.STYLE_LIGHT);
p.setStyleName(Reindeer.PANEL_LIGHT);
h.addComponent(p);
Tree tree = new Tree("ITEM_CAPTION_MODE_PROPERTY");
tree.setContainerDataSource(ordered);
@@ -171,7 +172,7 @@ public class TestContainerChanges extends CustomComponent {
p.addComponent(tree);
p = new Panel("ComboBox");
p.setStyleName(Panel.STYLE_LIGHT);
p.setStyleName(Reindeer.PANEL_LIGHT);
h.addComponent(p);
ComboBox c = new ComboBox("ITEM_CAPTION_MODE_PROPERTY");
c.setImmediate(true);
@@ -186,7 +187,7 @@ public class TestContainerChanges extends CustomComponent {
p.addComponent(c);
p = new Panel("ListBox");
p.setStyleName(Panel.STYLE_LIGHT);
p.setStyleName(Reindeer.PANEL_LIGHT);
h.addComponent(p);
ListSelect l = new ListSelect("ITEM_CAPTION_MODE_PROPERTY");
l.setContainerDataSource(cont);

+ 2
- 1
tests/src/com/vaadin/tests/TestForBasicApplicationLayout.java View File

@@ -17,6 +17,7 @@ import com.vaadin.ui.SplitPanel;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.Reindeer;
public class TestForBasicApplicationLayout extends CustomComponent {
@@ -66,7 +67,7 @@ public class TestForBasicApplicationLayout extends CustomComponent {
cal.setLocale(new Locale("en", "US"));
report.addComponent(cal);
((VerticalLayout) report.getContent()).setExpandRatio(controls, 1);
report.addStyleName(Panel.STYLE_LIGHT);
report.addStyleName(Reindeer.PANEL_LIGHT);
report.setHeight(100, SplitPanel.UNITS_PERCENTAGE);
sp2.setFirstComponent(report);

+ 0
- 1
tests/src/com/vaadin/tests/TestForPreconfiguredComponents.java View File

@@ -17,7 +17,6 @@ import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.NativeSelect;
import com.vaadin.ui.OptionGroup;
import com.vaadin.ui.OrderedLayout;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Tree;
import com.vaadin.ui.TwinColSelect;

+ 2
- 1
tests/src/com/vaadin/tests/components/form/UndefinedWideFormWithRelativeWideFooter.java View File

@@ -1,6 +1,7 @@
package com.vaadin.tests.components.form;

import com.vaadin.Application;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.Form;
import com.vaadin.ui.HorizontalLayout;
@@ -29,7 +30,7 @@ public class UndefinedWideFormWithRelativeWideFooter extends Application {
hl.setWidth("100%");
Button b = new Button("right aligned");
hl.addComponent(b);
hl.setComponentAlignment(b, "r");
hl.setComponentAlignment(b, Alignment.TOP_RIGHT);
f.setFooter(hl);
}
}

+ 2
- 1
tests/src/com/vaadin/tests/components/table/TableRowHeight2.java View File

@@ -5,6 +5,7 @@ import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Table;
import com.vaadin.ui.themes.BaseTheme;

public class TableRowHeight2 extends TestBase {

@@ -44,7 +45,7 @@ public class TableRowHeight2 extends TestBase {

Button b = new Button();
b.setWidth("100%");
b.setStyleName(Button.STYLE_LINK);
b.setStyleName(BaseTheme.BUTTON_LINK);
b.addStyleName("nowraplink");

b.setCaption("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper, elit quis elementum iaculis, dui est rutrum risus, at cursus sem leo eget arcu. Proin vel eros ut tortor luctus pretium. Nulla facilisi. Donec in dui. Proin ac diam vitae massa tempus faucibus. Fusce eu risus. Nunc ac risus. Cras libero.");

+ 2
- 1
tests/src/com/vaadin/tests/components/table/TableRowHeight3.java View File

@@ -5,6 +5,7 @@ import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Table;
import com.vaadin.ui.themes.BaseTheme;

public class TableRowHeight3 extends TestBase {

@@ -36,7 +37,7 @@ public class TableRowHeight3 extends TestBase {

Button b = new Button();
b.setWidth("100%");
b.setStyleName(Button.STYLE_LINK);
b.setStyleName(BaseTheme.BUTTON_LINK);
b.addStyleName("nowraplink");
if (i < 2) {
b.setCaption("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper, elit quis elementum iaculis, dui est rutrum risus, at cursus sem leo eget arcu. Proin vel eros ut tortor luctus pretium. Nulla facilisi. Donec in dui. Proin ac diam vitae massa tempus faucibus. Fusce eu risus. Nunc ac risus. Cras libero.");

+ 1
- 1
tests/src/com/vaadin/tests/components/tabsheet/TabSheetCaptions.java View File

@@ -36,7 +36,7 @@ public class TabSheetCaptions extends TestBase {
panel1 = new Panel("Panel initial caption (should also be tab caption)");
panel1.setSizeFull();
panel1.getLayout().setSizeFull();
panel1.getContent().setSizeFull();
panel1.addComponent(new Label("This is a panel"));
tabSheet.addTab(panel1);

+ 1
- 1
tests/src/com/vaadin/tests/components/window/CenteredWindowWithUndefinedSize.java View File

@@ -20,7 +20,7 @@ public class CenteredWindowWithUndefinedSize extends TestBase {
protected void setup() {
Window centered = new Window("A window");
centered.setSizeUndefined();
centered.getLayout().setSizeFull();
centered.getContent().setSizeFull();
centered.center();

Label l = new Label("This window should be centered");

+ 4
- 11
tests/src/com/vaadin/tests/components/window/WindowResizeListener.java View File

@@ -15,9 +15,7 @@ public class WindowResizeListener extends TestBase {

@Override
protected String getDescription() {
return "Size changes from windows (both sub "
+ "and browsers level) should get back to server."
+ " If size changes, a separate server side event should occur.";
return "Size changes from windows (both sub " + "and browsers level) should get back to server." + " If size changes, a separate server side event should occur.";
}

@Override
@@ -35,9 +33,7 @@ public class WindowResizeListener extends TestBase {

getMainWindow().addListener(new ResizeListener() {
public void windowResized(ResizeEvent e) {
l.setValue("Current main window size: "
+ getMainWindow().getWidth() + " x "
+ getMainWindow().getHeight());
l.setValue("Current main window size: " + getMainWindow().getWidth() + " x " + getMainWindow().getHeight());
}
});

@@ -80,7 +76,7 @@ class ResizeListenerWindow extends Window {
super("Subwindow");
setWidth("400px");

Layout hl = getLayout();
Layout hl = (Layout) getContent();
hl.addComponent(new Label("Current size: "));
hl.addComponent(sizeLabel);

@@ -94,9 +90,6 @@ class ResizeListenerWindow extends Window {
}

public void updateLabel() {
sizeLabel
.setValue(getWidth() + Sizeable.UNIT_SYMBOLS[getWidthUnits()]
+ " x " + getHeight()
+ Sizeable.UNIT_SYMBOLS[getHeightUnits()]);
sizeLabel.setValue(getWidth() + Sizeable.UNIT_SYMBOLS[getWidthUnits()] + " x " + getHeight() + Sizeable.UNIT_SYMBOLS[getHeightUnits()]);
}
}

+ 4
- 2
tests/src/com/vaadin/tests/featurebrowser/PropertyPanel.java View File

@@ -28,6 +28,7 @@ import com.vaadin.ui.DateField;
import com.vaadin.ui.Field;
import com.vaadin.ui.Form;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Layout;
import com.vaadin.ui.OptionGroup;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Select;
@@ -36,6 +37,7 @@ import com.vaadin.ui.TextField;
import com.vaadin.ui.Tree;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.themes.Reindeer;

public class PropertyPanel extends Panel implements Button.ClickListener, Property.ValueChangeListener {

@@ -60,7 +62,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
/** Contruct new property panel for configuring given object. */
public PropertyPanel(Object objectToConfigure) {
super();
getLayout().setMargin(false);
((Layout) getContent()).setMargin(false);

// Layout
setCaption("Properties");
@@ -110,7 +112,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
// Create new panel containing the form
final Panel p = new Panel();
p.setCaption(propertySetCaption);
p.setStyleName(Panel.STYLE_LIGHT);
p.setStyleName(Reindeer.PANEL_LIGHT);
p.addComponent(properties);
formsLayout.addComponent(p);


+ 1
- 1
tests/src/com/vaadin/tests/layouts/DeepComponentTrees.java View File

@@ -33,7 +33,7 @@ public class DeepComponentTrees extends TestBase {
protected void setup() {
Layout main = getLayout();
main.setSizeUndefined();
getMainWindow().getLayout().setHeight(null);
getMainWindow().getContent().setHeight(null);
Label l = new Label(
"This is a nice game to guess how many Layouts your FF2 (or any other browser) can deal with. Due to the worldwide attempt to decrease energy consumption, playing this game is only allowed above 60° longitude betwheen August and May (as excess energy consumed by you CPU is used to heat your room). It is considered wise to save all your work before starting the game.");

+ 7
- 8
tests/src/com/vaadin/tests/layouts/GridLayoutInsidePanel.java View File

@@ -3,6 +3,7 @@ package com.vaadin.tests.layouts;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Panel;

public class GridLayoutInsidePanel extends TestBase {
@@ -22,13 +23,12 @@ public class GridLayoutInsidePanel extends TestBase {
{
GridLayout gl = new GridLayout(1, 1);
gl.setSizeUndefined();
gl.addComponent(new Label(
"A label which defines the size of the GL"));
gl.addComponent(new Label("A label which defines the size of the GL"));

Panel p = new Panel("Panel 1");
p.getLayout().setMargin(false);
((Layout) p.getContent()).setMargin(false);
p.setSizeUndefined();
p.getLayout().setSizeUndefined();
p.getContent().setSizeUndefined();

p.addComponent(gl);
addComponent(p);
@@ -36,13 +36,12 @@ public class GridLayoutInsidePanel extends TestBase {
{
GridLayout gl = new GridLayout(1, 1);
gl.setSizeUndefined();
gl.addComponent(new Label(
"A label which defines the size of the GL"));
gl.addComponent(new Label("A label which defines the size of the GL"));

Panel p = new Panel("Panel 2", gl);
p.getLayout().setMargin(false);
((Layout) p.getContent()).setMargin(false);
p.setSizeUndefined();
p.getLayout().setSizeUndefined();
p.getContent().setSizeUndefined();

addComponent(p);
}

+ 1
- 1
tests/src/com/vaadin/tests/layouts/GridLayoutInsidePanel2.java View File

@@ -14,7 +14,7 @@ public class GridLayoutInsidePanel2 extends Application {
public void init() {
Window w = new Window("Main");
setMainWindow(w);
layout = w.getLayout();
layout = (Layout) w.getContent();
GridLayout gl = new GridLayout(1, 1);
gl.setSizeUndefined();
Label l = new Label("This should be visible");

+ 16
- 6
tests/src/com/vaadin/tests/layouts/OrderedLayoutBasics.java View File

@@ -16,7 +16,6 @@ import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Layout.AlignmentHandler;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Select;
import com.vaadin.ui.TextField;
@@ -25,7 +24,6 @@ import com.vaadin.ui.VerticalLayout;
public class OrderedLayoutBasics extends TestBase {
String valignName[] = new String[] { "top", "middle", "bottom" };
int valign[] = new int[] { AlignmentHandler.ALIGNMENT_TOP, AlignmentHandler.ALIGNMENT_VERTICAL_CENTER, AlignmentHandler.ALIGNMENT_BOTTOM };
Set<AbstractOrderedLayout> layouts = new HashSet<AbstractOrderedLayout>();
private AbstractOrderedLayout layoutContainer;
@@ -43,7 +41,7 @@ public class OrderedLayoutBasics extends TestBase {
@Override
public void setup() {
getMainWindow().getLayout().setHeight(null);
getMainWindow().getContent().setHeight(null);
layoutContainer = new VerticalLayout();
createUI(layoutContainer);
@@ -104,6 +102,7 @@ public class OrderedLayoutBasics extends TestBase {
/* LAYOUTS */
@SuppressWarnings("unused")
private Layout layout1() {
HorizontalLayout ol = new HorizontalLayout();
ol.setHeight("200px");
@@ -144,6 +143,7 @@ public class OrderedLayoutBasics extends TestBase {
}
@SuppressWarnings("unused")
private Layout layout2() {
HorizontalLayout ol = new HorizontalLayout();
ol.setHeight("70px");
@@ -187,6 +187,7 @@ public class OrderedLayoutBasics extends TestBase {
return ol;
}
@SuppressWarnings("unused")
private Layout layout3() {
HorizontalLayout ol = new HorizontalLayout();
ol.setHeight("");
@@ -237,6 +238,7 @@ public class OrderedLayoutBasics extends TestBase {
return ol;
}
@SuppressWarnings("unused")
private Layout layout3New() {
HorizontalLayout ol = new HorizontalLayout();
ol.setHeight("300px");
@@ -288,6 +290,7 @@ public class OrderedLayoutBasics extends TestBase {
return ol;
}
@SuppressWarnings("unused")
private Layout layout4(AbstractOrderedLayout ol) {
// ol.setHeight("300px");
// ol.setWidth("500px");
@@ -323,7 +326,13 @@ public class OrderedLayoutBasics extends TestBase {
tf.setWidth(w + "px");
tf.setHeight(w + "px");
ol.addComponent(tf);
ol.setComponentAlignment(tf, AlignmentHandler.ALIGNMENT_LEFT, valign[i % 3]);
if (i % 3 == 0) {
ol.setComponentAlignment(tf, Alignment.TOP_LEFT);
} else if (i % 3 == 1) {
ol.setComponentAlignment(tf, Alignment.MIDDLE_LEFT);
} else {
ol.setComponentAlignment(tf, Alignment.BOTTOM_LEFT);
}
}
@@ -396,7 +405,7 @@ public class OrderedLayoutBasics extends TestBase {
ol.addComponent(tf);
ol.setComponentAlignment(tf, Alignment.TOP_LEFT);
Button b;
// Button b;
// b = new Button("This is a 100%x50% valign middle button");
// b.setSizeFull();
// b.setHeight("50%");
@@ -560,7 +569,7 @@ public class OrderedLayoutBasics extends TestBase {
tf.setRequired(true);
ol.addComponent(tf);
ol.setExpandRatio(tf, 1f);
ol.setComponentAlignment(tf, AlignmentHandler.ALIGNMENT_LEFT, AlignmentHandler.ALIGNMENT_VERTICAL_CENTER);
ol.setComponentAlignment(tf, Alignment.MIDDLE_LEFT);
// tf.setComponentError(new UserError("It's broken!"));
// tf.setHeight("100%");
@@ -1069,6 +1078,7 @@ public class OrderedLayoutBasics extends TestBase {
return ol;
}
@SuppressWarnings("unused")
private Layout layout_pctFilled2(AbstractOrderedLayout ol) {
ol.setHeight("600px");
ol.setWidth("600px");

+ 2
- 2
tests/src/com/vaadin/tests/layouts/TestAbsoluteLayout.java View File

@@ -133,7 +133,7 @@ public class TestAbsoluteLayout extends TestBase {
componentChooser.addListener(new Button.ClickListener() {
public void buttonClick(ClickEvent event) {
final Window chooser = new Window("Choose component");
chooser.getLayout().setSizeUndefined();
chooser.getContent().setSizeUndefined();
chooser.setModal(true);
NativeSelect select = new NativeSelect(
@@ -188,7 +188,7 @@ public class TestAbsoluteLayout extends TestBase {
public void buttonClick(ClickEvent event) {
final Window chooser = new Window(
"Choose component type to add");
chooser.getLayout().setSizeUndefined();
chooser.getContent().setSizeUndefined();
chooser.setModal(true);
NativeSelect select = new NativeSelect(

+ 1
- 1
tests/src/com/vaadin/tests/layouts/VerticalLayoutWithRelativeSizeComponents.java View File

@@ -19,7 +19,7 @@ public class VerticalLayoutWithRelativeSizeComponents extends TestBase {
@Override
protected void setup() {
getLayout().setSizeUndefined();
getMainWindow().getLayout().setHeight(null);
getMainWindow().getContent().setHeight(null);
Label l = new Label(
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc condimentum urna quis leo. In hac habitasse platea dictumst. Pellentesque tincidunt. Sed libero nisl, faucibus in, laoreet pellentesque, consectetur non, dolor. Sed tortor. Ut pretium sapien. Cras elementum enim non lacus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla velit est, aliquam a, pellentesque a, iaculis nec, sapien. Ut ultrices ligula vitae nulla. Morbi sem pede, iaculis ac, condimentum a, ornare eget, nisi. Aliquam hendrerit pulvinar massa. Vestibulum pretium purus eu augue. Sed posuere elit ut magna. Cras consequat faucibus nunc. Vestibulum quis diam.");

+ 1
- 1
tests/src/com/vaadin/tests/robustness/Robustness.java View File

@@ -68,7 +68,7 @@ public abstract class Robustness extends com.vaadin.Application implements
create = null;
label = null;
stressLayout = null;
System.out.println("main.getLayout()=" + main.getLayout());
System.out.println("main.getLayout()=" + main.getContent());
System.out.println(getMemoryStatistics());
} else if (event.getButton() == close) {
System.out.println("Before close, memory statistics:");

+ 2
- 2
tests/src/com/vaadin/tests/tickets/Ticket1245.java View File

@@ -5,11 +5,11 @@ import com.vaadin.data.Property;
import com.vaadin.ui.AbstractSelect;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.TextField;
import com.vaadin.ui.Tree;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.themes.Reindeer;
public class Ticket1245 extends com.vaadin.Application {
@@ -38,7 +38,7 @@ class TreeExample extends CustomComponent {
setCompositionRoot(main);
// Panel w/ Tree
main.setStyleName(Panel.STYLE_LIGHT);
main.setStyleName(Reindeer.PANEL_LIGHT);
main.setWidth(200);
// // Description, this is needed. Works in first slot
main.addComponent(new Label(desc));

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket1362Login.java View File

@@ -237,7 +237,7 @@ public class Ticket1362Login extends Application {
setUser(username);
currentUser.setValue(username);
currentUser.getWindow().showNotification("Logged in user: " + username);
getMainWindow().getLayout().replaceComponent(loginBox, mainPanel);
getMainWindow().getContent().replaceComponent(loginBox, mainPanel);
el.setExpandRatio(mainPanel, 1);
} else {
getMainWindow().showNotification("Wrong password. Hint, try '1234' ", Notification.TYPE_WARNING_MESSAGE);

+ 4
- 4
tests/src/com/vaadin/tests/tickets/Ticket1435.java View File

@@ -24,7 +24,7 @@ public class Ticket1435 extends Application {

final Window mainWin = new Window("ButtonPanel containing a table test");
setMainWindow(mainWin);
((AbstractOrderedLayout) mainWin.getLayout()).setSpacing(true);
((AbstractOrderedLayout) mainWin.getContent()).setSpacing(true);

ButtonPanel dataCardView1 = buildButtonPanel("My Tickets");
ButtonPanel dataCardView2 = buildButtonPanel("My Tickets 2");
@@ -155,10 +155,10 @@ public class Ticket1435 extends Application {
private void initContainer() {
container.setStyleName("custompanel");
container.setSizeFull();
container.getLayout().setMargin(false);
container.getLayout().setSizeFull();
((Layout) container.getContent()).setMargin(false);
container.getContent().setSizeFull();
root.addComponent(container);
root.setExpandRatio(container,1);
root.setExpandRatio(container, 1);
}

public void setHeight(int height, int unit) {

+ 2
- 1
tests/src/com/vaadin/tests/tickets/Ticket1805.java View File

@@ -6,6 +6,7 @@ import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.TextField;
import com.vaadin.ui.Window;
@@ -15,7 +16,7 @@ public class Ticket1805 extends com.vaadin.Application {
public void init() {
final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));
setMainWindow(main);
main.getLayout().setMargin(false);
((Layout) main.getContent()).setMargin(false);
Label description = new Label("GridLayout with 100% (no height), is wanted to " + "share all available width with columns " + "relatively to their natural width. And it " + "should still work with margins and spacings");
main.addComponent(description);

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket1878.java View File

@@ -216,7 +216,7 @@ public class Ticket1878 extends Application {
p.setWidth(w);
p.setHeight(h);
p.getLayout().setSizeFull();
p.getContent().setSizeFull();
parentLayout.addComponent(p);
p.addComponent(form);

+ 5
- 5
tests/src/com/vaadin/tests/tickets/Ticket1966_2.java View File

@@ -39,7 +39,7 @@ public class Ticket1966_2 extends Application {
// p.addComponent(gl);
// w.getLayout().addComponent(p);
createUI(w.getLayout());
createUI((Layout) w.getContent());
}
private void createUI(Layout layout) {
@@ -52,7 +52,7 @@ public class Ticket1966_2 extends Application {
Panel p = new Panel("GridLayout");
p.setWidth(500);
p.setHeight(500);
p.getLayout().setSizeFull();
p.getContent().setSizeFull();
layout.addComponent(p);
GridLayout gl = new GridLayout(1, 4);
@@ -88,7 +88,7 @@ public class Ticket1966_2 extends Application {
Panel p = new Panel("OrderedLayout");
p.setWidth(500);
p.setHeight(500);
p.getLayout().setWidth("100%");
p.getContent().setWidth("100%");
layout.addComponent(p);
AbstractOrderedLayout ol = new VerticalLayout();
@@ -113,8 +113,8 @@ public class Ticket1966_2 extends Application {
private void expandLayout(Layout layout) {
Panel p = new Panel("ExpandLayout");
layout.addComponent(p);
p.getLayout().setWidth("500");
p.getLayout().setHeight("400");
p.getContent().setWidth("500");
p.getContent().setHeight("400");
AbstractOrderedLayout el = new VerticalLayout();
// el.setCaption("Horizontal");

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket1966_3.java View File

@@ -27,7 +27,7 @@ public class Ticket1966_3 extends Application {
Panel p = new Panel(ol);
p.setWidth("300px");
p.setHeight("300px");
p.getLayout().setSizeFull();
p.getContent().setSizeFull();
TextField tf = new TextField("Long caption, longer than 100 pixels");
tf.setWidth("100px");

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket1969.java View File

@@ -17,7 +17,7 @@ public class Ticket1969 extends com.vaadin.Application {
final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));
setMainWindow(main);
main.getLayout().setSizeFull();
main.getContent().setSizeFull();
TabSheet ts = new TabSheet();
ts.setSizeFull();

+ 4
- 4
tests/src/com/vaadin/tests/tickets/Ticket2024.java View File

@@ -17,9 +17,9 @@ public class Ticket2024 extends Application {
GridLayout layout = new GridLayout(2, 2);
layout.setHeight("100%");
layout.setWidth("700");
w.getLayout().setSizeFull();
w.getLayout().setHeight("2000");
w.getLayout().addComponent(layout);
w.getContent().setSizeFull();
w.getContent().setHeight("2000");
w.getContent().addComponent(layout);
layout.addComponent(new Label("This should NOT get stuck when scrolling down"));
layout.addComponent(new TextField("This should not get stuck either..."));
@@ -27,7 +27,7 @@ public class Ticket2024 extends Application {
VerticalLayout ol = new VerticalLayout();
ol.setHeight("1000");
ol.setWidth("200");
w.getLayout().addComponent(ol);
w.getContent().addComponent(ol);
ol.addComponent(new Label("Just a label to enable the scrollbar"));
}

+ 5
- 5
tests/src/com/vaadin/tests/tickets/Ticket2029.java View File

@@ -31,9 +31,9 @@ public class Ticket2029 extends Application {
setMainWindow(w);
// setTheme("tests-tickets");
Panel p = createPanel();
w.getLayout().addComponent(p);
w.getContent().addComponent(p);
// w.getLayout().addComponent(createGLPanel());
w.getLayout().addComponent(createPanelV());
w.getContent().addComponent(createPanelV());
}
private Panel createPanel() {
@@ -43,7 +43,7 @@ public class Ticket2029 extends Application {
HorizontalLayout layout = new HorizontalLayout();
p.setContent(layout);
p.getLayout().setSizeFull();
p.getContent().setSizeFull();
for (int i = 0; i < COMPONENTS; i++) {
TextField tf = new TextField();
@@ -72,7 +72,7 @@ public class Ticket2029 extends Application {
GridLayout layout = new GridLayout(COMPONENTS, 1);
p.setContent(layout);
p.getLayout().setSizeFull();
p.getContent().setSizeFull();
for (int i = 0; i < COMPONENTS; i++) {
TextField tf = new TextField();
@@ -110,7 +110,7 @@ public class Ticket2029 extends Application {
VerticalLayout layout = new VerticalLayout();
p.setContent(layout);
p.getLayout().setSizeFull();
p.getContent().setSizeFull();
for (int i = 0; i < COMPONENTS; i++) {
TextField tf = new TextField();

+ 3
- 2
tests/src/com/vaadin/tests/tickets/Ticket2040.java View File

@@ -2,6 +2,7 @@ package com.vaadin.tests.tickets;
import com.vaadin.ui.Accordion;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.TextField;
import com.vaadin.ui.Window;
@@ -14,8 +15,8 @@ public class Ticket2040 extends com.vaadin.Application {
Window main = new Window();
setMainWindow(main);
main.getLayout().setSizeFull();
main.getLayout().setMargin(true);
main.getContent().setSizeFull();
((Layout) main.getContent()).setMargin(true);
setTheme("tests-tickets");

+ 2
- 2
tests/src/com/vaadin/tests/tickets/Ticket2048.java View File

@@ -38,7 +38,7 @@ public class Ticket2048 extends Application {
getMainWindow().setContent(orderedLayout);
// getMainWindow().setContent(new GridLayout(1, 1));
getMainWindow().setSizeFull();
getMainWindow().getLayout().setSizeFull();
getMainWindow().getContent().setSizeFull();
createUI(orderedLayout);
// createUI(gridLayout);
@@ -73,7 +73,7 @@ public class Ticket2048 extends Application {
public void buttonClick(ClickEvent event) {
Embedded newEmbedded = new Embedded(null, new ThemeResource("icons/64/folder-add.png"));
getMainWindow().getLayout().replaceComponent(embedded, newEmbedded);
getMainWindow().getContent().replaceComponent(embedded, newEmbedded);
embedded = newEmbedded;
}

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2061.java View File

@@ -21,7 +21,7 @@ public class Ticket2061 extends Application {
public void init() {
mainWindow = new Window("Ticket 2061");
mainWindow.setSizeFull();
mainWindow.getLayout().setSizeFull();
mainWindow.getContent().setSizeFull();
setMainWindow(mainWindow);

MyTable table1 = new MyTable(24, "table1");

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2083.java View File

@@ -21,7 +21,7 @@ public class Ticket2083 extends Application {
private void createUI(GridLayout layout) {
Panel p = new Panel("This is a panel with a longer caption than it should have");
p.setWidth("100px");
p.getLayout().addComponent(new Label("Contents"));
p.getContent().addComponent(new Label("Contents"));
layout.addComponent(p);
}
}

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2095.java View File

@@ -14,7 +14,7 @@ public class Ticket2095 extends Application {
// uncomment to workaround iorderedlayout bug in current trunk
// w.setContent(new ExpandLayout());
w.getLayout().setSizeFull();
w.getContent().setSizeFull();
Embedded em = new Embedded();
em.setType(Embedded.TYPE_BROWSER);

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2101.java View File

@@ -14,7 +14,7 @@ public class Ticket2101 extends Application {
Button b = new Button("Button with a long text which will not fit on 50 pixels");
b.setWidth("50px");
w.getLayout().addComponent(b);
w.getContent().addComponent(b);
}
}

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2151.java View File

@@ -17,7 +17,7 @@ public class Ticket2151 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
// setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getLayout());
createUI((AbstractOrderedLayout) w.getContent());
}

private void createUI(AbstractOrderedLayout layout) {

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2157.java View File

@@ -14,7 +14,7 @@ public class Ticket2157 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
// setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getLayout());
createUI((AbstractOrderedLayout) w.getContent());
}

private void createUI(AbstractOrderedLayout layout) {

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2178.java View File

@@ -14,7 +14,7 @@ public class Ticket2178 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
// setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getLayout());
createUI((AbstractOrderedLayout) w.getContent());
}

private void createUI(AbstractOrderedLayout layout) {

+ 2
- 2
tests/src/com/vaadin/tests/tickets/Ticket2204.java View File

@@ -51,7 +51,7 @@ public class Ticket2204 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
// setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getLayout());
createUI((AbstractOrderedLayout) w.getContent());
}

private void createUI(AbstractOrderedLayout layout) {
@@ -174,7 +174,7 @@ public class Ticket2204 extends Application {
textArea.setSizeFull();
}
if (c == Panel.class) {
Layout layout = ((Panel) cc).getLayout();
Layout layout = (Layout) ((Panel) cc).getContent();
containerToComponent.put(cc, layout);
layout.setVisible(false);
textArea.setVisible(true);

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2209OL.java View File

@@ -18,7 +18,7 @@ public class Ticket2209OL extends Application {
@Override
public void init() {
setMainWindow(new Window());
getMainWindow().getLayout().setWidth("250px");
getMainWindow().getContent().setWidth("250px");
gl = new VerticalLayout();
gl.setStyleName("borders");
getMainWindow().addComponent(gl);

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2209OL2.java View File

@@ -18,7 +18,7 @@ public class Ticket2209OL2 extends Application {
@Override
public void init() {
setMainWindow(new Window());
getMainWindow().getLayout().setWidth("250px");
getMainWindow().getContent().setWidth("250px");
gl = new VerticalLayout();
gl.setSizeUndefined();
gl.setStyleName("borders");

+ 2
- 1
tests/src/com/vaadin/tests/tickets/Ticket2215.java View File

@@ -5,6 +5,7 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.themes.Reindeer;
public class Ticket2215 extends Application {
@@ -17,7 +18,7 @@ public class Ticket2215 extends Application {
p.addComponent(new Label("Panel1"));
p.setHeight("500px");
p.setWidth("500px");
p.setStyleName(Panel.STYLE_LIGHT);
p.setStyleName(Reindeer.PANEL_LIGHT);
ol.addComponent(p);
ol.addComponent(new Label("NextComponent"));

+ 2
- 2
tests/src/com/vaadin/tests/tickets/Ticket2221.java View File

@@ -20,7 +20,7 @@ public class Ticket2221 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
// setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getLayout());
createUI((AbstractOrderedLayout) w.getContent());
}

private void createUI(AbstractOrderedLayout layout) {
@@ -71,7 +71,7 @@ public class Ticket2221 extends Application {
outerPanel.setHeight("1000px");
outerPanel.setWidth("1000px");

outerPanel.getLayout().setSizeFull();
outerPanel.getContent().setSizeFull();
Panel innerPanel = new Panel("Inner panel");
innerPanel.setSizeFull();
outerPanel.addComponent(innerPanel);

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2222.java View File

@@ -15,7 +15,7 @@ public class Ticket2222 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getLayout());
createUI((AbstractOrderedLayout) w.getContent());
}

private void createUI(AbstractOrderedLayout layout) {

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2231.java View File

@@ -12,7 +12,7 @@ public class Ticket2231 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getLayout());
createUI((AbstractOrderedLayout) w.getContent());
}

private void createUI(AbstractOrderedLayout layout) {

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2234.java View File

@@ -13,7 +13,7 @@ public class Ticket2234 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
// setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getLayout());
createUI((AbstractOrderedLayout) w.getContent());
}

private void createUI(AbstractOrderedLayout layout) {

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2235.java View File

@@ -12,7 +12,7 @@ public class Ticket2235 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
// setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getLayout());
createUI((AbstractOrderedLayout) w.getContent());
}

private void createUI(AbstractOrderedLayout layout) {

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2240.java View File

@@ -15,7 +15,7 @@ public class Ticket2240 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getLayout());
createUI((AbstractOrderedLayout) w.getContent());
}

private void createUI(AbstractOrderedLayout layout) {

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2242.java View File

@@ -25,7 +25,7 @@ public class Ticket2242 extends Application implements ValueChangeListener {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
// setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getLayout());
createUI((AbstractOrderedLayout) w.getContent());
}

private void createUI(AbstractOrderedLayout layout) {

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2245.java View File

@@ -9,7 +9,7 @@ public class Ticket2245 extends Application {
@Override
public void init() {
Window main = new Window("The Main Window");
main.getLayout().setSizeFull();
main.getContent().setSizeFull();
setMainWindow(main);
SplitPanel sp = new SplitPanel(SplitPanel.ORIENTATION_VERTICAL);
main.addComponent(sp);

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2271.java View File

@@ -14,7 +14,7 @@ public class Ticket2271 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
// setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getLayout());
createUI((AbstractOrderedLayout) w.getContent());
}

private void createUI(AbstractOrderedLayout layout) {

+ 3
- 1
tests/src/com/vaadin/tests/tickets/Ticket2279.java View File

@@ -15,6 +15,8 @@ import com.vaadin.ui.Layout.AlignmentHandler;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;

// This tests the deprecated setComponentAlignment(Component,String) API
@SuppressWarnings("deprecation")
public class Ticket2279 extends Application {

private Label label;
@@ -62,7 +64,7 @@ public class Ticket2279 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
setTheme("tests-tickets");
AbstractOrderedLayout layout = (AbstractOrderedLayout) w.getLayout();
AbstractOrderedLayout layout = (AbstractOrderedLayout) w.getContent();

createUI(layout);
}

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2282.java View File

@@ -17,7 +17,7 @@ public class Ticket2282 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
setTheme("tests-tickets");
w.getLayout().setSizeUndefined();
w.getContent().setSizeUndefined();

layout1 = new FormLayout();
layout1.setSizeUndefined();

+ 2
- 2
tests/src/com/vaadin/tests/tickets/Ticket2283.java View File

@@ -1,9 +1,9 @@
package com.vaadin.tests.tickets;

import com.vaadin.Application;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout.AlignmentHandler;
import com.vaadin.ui.Window;

public class Ticket2283 extends Application {
@@ -20,7 +20,7 @@ public class Ticket2283 extends Application {
gl.addComponent(new Label("Label 2 abc abc abc "));
Label l = new Label("Colspan2, align right");
gl.addComponent(l, 0, 1, 1, 1);
gl.setComponentAlignment(l, AlignmentHandler.ALIGNMENT_RIGHT, AlignmentHandler.ALIGNMENT_TOP);
gl.setComponentAlignment(l, Alignment.TOP_RIGHT);
w.setContent(gl);

}

+ 5
- 5
tests/src/com/vaadin/tests/tickets/Ticket2294.java View File

@@ -2,8 +2,8 @@ package com.vaadin.tests.tickets;

import com.vaadin.Application;
import com.vaadin.ui.AbstractOrderedLayout;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout.AlignmentHandler;
import com.vaadin.ui.Window;

public class Ticket2294 extends Application {
@@ -13,7 +13,7 @@ public class Ticket2294 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
// setTheme("tests-tickets");
createUI((AbstractOrderedLayout) w.getLayout());
createUI((AbstractOrderedLayout) w.getContent());
}

private void createUI(AbstractOrderedLayout layout) {
@@ -26,14 +26,14 @@ public class Ticket2294 extends Application {

layout.addComponent(label1);
try {
layout.setComponentAlignment(label1, AlignmentHandler.ALIGNMENT_LEFT, AlignmentHandler.ALIGNMENT_BOTTOM);
layout.setComponentAlignment(label1, Alignment.BOTTOM_LEFT);
result1 = "OK";
} catch (Exception e) {
result1 = "FAILED: " + e.getMessage();
}

try {
layout.setComponentAlignment(label2, AlignmentHandler.ALIGNMENT_LEFT, AlignmentHandler.ALIGNMENT_BOTTOM);
layout.setComponentAlignment(label2, Alignment.BOTTOM_LEFT);
result2 = "FAILED, no exception";
} catch (IllegalArgumentException e) {
result2 = "OK";
@@ -42,7 +42,7 @@ public class Ticket2294 extends Application {
}

try {
layout.setComponentAlignment(label3, AlignmentHandler.ALIGNMENT_LEFT, AlignmentHandler.ALIGNMENT_BOTTOM);
layout.setComponentAlignment(label3, Alignment.BOTTOM_LEFT);
result3 = "FAILED, no exception";
} catch (IllegalArgumentException e) {
result3 = "OK";

+ 2
- 1
tests/src/com/vaadin/tests/tickets/Ticket2304.java View File

@@ -4,6 +4,7 @@ import com.vaadin.Application;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Window;
import com.vaadin.ui.themes.Reindeer;

public class Ticket2304 extends Application {

@@ -13,7 +14,7 @@ public class Ticket2304 extends Application {
setMainWindow(main);

Panel p = new Panel();
p.setStyleName(Panel.STYLE_LIGHT);
p.setStyleName(Reindeer.PANEL_LIGHT);
main.addComponent(p);
p.setHeight("100px");


+ 2
- 1
tests/src/com/vaadin/tests/tickets/Ticket2310.java View File

@@ -6,6 +6,7 @@ import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Window;
import com.vaadin.ui.themes.Reindeer;

public class Ticket2310 extends Application {

@@ -17,7 +18,7 @@ public class Ticket2310 extends Application {
main.addComponent(new Label("Instructions: change label when panel is " + "invisible -> invalid change (with disabled " + "flag) is sent to client. Label is grey when panel is shown."));

final Panel p = new Panel();
p.setStyleName(Panel.STYLE_LIGHT);
p.setStyleName(Reindeer.PANEL_LIGHT);
main.addComponent(p);
p.setHeight("100px");


+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2323.java View File

@@ -13,7 +13,7 @@ public class Ticket2323 extends Application {

Window subWindow = new Window("");
subWindow.setSizeUndefined();
subWindow.getLayout().setSizeUndefined();
subWindow.getContent().setSizeUndefined();
subWindow.center();
subWindow.addComponent(new RichTextArea());
w.addWindow(subWindow);

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2329.java View File

@@ -16,7 +16,7 @@ public class Ticket2329 extends Application {
public void init() {
Window mainw = new Window();
setMainWindow(mainw);
mainLo = (VerticalLayout) mainw.getLayout();
mainLo = (VerticalLayout) mainw.getContent();
table = new Table();
for (int i = 0; i < 10000; i++) {
table.addItem(i);

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2341.java View File

@@ -11,7 +11,7 @@ public class Ticket2341 extends com.vaadin.Application {
public void init() {
Window main = new Window();
setMainWindow(main);
constructTables(main.getLayout());
constructTables((Layout) main.getContent());
}

private void constructTables(Layout layout) {

+ 2
- 1
tests/src/com/vaadin/tests/tickets/Ticket2344.java View File

@@ -8,6 +8,7 @@ import com.vaadin.ui.Panel;
import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.themes.BaseTheme;

public class Ticket2344 extends Application {

@@ -41,7 +42,7 @@ public class Ticket2344 extends Application {
VerticalLayout vl = new VerticalLayout();
// vl.setWidth(null);
Button b = new Button("String 1 2 3");
b.setStyleName(Button.STYLE_LINK);
b.setStyleName(BaseTheme.BUTTON_LINK);
vl.addComponent(b);
t.addItem(new Object[] { vl, "String 2", "String 3", "String 4",


+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2347.java View File

@@ -17,7 +17,7 @@ public class Ticket2347 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
setTheme("tests-tickets");
createUI((VerticalLayout) w.getLayout());
createUI((VerticalLayout) w.getContent());
}

private void createUI(VerticalLayout layout) {

+ 2
- 2
tests/src/com/vaadin/tests/tickets/Ticket2365.java View File

@@ -43,10 +43,10 @@ public class Ticket2365 extends Application {
if (panel == null) {
panel = new Panel("Panel level " + i);
panel.setSizeFull();
panel.getLayout().setSizeFull();
panel.getContent().setSizeFull();
}
Panel p = new Panel("Panel level " + i--);
p.getLayout().setSizeFull();
p.getContent().setSizeFull();
p.setSizeFull();
panel.addComponent(p);
if (i > 0) {

+ 7
- 5
tests/src/com/vaadin/tests/tickets/Ticket2405.java View File

@@ -2,10 +2,12 @@ package com.vaadin.tests.tickets;

import com.vaadin.Application;
import com.vaadin.terminal.ExternalResource;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Layout;
import com.vaadin.ui.SplitPanel;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
@@ -29,8 +31,8 @@ public class Ticket2405 extends Application {
// browser.addWindow(root);
setMainWindow(root);

root.getLayout().setSizeFull();
root.getLayout().setMargin(false);
root.getContent().setSizeFull();
((Layout) root.getContent()).setMargin(false);

// Top area, containing playback and volume controls, play status, view
// modes and search
@@ -51,14 +53,14 @@ public class Ticket2405 extends Application {
Embedded image = new Embedded("An image", new ExternalResource("http://dev.itmill.com/chrome/site/toolkit-logo.png"));
image.setWidth("100%");
root.addComponent(split);
((VerticalLayout) root.getLayout()).setExpandRatio(split, 1.0f);
((VerticalLayout) root.getContent()).setExpandRatio(split, 1.0f);
VerticalLayout vl = new VerticalLayout();
split.addComponent(vl);

vl.addComponent(new TextField("abc"));
vl.addComponent(image);
vl.setExpandRatio(image, 1.0f);
vl.setComponentAlignment(image, "bottom center");
vl.setComponentAlignment(image, Alignment.BOTTOM_CENTER);
vl.setHeight("100%");
// We'll need one splitpanel to separate the sidebar and track listing
Button bottomButton = new Button("Filler");
@@ -67,7 +69,7 @@ public class Ticket2405 extends Application {

// The splitpanel is by default 100% x 100%, but we'll need to adjust
// our main window layout to accomodate the height
root.getLayout().setHeight("100%");
root.getContent().setHeight("100%");
// ((VerticalLayout) root.getLayout()).setExpandRatio(bottomButton,
// 1.0F);


+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket2406.java View File

@@ -16,7 +16,7 @@ public class Ticket2406 extends Application {
Window w = new Window(getClass().getSimpleName());
setMainWindow(w);
// setTheme("tests-tickets");
createUI((VerticalLayout) w.getLayout());
createUI((VerticalLayout) w.getContent());
}

private void createUI(VerticalLayout layout) {

+ 2
- 2
tests/src/com/vaadin/tests/tickets/Ticket2432.java View File

@@ -17,8 +17,8 @@ public class Ticket2432 extends Application {

Window w = new Window();
setMainWindow(w);
w.getLayout().setSizeFull();
((SpacingHandler) w.getLayout()).setSpacing(true);
w.getContent().setSizeFull();
((SpacingHandler) w.getContent()).setSpacing(true);

Layout layout = new GridLayout(3, 3);
populateLayout(layout);

+ 5
- 4
tests/src/com/vaadin/tests/tickets/Ticket2998.java View File

@@ -25,6 +25,7 @@ import com.vaadin.ui.Table;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.themes.Reindeer;
/**
* Table layout is very slow in Firefox 3.0.10 when the table contains
@@ -113,7 +114,7 @@ public class Ticket2998 extends Application {
Layout main = new VerticalLayout();
setLayout(main);
main.setSizeUndefined();
main.setStyleName(Panel.STYLE_LIGHT);
main.setStyleName(Reindeer.PANEL_LIGHT);
FormLayout form = new FormLayout();
form.setSizeUndefined();
@@ -255,11 +256,11 @@ public class Ticket2998 extends Application {
// set theme and some layout stuff
setMainWindow(w);
w.getLayout().setSizeFull();
w.getLayout().setMargin(false);
w.getContent().setSizeFull();
((Layout) w.getContent()).setMargin(false);
Panel p = new Panel("Workout Log");
p.setStyleName(Panel.STYLE_LIGHT);
p.setStyleName(Reindeer.PANEL_LIGHT);
w.addComponent(p);
mainLayout = new VerticalLayout();
p.setContent(mainLayout);

+ 1
- 1
tests/src/com/vaadin/tests/tickets/Ticket34.java View File

@@ -70,7 +70,7 @@ public class Ticket34 extends Application {
for (String string : strings) {
Panel p = new Panel(string);
p.setSizeFull();
((VerticalLayout) p.getLayout()).setSpacing(true);
((VerticalLayout) p.getContent()).setSpacing(true);
p.addComponent(new Label("This is a simple test case for " + "UriFragmentReader that can be used for" + " adding linking, back/forward button " + "and history support for ajax application. "));
StringBuffer sb = new StringBuffer();
sb.append("Available views : ");

+ 2
- 1
tests/src/com/vaadin/tests/validation/EmptyFieldErrorIndicators.java View File

@@ -19,6 +19,7 @@ import com.vaadin.ui.Panel;
import com.vaadin.ui.Select;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.Reindeer;
public class EmptyFieldErrorIndicators extends TestBase {
@@ -42,7 +43,7 @@ public class EmptyFieldErrorIndicators extends TestBase {
Panel panel = new Panel();
panel.setSizeFull();
panel.setStyleName(Panel.STYLE_LIGHT);
panel.setStyleName(Reindeer.PANEL_LIGHT);
panel.addComponent(hl);
panel.setScrollable(true);
addComponent(panel);

Loading…
Cancel
Save