summaryrefslogtreecommitdiffstats
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
parent9cfca00027b228290d252b91e1274438f01ea140 (diff)
downloadvaadin-framework-bef8786d88f8fea4cdd43985c67b48a8cd200416.tar.gz
vaadin-framework-bef8786d88f8fea4cdd43985c67b48a8cd200416.zip
Better book example for RichTextArea.
svn changeset:5786/svn branch:trunk
-rw-r--r--WebContent/ITMILL/themes/tests-book/img/richtextarea-toolbar-fi.pngbin0 -> 2183 bytes
-rw-r--r--WebContent/ITMILL/themes/tests-book/styles.css9
-rw-r--r--src/com/itmill/toolkit/tests/book/BookTestApplication.java24
3 files changed, 25 insertions, 8 deletions
diff --git a/WebContent/ITMILL/themes/tests-book/img/richtextarea-toolbar-fi.png b/WebContent/ITMILL/themes/tests-book/img/richtextarea-toolbar-fi.png
new file mode 100644
index 0000000000..4bb791c856
--- /dev/null
+++ b/WebContent/ITMILL/themes/tests-book/img/richtextarea-toolbar-fi.png
Binary files differ
diff --git a/WebContent/ITMILL/themes/tests-book/styles.css b/WebContent/ITMILL/themes/tests-book/styles.css
index 9ec120b767..43e609da71 100644
--- a/WebContent/ITMILL/themes/tests-book/styles.css
+++ b/WebContent/ITMILL/themes/tests-book/styles.css
@@ -146,7 +146,7 @@ table.i-gridlayout-spacingexample {
}
.i-gridlayout-spacingexample td {
- background: white;
+ background: white;
}
/*****************************************************************************/
@@ -165,3 +165,10 @@ table.i-gridlayout-spacingexample {
.i-orderedlayout-marginexample1 { background: #d0d0ff; border: 1px;}
.i-orderedlayout-marginexample2 { background: #ffd0d0; border: 1px;}
.i-orderedlayout-marginexample table { background: white; }
+
+/*****************************************************************************/
+/* For example_RichTextArea() */
+/*****************************************************************************/
+.i-richtextarea-richtextexample .gwt-ToggleButton .gwt-Image {
+ background-image: url(img/richtextarea-toolbar-fi.png) !important;
+}
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) {