- Timestamp:
- 07/22/08 08:33:43 (4 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/itmill/toolkit/tests/book/BookTestApplication.java
r5106 r5111 50 50 import com.itmill.toolkit.ui.PopupDateField; 51 51 import com.itmill.toolkit.ui.ProgressIndicator; 52 import com.itmill.toolkit.ui.RichTextArea; 52 53 import com.itmill.toolkit.ui.Select; 53 54 import com.itmill.toolkit.ui.TabSheet; … … 141 142 "progress/window", "progress/thread", "progress", 142 143 "customlayout", "spacing", "margin", "clientinfo", 143 "fillinform/templates", "notification", "print"}; 144 "fillinform/templates", "notification", "print", 145 "richtextfield"}; 144 146 for (int i = 0; i < examples.length; i++) { 145 147 main.addComponent(new Label("<a href='" + context.toString() + … … 220 222 } else if (example.equals("print")) { 221 223 example_Print(main, param); 224 } else if (example.equals("richtextfield")) { 225 example_RichTextField(main, param); 222 226 } else { 223 227 ; // main.addComponent(new Label("Unknown test '"+example+"'.")); … … 1379 1383 //main.addComponent(new Label("<p>Print this!</p>\n<script type='text/javascript'>print();</script>", Label.CONTENT_XHTML)); 1380 1384 } 1385 1386 void example_RichTextField(final Window main, String param) { 1387 // Create the rich text area 1388 final RichTextArea rtarea = new RichTextArea(); 1389 1390 // Set initial content as HTML 1391 rtarea.setValue("<h1>Hello</h1>\n<p>This contains some text.</p>"); 1392 1393 // Show the text edited in the rich text area as HTML. 1394 final Button show = new Button("Show HTML"); 1395 final Label html = new Label((String) rtarea.getValue()); 1396 show.addListener(new Button.ClickListener() { 1397 public void buttonClick(ClickEvent event) { 1398 html.setValue(rtarea.getValue()); 1399 } 1400 }); 1401 1402 main.addComponent(rtarea); 1403 main.addComponent(show); 1404 main.addComponent(html); 1405 } 1381 1406 }
