Created
December 14, 2012 14:36
-
-
Save blezek/4285857 to your computer and use it in GitHub Desktop.
Vaadin regression in 7 beta10 where Panels inside TabSheets do not correctly render (don't render at all).
This file contains hidden or 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
package com.example.tabby9; | |
import com.vaadin.annotations.AutoGenerated; | |
import com.vaadin.ui.CustomComponent; | |
import com.vaadin.ui.Label; | |
import com.vaadin.ui.NativeButton; | |
import com.vaadin.ui.Panel; | |
import com.vaadin.ui.TabSheet; | |
import com.vaadin.ui.VerticalLayout; | |
public class Tabby extends CustomComponent { | |
@AutoGenerated | |
private VerticalLayout mainLayout; | |
@AutoGenerated | |
private TabSheet tabSheet_1; | |
@AutoGenerated | |
private VerticalLayout verticalLayout_5; | |
@AutoGenerated | |
private Panel panel_4; | |
@AutoGenerated | |
private VerticalLayout verticalLayout_6; | |
@AutoGenerated | |
private NativeButton nativeButton_3; | |
@AutoGenerated | |
private Label label_5; | |
@AutoGenerated | |
private Label label_4; | |
@AutoGenerated | |
private Panel panel_3; | |
@AutoGenerated | |
private VerticalLayout verticalLayout_4; | |
@AutoGenerated | |
private Label label_3; | |
@AutoGenerated | |
private Panel panel_2; | |
@AutoGenerated | |
private VerticalLayout verticalLayout_3; | |
@AutoGenerated | |
private NativeButton nativeButton_2; | |
@AutoGenerated | |
private Label label_2; | |
@AutoGenerated | |
private Panel panel_1; | |
@AutoGenerated | |
private VerticalLayout verticalLayout_2; | |
@AutoGenerated | |
private Label label_1; | |
@AutoGenerated | |
private NativeButton nativeButton_1; | |
/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */ | |
/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */ | |
/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */ | |
/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */ | |
/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */ | |
/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */ | |
/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */ | |
private static final long serialVersionUID = 1L; | |
/*- VaadinEditorProperties={"grid":"RegularGrid,20","showGrid":true,"snapToGrid":true,"snapToObject":true,"movingGuides":false,"snappingDistance":10} */ | |
/** | |
* The constructor should first build the main layout, set the composition | |
* root and then do any custom initialization. | |
* | |
* The constructor will not be automatically regenerated by the visual editor. | |
*/ | |
public Tabby() { | |
buildMainLayout(); | |
setCompositionRoot(mainLayout); | |
// TODO add user code here | |
} | |
@AutoGenerated | |
private VerticalLayout buildMainLayout() { | |
// common part: create layout | |
mainLayout = new VerticalLayout(); | |
mainLayout.setImmediate(false); | |
mainLayout.setWidth("100%"); | |
mainLayout.setHeight("100%"); | |
mainLayout.setMargin(false); | |
// top-level component properties | |
setWidth("100.0%"); | |
setHeight("100.0%"); | |
// tabSheet_1 | |
tabSheet_1 = buildTabSheet_1(); | |
mainLayout.addComponent(tabSheet_1); | |
return mainLayout; | |
} | |
@AutoGenerated | |
private TabSheet buildTabSheet_1() { | |
// common part: create layout | |
tabSheet_1 = new TabSheet(); | |
tabSheet_1.setImmediate(true); | |
tabSheet_1.setWidth("100.0%"); | |
tabSheet_1.setHeight("100.0%"); | |
// panel_1 | |
panel_1 = buildPanel_1(); | |
tabSheet_1.addTab(panel_1, "Tab 1", null); | |
// panel_2 | |
panel_2 = buildPanel_2(); | |
tabSheet_1.addTab(panel_2, "Tab 2", null); | |
// panel_3 | |
panel_3 = buildPanel_3(); | |
tabSheet_1.addTab(panel_3, "Tab 3", null); | |
// verticalLayout_5 | |
verticalLayout_5 = buildVerticalLayout_5(); | |
tabSheet_1.addTab(verticalLayout_5, "Vertical Layout", null); | |
return tabSheet_1; | |
} | |
@AutoGenerated | |
private Panel buildPanel_1() { | |
// common part: create layout | |
panel_1 = new Panel(); | |
panel_1.setImmediate(false); | |
panel_1.setWidth("-1px"); | |
panel_1.setHeight("-1px"); | |
// verticalLayout_2 | |
verticalLayout_2 = buildVerticalLayout_2(); | |
panel_1.setContent(verticalLayout_2); | |
return panel_1; | |
} | |
@AutoGenerated | |
private VerticalLayout buildVerticalLayout_2() { | |
// common part: create layout | |
verticalLayout_2 = new VerticalLayout(); | |
verticalLayout_2.setImmediate(false); | |
verticalLayout_2.setWidth("100.0%"); | |
verticalLayout_2.setHeight("100.0%"); | |
verticalLayout_2.setMargin(false); | |
// nativeButton_1 | |
nativeButton_1 = new NativeButton(); | |
nativeButton_1.setCaption("NativeButton"); | |
nativeButton_1.setImmediate(true); | |
nativeButton_1.setWidth("-1px"); | |
nativeButton_1.setHeight("-1px"); | |
verticalLayout_2.addComponent(nativeButton_1); | |
// label_1 | |
label_1 = new Label(); | |
label_1.setCaption("I am Label in tab 1"); | |
label_1.setImmediate(false); | |
label_1.setWidth("-1px"); | |
label_1.setHeight("-1px"); | |
label_1.setValue("Label"); | |
verticalLayout_2.addComponent(label_1); | |
return verticalLayout_2; | |
} | |
@AutoGenerated | |
private Panel buildPanel_2() { | |
// common part: create layout | |
panel_2 = new Panel(); | |
panel_2.setImmediate(false); | |
panel_2.setWidth("100.0%"); | |
panel_2.setHeight("100.0%"); | |
// verticalLayout_3 | |
verticalLayout_3 = buildVerticalLayout_3(); | |
panel_2.setContent(verticalLayout_3); | |
return panel_2; | |
} | |
@AutoGenerated | |
private VerticalLayout buildVerticalLayout_3() { | |
// common part: create layout | |
verticalLayout_3 = new VerticalLayout(); | |
verticalLayout_3.setImmediate(false); | |
verticalLayout_3.setWidth("100.0%"); | |
verticalLayout_3.setHeight("100.0%"); | |
verticalLayout_3.setMargin(false); | |
// label_2 | |
label_2 = new Label(); | |
label_2.setCaption("I am a label in tab 2"); | |
label_2.setImmediate(false); | |
label_2.setWidth("-1px"); | |
label_2.setHeight("-1px"); | |
label_2.setValue("Label"); | |
verticalLayout_3.addComponent(label_2); | |
// nativeButton_2 | |
nativeButton_2 = new NativeButton(); | |
nativeButton_2.setCaption("NativeButton"); | |
nativeButton_2.setImmediate(true); | |
nativeButton_2.setWidth("-1px"); | |
nativeButton_2.setHeight("-1px"); | |
verticalLayout_3.addComponent(nativeButton_2); | |
return verticalLayout_3; | |
} | |
@AutoGenerated | |
private Panel buildPanel_3() { | |
// common part: create layout | |
panel_3 = new Panel(); | |
panel_3.setImmediate(false); | |
panel_3.setWidth("100.0%"); | |
panel_3.setHeight("100.0%"); | |
// verticalLayout_4 | |
verticalLayout_4 = buildVerticalLayout_4(); | |
panel_3.setContent(verticalLayout_4); | |
return panel_3; | |
} | |
@AutoGenerated | |
private VerticalLayout buildVerticalLayout_4() { | |
// common part: create layout | |
verticalLayout_4 = new VerticalLayout(); | |
verticalLayout_4.setImmediate(false); | |
verticalLayout_4.setWidth("100.0%"); | |
verticalLayout_4.setHeight("100.0%"); | |
verticalLayout_4.setMargin(false); | |
// label_3 | |
label_3 = new Label(); | |
label_3.setImmediate(false); | |
label_3.setWidth("-1px"); | |
label_3.setHeight("-1px"); | |
label_3.setValue("Label"); | |
verticalLayout_4.addComponent(label_3); | |
return verticalLayout_4; | |
} | |
@AutoGenerated | |
private VerticalLayout buildVerticalLayout_5() { | |
// common part: create layout | |
verticalLayout_5 = new VerticalLayout(); | |
verticalLayout_5.setImmediate(false); | |
verticalLayout_5.setWidth("100.0%"); | |
verticalLayout_5.setHeight("100.0%"); | |
verticalLayout_5.setMargin(false); | |
// label_4 | |
label_4 = new Label(); | |
label_4.setImmediate(false); | |
label_4.setWidth("-1px"); | |
label_4.setHeight("-1px"); | |
label_4.setValue("Label"); | |
verticalLayout_5.addComponent(label_4); | |
// label_5 | |
label_5 = new Label(); | |
label_5.setImmediate(false); | |
label_5.setWidth("-1px"); | |
label_5.setHeight("-1px"); | |
label_5.setValue("Label"); | |
verticalLayout_5.addComponent(label_5); | |
// panel_4 | |
panel_4 = buildPanel_4(); | |
verticalLayout_5.addComponent(panel_4); | |
return verticalLayout_5; | |
} | |
@AutoGenerated | |
private Panel buildPanel_4() { | |
// common part: create layout | |
panel_4 = new Panel(); | |
panel_4.setImmediate(false); | |
panel_4.setWidth("100px"); | |
panel_4.setHeight("30px"); | |
// verticalLayout_6 | |
verticalLayout_6 = buildVerticalLayout_6(); | |
panel_4.setContent(verticalLayout_6); | |
return panel_4; | |
} | |
@AutoGenerated | |
private VerticalLayout buildVerticalLayout_6() { | |
// common part: create layout | |
verticalLayout_6 = new VerticalLayout(); | |
verticalLayout_6.setImmediate(false); | |
verticalLayout_6.setWidth("100.0%"); | |
verticalLayout_6.setHeight("100.0%"); | |
verticalLayout_6.setMargin(false); | |
// nativeButton_3 | |
nativeButton_3 = new NativeButton(); | |
nativeButton_3.setCaption("I'm in the panel"); | |
nativeButton_3.setImmediate(true); | |
nativeButton_3.setWidth("-1px"); | |
nativeButton_3.setHeight("-1px"); | |
verticalLayout_6.addComponent(nativeButton_3); | |
return verticalLayout_6; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment