lo.setMargin(true);\r
lo.setSpacing(true);\r
\r
+ // Hiding controls\r
+ OrderedLayout hidingControls = new OrderedLayout(\r
+ OrderedLayout.ORIENTATION_HORIZONTAL);\r
+ lo.addComponent(hidingControls);\r
+\r
// OrderedLayout\r
final OrderedLayout orderedLayout = new OrderedLayout();\r
LayoutTestingPanel oltp = new LayoutTestingPanel("OrderedLayout",\r
orderedLayout);\r
+ hidingControls.addComponent(new Button("OrderedLayout",\r
+ new MethodProperty(oltp, "visible")));\r
lo.addComponent(oltp);\r
orderedLayout.setSpacing(false);\r
addFields(orderedLayout);\r
\r
// GridLayout\r
GridLayout grid = new GridLayout(1, 1);\r
- lo\r
- .addComponent(new LayoutTestingPanel(\r
- "Gridlayout with 1 column", grid));\r
+ Panel g1tp = new LayoutTestingPanel("Gridlayout with 1 column", grid);\r
+ hidingControls.addComponent(new Button("GridLayout (1col)",\r
+ new MethodProperty(g1tp, "visible")));\r
+ g1tp.setVisible(false);\r
+ lo.addComponent(g1tp);\r
grid.setSpacing(true);\r
addFields(grid);\r
GridLayout grid2 = new GridLayout(2, 1);\r
- lo.addComponent(new LayoutTestingPanel("Gridlayout with 2 columns",\r
- grid2));\r
+ Panel g2tp = new LayoutTestingPanel("Gridlayout with 2 columns", grid2);\r
+ hidingControls.addComponent(new Button("GridLayout (2cols)",\r
+ new MethodProperty(g2tp, "visible")));\r
+ g2tp.setVisible(false);\r
+ lo.addComponent(g2tp);\r
grid2.setSpacing(true);\r
addFields(grid2);\r
\r
ExpandLayout el = new ExpandLayout();\r
Panel elp = new LayoutTestingPanel(\r
"ExpandLayout width first component expanded", el);\r
+ hidingControls.addComponent(new Button("ExpandLayout (vertical)",\r
+ new MethodProperty(elp, "visible")));\r
+ elp.setVisible(false);\r
el.setHeight(700);\r
addFields(el);\r
Component firstComponent = (Component) el.getComponentIterator().next();\r
ExpandLayout elh = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
Panel elhp = new LayoutTestingPanel(\r
"ExpandLayout width first component expanded; horizontal", elh);\r
+ hidingControls.addComponent(new Button("ExpandLayout (horizontal)",\r
+ new MethodProperty(elhp, "visible")));\r
+ elhp.setVisible(false);\r
elhp.setScrollable(true);\r
elh.setWidth(2000);\r
elh.setHeight(100);\r
// CustomLayout\r
OrderedLayout cl = new OrderedLayout();\r
Panel clp = new LayoutTestingPanel("CustomLayout", cl);\r
+ hidingControls.addComponent(new Button("CustomLayout",\r
+ new MethodProperty(clp, "visible")));\r
+ clp.setVisible(false);\r
lo.addComponent(clp);\r
cl.addComponent(new Label("<<< Add customlayout testcase here >>>"));\r
\r
// Form\r
Panel formPanel = new Panel("Form");\r
+ hidingControls.addComponent(new Button("Form", new MethodProperty(\r
+ formPanel, "visible")));\r
+ formPanel.setVisible(false);\r
formPanel.addComponent(getFormPanelExample());\r
lo.addComponent(formPanel);\r
\r
+ for (Iterator i = hidingControls.getComponentIterator(); i.hasNext();) {\r
+ ((AbstractComponent) i.next()).setImmediate(true);\r
+ }\r
+\r
}\r
\r
private Form getFormPanelExample() {\r