GWT2SWF

GWT2SWF intend to provide software bridge between GWT and FLASH/FLEX.
Download

GWT2SWF Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Rafal Malinowski
  • Publisher web site:

GWT2SWF Tags


GWT2SWF Description

GWT2SWF intend to provide software bridge between GWT and FLASH/FLEX. GWT2SWF intend to provide software bridge between GWT and FLASH/FLEX. GWT2SWF project means that using GWT2SWF you will be able to communicate between GWT and FLASH/FLEX. GWT2SWF provides SWFWidget and FlashPlayer version detection.Quick startFirst of all you should download: GWT2SWF Library GWT2SWF Hello World - sources for following example Step 1. Let's create new project in eclipse, name it 'gwt2swf-helloworld'. Using gwt tool create project ./projectCreator -eclipse gwt2swf-helloworld -ant gwt2swf-helloworld -out ~/workspace/java-eclipse/gwt2swf-helloworld -overwrite and create new application./applicationCreator -eclipse gwt2swf-helloworld -out ~/workspace/java-eclipse/gwt2swf-helloworld pl.rmalinowski.gwt2swf.client.GWT2SWFHelloWorldNow add new library to project (Eclipse menu-> Project propertis -> java build files -> librarys -> Add Jar -> gwt2swf.jarStep 2. Refresh Eclipse. You shold see 'GWT2SWFHelloWorld.java' in 'pl.rmalinowski.gwt2swf.client' package. package pl.rmalinowski.gwt2swf.client;import pl.rmalinowski.gwt2swf.client.ui.SWFWidget;import com.google.gwt.core.client.EntryPoint;import com.google.gwt.user.client.ui.Button;import com.google.gwt.user.client.ui.ClickListener;import com.google.gwt.user.client.ui.RootPanel;import com.google.gwt.user.client.ui.Widget;/** * Entry point classes define onModuleLoad(). */public class GWT2SWFHelloWorld implements EntryPoint, ClickListener { private final Button addNewSwf = new Button("Add new SWF"); /** * This is the entry point method. */ public void onModuleLoad() { RootPanel.get().add(addNewSwf); addNewSwf.addClickListener(this); } public void onClick(Widget sender) { SWFWidget swfWidget = new SWFWidget("hello.swf",200,150); // OR // if you wont to add some variables you can instantine SWFWidget like // this: SWFParams params = new SWFParams("hello.swf", 200,150); params.addVar("bridgeName", "example"); swfWidget = new SWFWidget(params); RootPanel.get().add(swfWidget); }}Step 3. add < inherits name='pl.rmalinowski.gwt2swf.GWT2SWF' / > into your GWT2SWFHelloWorld.gwt.xml. So you gwt.xml should look like this: < module > < inherits name='com.google.gwt.user.User'/ > < inherits name='pl.rmalinowski.gwt2swf.GWT2SWF' / > < entry-point class='pl.rmalinowski.gwt2swf.client.GWT2SWFHelloWorld'/ > < /module > After all, finally you can lunch projekt. You should see this. Tip. To check if is flash player installed or if is correct version installed you could write code similary to followed: PlayerVersion minPlayerVersion = new PlayerVersion(7, 0, 14);boolean versionIsValid = SWFObjectUtil .isVersionIsValid(minPlayerVersion);if (!versionIsValid) { if (!SWFObjectUtil.isFlashPlayerInstalled()) { Window.alert("flash player not installed"); } else { Window.alert("not valid version of installed " + "flash player, needed version min: " + minPlayerVersion.toString()); }}What's New in This Release:· Compatibility with GWT 1.5 has been ensured (but for backward compatibility, Java generics are not used).· The embedded SWFObject has been upgraded to version 2.0.· The class SWFParams has been changed to SWFSettings.· The ability to set SWF attributes and parameters has been added.· Resizing of SWF has been fixed.


GWT2SWF Related Software