From 663248051a0628707342b8415c8d4f5f6d1ca8c3 Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Sun, 21 Dec 2008 18:06:03 +0000 Subject: Removed usage of OL in FB svn changeset:6314/svn branch:trunk --- .../toolkit/demo/featurebrowser/JavaScriptAPIExample.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/com/itmill/toolkit/demo/featurebrowser/JavaScriptAPIExample.java') diff --git a/src/com/itmill/toolkit/demo/featurebrowser/JavaScriptAPIExample.java b/src/com/itmill/toolkit/demo/featurebrowser/JavaScriptAPIExample.java index 42615d112a..8ffcf04e9d 100644 --- a/src/com/itmill/toolkit/demo/featurebrowser/JavaScriptAPIExample.java +++ b/src/com/itmill/toolkit/demo/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; /** @@ -23,13 +23,13 @@ public class JavaScriptAPIExample extends CustomComponent { 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