From 76aedb1690ac753c2efd0a0682de35e892b2e218 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 23 Dec 2008 08:47:44 +0000 Subject: Updated feature browser in automatedtests package to current feature browser. svn changeset:6342/svn branch:trunk --- .../featurebrowser/JavaScriptAPIExample.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/com/itmill/toolkit/automatedtests/featurebrowser/JavaScriptAPIExample.java') 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)

javascript:itmill.forceSync();"; + public static final String txt = "

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.

(more examples will be added here as the APIs are made public)

javascript:itmill.forceSync();"; - 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); -- cgit v1.2.3