]> source.dussan.org Git - vaadin-framework.git/commitdiff
Tried to add flash (itmill_spin.swf) for FeatureEmbedded.
authorJani Laakso <jani.laakso@itmill.com>
Sun, 11 Feb 2007 10:55:21 +0000 (10:55 +0000)
committerJani Laakso <jani.laakso@itmill.com>
Sun, 11 Feb 2007 10:55:21 +0000 (10:55 +0000)
svn changeset:649/svn branch:toolkit

src/com/itmill/toolkit/demo/features/FeatureEmbedded.java
src/com/itmill/toolkit/demo/features/itmill_spin.swf [new file with mode: 0644]

index bb54d345ea6f31187f41d47600b8167ff2454099..93c817285f5c2d16f2a4424f4801248eaf92405d 100644 (file)
@@ -29,6 +29,7 @@
 package com.itmill.toolkit.demo.features;
 
 import com.itmill.toolkit.terminal.ClassResource;
+import com.itmill.toolkit.terminal.ExternalResource;
 import com.itmill.toolkit.terminal.Sizeable;
 import com.itmill.toolkit.ui.*;
 
@@ -42,21 +43,24 @@ public class FeatureEmbedded extends Feature {
 
                OrderedLayout l = new OrderedLayout();
 
-               // Example panel
-               Panel show = new Panel("Embedded component");
-               Embedded emb = new Embedded("Embedded Caption");
-               emb.setClassId("clsid:F08DF954-8592-11D1-B16A-00C0F0283628");
-               emb.setWidth(100);
-               emb.setHeight(50);
-               emb.setParameter("BorderStyle", "1");
-               emb.setParameter("MousePointer", "1");
+               ClassResource flashResource = new ClassResource(
+                               "itmill_spin.swf", this.getApplication());
+               Embedded emb = new Embedded("Embedded Caption", flashResource);
+               emb.setCodebase("http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0");
+               emb.setClassId("clsid:D27CDB6E-AE6D-11cf-96B8-444553540000");
+//             emb.setClassId("clsid:F08DF954-8592-11D1-B16A-00C0F0283628");
+//             emb.setWidth(100);
+//             emb.setHeight(50);
+//             emb.setParameter("BorderStyle", "1");
+//             emb.setParameter("MousePointer", "1");
                emb.setParameter("Enabled", "1");
-               emb.setParameter("Min", "1");
-               emb.setParameter("Max", "10");
-               show.addComponent(emb);
-               l.addComponent(show);
+//             emb.setParameter("Min", "1");
+//             emb.setParameter("Max", "10");
+               l.addComponent(emb);
 
                // Properties
+               propertyPanel = null;
+               if (false) {
                propertyPanel = new PropertyPanel(emb);
                Form ap = propertyPanel.createBeanPropertySet(new String[] { "type",
                                "source", "width", "height", "widthUnits", "heightUnits",
@@ -88,9 +92,9 @@ public class FeatureEmbedded extends Feature {
                                .getField("classId")
                                .setDescription(
                                                "Unique object id. This can be used for example to identify windows components.");
-
+               }
                setJavadocURL("ui/Embedded.html");
-               
+
                return l;
        }
 
diff --git a/src/com/itmill/toolkit/demo/features/itmill_spin.swf b/src/com/itmill/toolkit/demo/features/itmill_spin.swf
new file mode 100644 (file)
index 0000000..9e58ce2
Binary files /dev/null and b/src/com/itmill/toolkit/demo/features/itmill_spin.swf differ