-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweaked layouttester tests to be more informative. (#11800)
- Loading branch information
Showing
132 changed files
with
495 additions
and
33 deletions.
There are no files selected for viewing
Binary file modified
BIN
-156 Bytes
(99%)
...e-screenshots/chrome/GridAddReplaceMoveTest-LayoutAlignment_ANY_Chrome__add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-218 Bytes
(99%)
...reenshots/chrome/GridAddReplaceMoveTest-LayoutAlignment_ANY_Chrome__initial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-285 Bytes
(98%)
...-screenshots/chrome/GridAddReplaceMoveTest-LayoutAlignment_ANY_Chrome__move.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-357 Bytes
(98%)
...creenshots/chrome/GridAddReplaceMoveTest-LayoutAlignment_ANY_Chrome__remove.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-332 Bytes
(98%)
...reenshots/chrome/GridAddReplaceMoveTest-LayoutAlignment_ANY_Chrome__replace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.53 KB
(150%)
...-screenshots/chrome/GridAlignmentTest-layoutAlignment_ANY_Chrome__alignment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-573 Bytes
(99%)
...erence-screenshots/chrome/GridCaptionTest-LayoutCaption_ANY_Chrome__caption.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.66 KB
(120%)
...eenshots/chrome/GridComponentSizingTest-ComponentSizing_ANY_Chrome__initial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.38 KB
(110%)
...hrome/GridComponentSizingTest-ComponentSizing_ANY_Chrome__setSize100Percent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.3 KB
(130%)
...ots/chrome/GridComponentSizingTest-ComponentSizing_ANY_Chrome__setSize350px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.43 KB
(110%)
...chrome/GridComponentSizingTest-ComponentSizing_ANY_Chrome__setSize75Percent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.08 KB
(110%)
...ots/chrome/GridComponentSizingTest-ComponentSizing_ANY_Chrome__setSize_-1px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-603 Bytes
(99%)
uitest/reference-screenshots/chrome/GridIconTest-LayoutIcon_ANY_Chrome__icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.25 KB
(110%)
...reenshots/chrome/GridLayoutExpandTest-LayoutExpand_ANY_Chrome__expand_100_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.17 KB
(110%)
...reenshots/chrome/GridLayoutExpandTest-LayoutExpand_ANY_Chrome__expand_25_75.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.47 KB
(110%)
...reenshots/chrome/GridLayoutExpandTest-LayoutExpand_ANY_Chrome__expand_50_50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.15 KB
(110%)
...ce-screenshots/chrome/GridLayoutExpandTest-LayoutExpand_ANY_Chrome__initial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.15 KB
(110%)
.../chrome/GridLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__initial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.8 KB
...ridLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__marginOffSpaceOn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.43 KB
(120%)
...ridLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__marginOnSpaceOff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.1 KB
...GridLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__marginOnSpaceOn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-21.6 KB
...ridLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__marginOnfSpaceOn.png
Binary file not shown.
Binary file added
BIN
+82.5 KB
.../chrome/GridLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError-Scrolled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.31 KB
(100%)
...reenshots/chrome/GridLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.57 KB
(110%)
...ce-screenshots/chrome/GridLayoutSizingTest-LayoutSizing_ANY_Chrome__initial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.51 KB
(110%)
...hots/chrome/GridLayoutSizingTest-LayoutSizing_ANY_Chrome__setSize100Percent.png
Oops, something went wrong.
Binary file removed
BIN
-24 KB
...reenshots/chrome/GridLayoutSizingTest-LayoutSizing_ANY_Chrome__setSize350px.png
Diff not rendered.
Binary file added
BIN
+26.4 KB
...reenshots/chrome/GridLayoutSizingTest-LayoutSizing_ANY_Chrome__setSize600px.png
Oops, something went wrong.
Binary file modified
BIN
+388 Bytes
(100%)
...shots/chrome/GridLayoutSizingTest-LayoutSizing_ANY_Chrome__setSize75Percent.png
Oops, something went wrong.
Binary file modified
BIN
+5.79 KB
(130%)
...reenshots/chrome/GridLayoutSizingTest-LayoutSizing_ANY_Chrome__setSize_-1px.png
Oops, something went wrong.
Binary file modified
BIN
+148 Bytes
(100%)
...ence-screenshots/chrome/HAddReplaceMoveTest-LayoutAlignment_ANY_Chrome__add.png
Oops, something went wrong.
Binary file modified
BIN
-83 Bytes
(99%)
...-screenshots/chrome/HAddReplaceMoveTest-LayoutAlignment_ANY_Chrome__initial.png
Oops, something went wrong.
Binary file modified
BIN
-927 Bytes
(93%)
...nce-screenshots/chrome/HAddReplaceMoveTest-LayoutAlignment_ANY_Chrome__move.png
Oops, something went wrong.
Binary file modified
BIN
-213 Bytes
(98%)
...e-screenshots/chrome/HAddReplaceMoveTest-LayoutAlignment_ANY_Chrome__remove.png
Oops, something went wrong.
Binary file modified
BIN
+116 Bytes
(100%)
...-screenshots/chrome/HAddReplaceMoveTest-LayoutAlignment_ANY_Chrome__replace.png
Oops, something went wrong.
Binary file modified
BIN
+4.75 KB
(150%)
...nce-screenshots/chrome/HAlignmentTest-layoutAlignment_ANY_Chrome__alignment.png
Oops, something went wrong.
Binary file modified
BIN
-1.56 KB
(94%)
...reference-screenshots/chrome/HCaptionTest-LayoutCaption_ANY_Chrome__caption.png
Oops, something went wrong.
Binary file modified
BIN
+3.7 KB
(120%)
...screenshots/chrome/HComponentSizingTest-ComponentSizing_ANY_Chrome__initial.png
Oops, something went wrong.
Binary file modified
BIN
+5.02 KB
(120%)
...s/chrome/HComponentSizingTest-ComponentSizing_ANY_Chrome__setSize100Percent.png
Oops, something went wrong.
Binary file modified
BIN
+4.67 KB
(130%)
...nshots/chrome/HComponentSizingTest-ComponentSizing_ANY_Chrome__setSize350px.png
Oops, something went wrong.
Binary file modified
BIN
+5.15 KB
(130%)
...ts/chrome/HComponentSizingTest-ComponentSizing_ANY_Chrome__setSize75Percent.png
Oops, something went wrong.
Binary file modified
BIN
+4.35 KB
(120%)
...nshots/chrome/HComponentSizingTest-ComponentSizing_ANY_Chrome__setSize_-1px.png
Oops, something went wrong.
Binary file added
BIN
+31.8 KB
...reference-screenshots/chrome/HIconTest-LayoutIcon_ANY_Chrome__icon-scrolled.png
Oops, something went wrong.
Binary file modified
BIN
-14.5 KB
(61%)
uitest/reference-screenshots/chrome/HIconTest-LayoutIcon_ANY_Chrome__icon.png
Oops, something went wrong.
Binary file modified
BIN
+1.21 KB
(110%)
...-screenshots/chrome/HLayoutExpandTest-LayoutExpand_ANY_Chrome__expand_100_0.png
Oops, something went wrong.
Binary file modified
BIN
+1.3 KB
(110%)
...-screenshots/chrome/HLayoutExpandTest-LayoutExpand_ANY_Chrome__expand_25_75.png
Oops, something went wrong.
Binary file modified
BIN
+1.17 KB
(110%)
...-screenshots/chrome/HLayoutExpandTest-LayoutExpand_ANY_Chrome__expand_50_50.png
Oops, something went wrong.
Binary file modified
BIN
+1.13 KB
(110%)
...rence-screenshots/chrome/HLayoutExpandTest-LayoutExpand_ANY_Chrome__initial.png
Oops, something went wrong.
Binary file modified
BIN
-741 Bytes
(96%)
...ots/chrome/HLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__initial.png
Oops, something went wrong.
Binary file added
BIN
+18.5 KB
...e/HLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__marginOffSpaceOn.png
Oops, something went wrong.
Binary file modified
BIN
-473 Bytes
(98%)
...e/HLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__marginOnSpaceOff.png
Oops, something went wrong.
Binary file added
BIN
+18.6 KB
...me/HLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__marginOnSpaceOn.png
Oops, something went wrong.
Binary file removed
BIN
-18.9 KB
...e/HLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__marginOnfSpaceOn.png
Diff not rendered.
Binary file added
BIN
+28.9 KB
...chrome/HLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError-Scrolled-End.png
Oops, something went wrong.
Binary file added
BIN
+34.8 KB
...ome/HLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError-Scrolled-Middle.png
Oops, something went wrong.
Binary file modified
BIN
-13.7 KB
(68%)
...-screenshots/chrome/HLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError.png
Oops, something went wrong.
Binary file modified
BIN
+3.7 KB
(120%)
...rence-screenshots/chrome/HLayoutSizingTest-LayoutSizing_ANY_Chrome__initial.png
Oops, something went wrong.
Binary file modified
BIN
+8.52 KB
(140%)
...enshots/chrome/HLayoutSizingTest-LayoutSizing_ANY_Chrome__setSize100Percent.png
Oops, something went wrong.
Binary file modified
BIN
+2.66 KB
(120%)
...-screenshots/chrome/HLayoutSizingTest-LayoutSizing_ANY_Chrome__setSize350px.png
Oops, something went wrong.
Binary file modified
BIN
+7.05 KB
(140%)
...eenshots/chrome/HLayoutSizingTest-LayoutSizing_ANY_Chrome__setSize75Percent.png
Oops, something went wrong.
Binary file modified
BIN
-6.7 KB
(68%)
...-screenshots/chrome/HLayoutSizingTest-LayoutSizing_ANY_Chrome__setSize_-1px.png
Oops, something went wrong.
Binary file added
BIN
+17.8 KB
...nshots/chrome/VAlignmentTest-layoutAlignment_ANY_Chrome__alignment-scrolled.png
Oops, something went wrong.
Binary file modified
BIN
+5.02 KB
(140%)
...nce-screenshots/chrome/VAlignmentTest-layoutAlignment_ANY_Chrome__alignment.png
Oops, something went wrong.
Binary file modified
BIN
+4.96 KB
(120%)
...screenshots/chrome/VComponentSizingTest-ComponentSizing_ANY_Chrome__initial.png
Oops, something went wrong.
Binary file added
BIN
+29.3 KB
...creenshots/chrome/VComponentSizingTest-ComponentSizing_ANY_Chrome__scrolled.png
Oops, something went wrong.
Binary file modified
BIN
+3.93 KB
(120%)
...s/chrome/VComponentSizingTest-ComponentSizing_ANY_Chrome__setSize100Percent.png
Oops, something went wrong.
Binary file modified
BIN
+4.39 KB
(120%)
...nshots/chrome/VComponentSizingTest-ComponentSizing_ANY_Chrome__setSize350px.png
Oops, something went wrong.
Binary file modified
BIN
+3.95 KB
(120%)
...ts/chrome/VComponentSizingTest-ComponentSizing_ANY_Chrome__setSize75Percent.png
Oops, something went wrong.
Binary file modified
BIN
+4.4 KB
(120%)
...nshots/chrome/VComponentSizingTest-ComponentSizing_ANY_Chrome__setSize_-1px.png
Oops, something went wrong.
Binary file modified
BIN
+2.37 KB
(100%)
uitest/reference-screenshots/chrome/VIconTest-LayoutIcon_ANY_Chrome__icon.png
Oops, something went wrong.
Binary file modified
BIN
+1.41 KB
(110%)
...-screenshots/chrome/VLayoutExpandTest-LayoutExpand_ANY_Chrome__expand_100_0.png
Oops, something went wrong.
Binary file modified
BIN
+2.89 KB
(110%)
...-screenshots/chrome/VLayoutExpandTest-LayoutExpand_ANY_Chrome__expand_25_75.png
Oops, something went wrong.
Binary file modified
BIN
+2.88 KB
(110%)
...-screenshots/chrome/VLayoutExpandTest-LayoutExpand_ANY_Chrome__expand_50_50.png
Oops, something went wrong.
Binary file modified
BIN
+2.89 KB
(110%)
...rence-screenshots/chrome/VLayoutExpandTest-LayoutExpand_ANY_Chrome__initial.png
Oops, something went wrong.
Binary file modified
BIN
+3.92 KB
(120%)
...ots/chrome/VLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__initial.png
Oops, something went wrong.
Binary file added
BIN
+25.1 KB
...e/VLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__marginOffSpaceOn.png
Oops, something went wrong.
Binary file modified
BIN
+4.25 KB
(120%)
...e/VLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__marginOnSpaceOff.png
Oops, something went wrong.
Binary file added
BIN
+25.4 KB
...me/VLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__marginOnSpaceOn.png
Oops, something went wrong.
Binary file removed
BIN
-21.1 KB
...e/VLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Chrome__marginOnfSpaceOn.png
Diff not rendered.
Binary file added
BIN
+41.1 KB
...ots/chrome/VLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError-Scrolled.png
Oops, something went wrong.
Binary file modified
BIN
-27.1 KB
(66%)
...-screenshots/chrome/VLayoutRegErrorTest-LayoutRegError_ANY_Chrome__RegError.png
Oops, something went wrong.
Binary file modified
BIN
+4.06 KB
(120%)
...rence-screenshots/chrome/VLayoutSizingTest-LayoutSizing_ANY_Chrome__initial.png
Oops, something went wrong.
Binary file modified
BIN
+3.68 KB
(110%)
...enshots/chrome/VLayoutSizingTest-LayoutSizing_ANY_Chrome__setSize100Percent.png
Oops, something went wrong.
Binary file modified
BIN
+3.13 KB
(110%)
...-screenshots/chrome/VLayoutSizingTest-LayoutSizing_ANY_Chrome__setSize350px.png
Oops, something went wrong.
Binary file modified
BIN
+3.69 KB
(110%)
...eenshots/chrome/VLayoutSizingTest-LayoutSizing_ANY_Chrome__setSize75Percent.png
Oops, something went wrong.
Binary file modified
BIN
+4.15 KB
(120%)
...-screenshots/chrome/VLayoutSizingTest-LayoutSizing_ANY_Chrome__setSize_-1px.png
Oops, something went wrong.
Binary file removed
BIN
-19.5 KB
...idLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Firefox__marginOnfSpaceOn.png
Diff not rendered.
Binary file removed
BIN
-22.1 KB
...enshots/firefox/GridLayoutSizingTest-LayoutSizing_ANY_Firefox__setSize350px.png
Diff not rendered.
Binary file removed
BIN
-15.1 KB
.../HLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Firefox__marginOnfSpaceOn.png
Diff not rendered.
Binary file removed
BIN
-18.9 KB
.../VLayoutMarginSpacingTest-LayoutMarginSpacing_ANY_Firefox__marginOnfSpaceOn.png
Diff not rendered.
Binary file removed
BIN
-15.7 KB
...pacingTest-LayoutMarginSpacing_Windows_InternetExplorer_11_marginOnfSpaceOn.png
Diff not rendered.
Binary file removed
BIN
-17.8 KB
.../GridLayoutSizingTest-LayoutSizing_Windows_InternetExplorer_11_setSize350px.png
Diff not rendered.
Binary file removed
BIN
-15.2 KB
...pacingTest-LayoutMarginSpacing_Windows_InternetExplorer_11_marginOnfSpaceOn.png
Diff not rendered.
Binary file removed
BIN
-15.3 KB
...pacingTest-LayoutMarginSpacing_Windows_InternetExplorer_11_marginOnfSpaceOn.png
Diff not rendered.
Binary file removed
BIN
-17 KB
...outMarginSpacingTest-LayoutMarginSpacing_LINUX_PhantomJS_1_marginOnfSpaceOn.png
Diff not rendered.
Binary file removed
BIN
-19.6 KB
.../phantomjs/GridLayoutSizingTest-LayoutSizing_LINUX_PhantomJS_1_setSize350px.png
Diff not rendered.
Binary file removed
BIN
-13.6 KB
...outMarginSpacingTest-LayoutMarginSpacing_LINUX_PhantomJS_1_marginOnfSpaceOn.png
Diff not rendered.
Binary file removed
BIN
-16.5 KB
...outMarginSpacingTest-LayoutMarginSpacing_LINUX_PhantomJS_1_marginOnfSpaceOn.png
Diff not rendered.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridLayoutSizing.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,76 @@ | ||
package com.vaadin.tests.layouts.layouttester.GridLayout; | ||
|
||
import com.vaadin.server.VaadinRequest; | ||
import com.vaadin.shared.ui.ContentMode; | ||
import com.vaadin.ui.AbstractComponent; | ||
import com.vaadin.ui.Button; | ||
import com.vaadin.ui.Button.ClickEvent; | ||
import com.vaadin.ui.Button.ClickListener; | ||
import com.vaadin.ui.Label; | ||
|
||
public class GridLayoutSizing extends GridBaseLayoutTestUI { | ||
|
||
@Override | ||
protected void setup(VaadinRequest request) { | ||
getLayoutForLayoutSizing("layout"); | ||
super.setup(request); | ||
layout.setSizeFull(); | ||
} | ||
|
||
@Override | ||
protected void getLayoutForLayoutSizing(final String compType) { | ||
|
||
layout.setSpacing(false); | ||
layout.setMargin(false); | ||
|
||
final AbstractComponent c1 = getTestTable(); | ||
final AbstractComponent c2 = getTestTable(); | ||
|
||
class SetSizeButton extends Button { | ||
SetSizeButton(final String size) { | ||
super(); | ||
setCaption("Set size " + size); | ||
addClickListener(new ClickListener() { | ||
|
||
@Override | ||
public void buttonClick(ClickEvent event) { | ||
if (compType == "layout") { | ||
layout.setHeight(size); | ||
layout.setWidth(size); | ||
} else if (compType == "component") { | ||
c2.setHeight(size); | ||
c2.setWidth(size); | ||
} else { | ||
} | ||
|
||
} | ||
}); | ||
} | ||
|
||
} | ||
Button btn1 = new SetSizeButton("600px"); | ||
Button btn2 = new SetSizeButton("-1px"); | ||
Button btn3 = new SetSizeButton("75%"); | ||
Button btn4 = new SetSizeButton("100%"); | ||
|
||
layout.addComponent(btn1); | ||
layout.addComponent(btn2); | ||
layout.addComponent(btn3); | ||
layout.addComponent(btn4); | ||
layout.addComponent(c1); | ||
layout.addComponent(new Label( | ||
"<div style='height: 1px'></div><hr /><div style='height: 1px'></div>", | ||
ContentMode.HTML)); | ||
layout.addComponent(c2); | ||
btn2.addClickListener(new ClickListener() { | ||
|
||
@Override | ||
public void buttonClick(ClickEvent event) { | ||
Label newLabel = new Label("--- NEW LABEL ---"); | ||
newLabel.setSizeUndefined(); | ||
layout.addComponent(newLabel); | ||
} | ||
}); | ||
btn2.setCaption(btn2.getCaption() + " + add Label"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
uitest/src/main/java/com/vaadin/tests/layouts/layouttester/HLayout/HComponentSizing.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,36 @@ | ||
package com.vaadin.tests.layouts.layouttester.HLayout; | ||
|
||
import java.util.Iterator; | ||
|
||
import com.vaadin.server.VaadinRequest; | ||
import com.vaadin.tests.layouts.layouttester.BaseComponentSizing; | ||
import com.vaadin.ui.AbstractOrderedLayout; | ||
import com.vaadin.ui.Component; | ||
import com.vaadin.ui.HorizontalLayout; | ||
import com.vaadin.ui.Label; | ||
|
||
public class HComponentSizing extends BaseComponentSizing { | ||
|
||
public HComponentSizing() { | ||
super(HorizontalLayout.class); | ||
} | ||
|
||
@Override | ||
protected void setup(VaadinRequest request) { | ||
super.setup(request); | ||
Iterator<Component> iterator = l2.iterator(); | ||
while (iterator.hasNext()) { | ||
Component component = iterator.next(); | ||
if (component instanceof Label) { | ||
component.setWidth("30px"); | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
protected void setLayoutMeasures(AbstractOrderedLayout l1, | ||
AbstractOrderedLayout l2, String w, String h) { | ||
super.setLayoutMeasures(l1, l2, "900px", h); | ||
l1.setSizeUndefined(); | ||
} | ||
} |
Oops, something went wrong.