setMargin(true);\r
\r
/*\r
- * Note that adding inline style like this is a very bad programming\r
- * habit in common. The correct place for css is in theme. We do it here\r
- * to keep css in java code for demonstration purposes.\r
+ * Note that adding inline style like this is a very, VERY bad\r
+ * programming habit. The correct place for CSS is in the theme. We do\r
+ * it here to keep the CSS in the java code for demonstration purposes.\r
*/\r
Label demostyle = new Label(\r
"<style>"\r
panel.setStyleName("floatedpanel");\r
panel.setWidth("30%");\r
panel.setHeight("370px");\r
- panel.addComponent(new Label("This panel is 30% width "\r
- + "and 370px height(defined on server side) "\r
+ panel.addComponent(new Label("This panel is 30% wide"\r
+ + "and 370px high (defined on the server side) "\r
+ "and floated right (with custom css). "\r
- + "Try resizesing browser window to see "\r
- + "how black boxes (floated to left) "\r
- + "behave. Every third of them has red "\r
- + "color to demonstrate dynamic css injection. "));\r
+ + "Try resizing the browser window to see "\r
+ + "how the black boxes (floated left) "\r
+ + "behave. Every third of them has colored text "\r
+ + "to demonstrate the dynamic css injection."));\r
\r
final Label bottomCenter = new Label(\r
- "I'm 3 inches wide footer at the bottom "\r
+ "I'm a 3 inches wide footer at the bottom "\r
+ "of the layout (and centered unless I'm in IE6)");\r
bottomCenter.setSizeUndefined(); // disable 100% default width\r
bottomCenter.setStyleName("footer");\r
if (c instanceof Brick) {\r
brickCounter++;\r
if (brickCounter % 3 == 0) {\r
- // make every third brick red and bold\r
+ // make every third brick colored and bold\r
return "color: #ff6611; font-weight:bold;";\r
}\r
}\r