aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2008-12-23 08:47:44 +0000
committerArtur Signell <artur.signell@itmill.com>2008-12-23 08:47:44 +0000
commit76aedb1690ac753c2efd0a0682de35e892b2e218 (patch)
tree55986e54109cebec41250bac1046866dc4826b3c /src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java
parent3026e47f8e553dd8a122548b36a5c3942786fb77 (diff)
downloadvaadin-framework-76aedb1690ac753c2efd0a0682de35e892b2e218.tar.gz
vaadin-framework-76aedb1690ac753c2efd0a0682de35e892b2e218.zip
Updated feature browser in automatedtests package to current feature browser.
svn changeset:6342/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java')
-rw-r--r--src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java b/src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java
index 15f4e36777..1f7825d661 100644
--- a/src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java
+++ b/src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java
@@ -11,8 +11,8 @@ import com.itmill.toolkit.terminal.PaintTarget;
import com.itmill.toolkit.ui.Button;
import com.itmill.toolkit.ui.CustomComponent;
import com.itmill.toolkit.ui.Label;
-import com.itmill.toolkit.ui.OrderedLayout;
import com.itmill.toolkit.ui.TextField;
+import com.itmill.toolkit.ui.VerticalLayout;
import com.itmill.toolkit.ui.Button.ClickEvent;
/**
@@ -21,15 +21,15 @@ import com.itmill.toolkit.ui.Button.ClickEvent;
*/
public class JavaScriptAPIExample extends CustomComponent {
- public static final String txt = "(more examples will be added here as the APIs are made public)<br/><br/><A href=\"javascript:itmill.forceSync();\">javascript:itmill.forceSync();</A>";
+ public static final String txt = "<p>For advanced client side programmers Toolkit offers a simple method which can be used to force sync client with server. This may be needed for example if another part of a mashup changes things on server.</p> (more examples will be added here as the APIs are made public)<br/><br/><A href=\"javascript:itmill.forceSync();\">javascript:itmill.forceSync();</A>";
- private final OrderedLayout main;
+ private final VerticalLayout main;
private final Label l;
private final TextField editor = new TextField();
public JavaScriptAPIExample() {
// main layout
- main = new OrderedLayout();
+ main = new VerticalLayout();
main.setMargin(true);
setCompositionRoot(main);
editor.setRows(7);
@@ -54,8 +54,8 @@ public class JavaScriptAPIExample extends CustomComponent {
}
});
main.addComponent(b);
- main.setComponentAlignment(b, OrderedLayout.ALIGNMENT_RIGHT,
- OrderedLayout.ALIGNMENT_VERTICAL_CENTER);
+ main.setComponentAlignment(b, VerticalLayout.ALIGNMENT_RIGHT,
+ VerticalLayout.ALIGNMENT_VERTICAL_CENTER);
//
Label l = new Label(
@@ -63,6 +63,7 @@ public class JavaScriptAPIExample extends CustomComponent {
+ "The client will be synchronized on reload, when you click a button, "
+ "or when itmill.forceSync() is called.") {
+ @Override
public void paintContent(PaintTarget target) throws PaintException {
super.paintContent(target);
@@ -82,6 +83,7 @@ public class JavaScriptAPIExample extends CustomComponent {
label = l;
}
+ @Override
public void run() {
try {
Thread.sleep(500);