summaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/tests/book/BookTestApplication.java
diff options
context:
space:
mode:
authorMarko Grönroos <magi@iki.fi>2008-10-31 13:03:02 +0000
committerMarko Grönroos <magi@iki.fi>2008-10-31 13:03:02 +0000
commitbef8786d88f8fea4cdd43985c67b48a8cd200416 (patch)
tree12c93f92b2f5cc407a7ef50ea12a15bc9a77b3ec /src/com/itmill/toolkit/tests/book/BookTestApplication.java
parent9cfca00027b228290d252b91e1274438f01ea140 (diff)
downloadvaadin-framework-bef8786d88f8fea4cdd43985c67b48a8cd200416.tar.gz
vaadin-framework-bef8786d88f8fea4cdd43985c67b48a8cd200416.zip
Better book example for RichTextArea.
svn changeset:5786/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/tests/book/BookTestApplication.java')
-rw-r--r--src/com/itmill/toolkit/tests/book/BookTestApplication.java24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/com/itmill/toolkit/tests/book/BookTestApplication.java b/src/com/itmill/toolkit/tests/book/BookTestApplication.java
index db84225e07..d9a2d4b79e 100644
--- a/src/com/itmill/toolkit/tests/book/BookTestApplication.java
+++ b/src/com/itmill/toolkit/tests/book/BookTestApplication.java
@@ -227,7 +227,7 @@ public class BookTestApplication extends com.itmill.toolkit.Application {
} else if (example.equals("print")) {
example_Print(main, param);
} else if (example.equals("richtextfield")) {
- example_RichTextField(main, param);
+ example_RichTextArea(main, param);
} else if (example.equals("querycontainer")) {
example_QueryContainer(main, param);
} else if (example.equals("menubar")) {
@@ -1414,12 +1414,16 @@ public class BookTestApplication extends com.itmill.toolkit.Application {
//main.addComponent(new Label("<p>Print this!</p>\n<script type='text/javascript'>print();</script>", Label.CONTENT_XHTML));
}
- void example_RichTextField(final Window main, String param) {
- // Create the rich text area
+ void example_RichTextArea(final Window main, String param) {
+ main.setLayout(new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL));
+
+ // Create a rich text area
final RichTextArea rtarea = new RichTextArea();
+ rtarea.addStyleName("richtextexample");
+ //rtarea.setCaption("My Rich Text Area");
// Set initial content as HTML
- rtarea.setValue("<h1>Hello</h1>\n<p>This contains some text.</p>");
+ rtarea.setValue("<h1>Hello</h1>\n<p>This rich text area contains some text.</p>");
// Show the text edited in the rich text area as HTML.
final Button show = new Button("Show HTML");
@@ -1430,9 +1434,15 @@ public class BookTestApplication extends com.itmill.toolkit.Application {
}
});
- main.addComponent(rtarea);
- main.addComponent(show);
- main.addComponent(html);
+ Panel rtPanel = new Panel("Rich Text Area");
+ rtPanel.addComponent(rtarea);
+ rtPanel.addComponent(show);
+
+ Panel valuePanel = new Panel("Value");
+ valuePanel.addComponent(html);
+
+ main.addComponent(rtPanel);
+ main.addComponent(valuePanel);
}
void example_QueryContainer(final Window main, String param) {