--- /dev/null
+.floatedpanel {
+ float:right;
+}
+
+.footer {
+ width: 3in;
+ padding: 3px;
+ margin-left:auto;
+ margin-right:auto;
+ clear:both;
+ height:40px;
+ background-color: grey;
+ white-space:normal;
+}
+
+.brick {
+ text-align:center;
+ width: 100px;
+ height: 100px;
+ margin: 10px;
+ padding:10px;
+ background-color:#1E2123;
+ color:white;
+ float:left;
+ border: 3px solid black;
+}
\ No newline at end of file
setMargin(true);\r
\r
/*\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
+ * Note, that this code example may not be self explanatory without\r
+ * checking out the related CSS file in the sampler theme.\r
*/\r
- Label demostyle = new Label(\r
- "<style>"\r
- + ".floatedpanel {float:right;} "\r
- + ".footer {width: 3in; padding: 3px;margin-left:auto;margin-right:auto;"\r
- + "clear:both; height:40px; background-color: grey; white-space:normal;} "\r
- + ".brick {text-align:center;width: 100px; height: 100px; margin: 10px;padding:10px;"\r
- + "background-color:#1E2123; color:white;float:left; border: 3px solid black;} "\r
- + "</style>", Label.CONTENT_XHTML);\r
-\r
- addComponent(demostyle);\r
\r
final Panel panel = new Panel("Panel");\r
panel.setStyleName("floatedpanel");\r