Drag/Drop from desktop into browser using GWT (Google Web Toolkit) - java

Is it possible to drag & drop files from a desktop into the browser using GWT?
As an example of usage, I'd like my GWT application to support functionality such as:
image dragging from desktop to GWT app and GWT rendering it
or dragging of a zip file and GWT displaying its content
I know this is possible using pure JavaScript (http://goo.gl/9u55Uj), but is it possible with the Google Web Toolkit native code?
So far I wasn't able to find any example of this on the web.
Thanks.

Check lib-gwt-file and maybe also upload4gwt.

Related

JavaFX for Presentation Layer in Standalone Desktop App

We are going to create a java standalone Desktop application. We are searching for the best solution for the presentation layer. I saw javaFX and really liked it, but I am a bit confused. Can it be used in standalone Desktop applications?
Can I use javaFX in my standalone Desktop app and also use css to style the Ui?
It is perfectly possible to use JavaFX in a standalone Desktop app and apply CSS styling to it.
In JavaFX's lingo, this is know as a "Standalone" or "Self-Contained" deployment.
You can even integrate it with Swing or SWT, if the need arises. Note, though, that it's not possible the other way round.

Java integrated or embedded browser

I need a integrated or embedded java browser. I used WebEngine of javafx which support basic css as well html & java script but could not able to run flash file. Any way to do so.
Or any other Project u know which could fulfill my requirement.
You can also look at JxBrowser Java library that allows embedding Chromium-based web browser control into Java AWT/Swing application.
It supports both Java Swing and JavaFX.
BTW: the browser control is totally lightweight. All rendering happens in a separate native process by native Chromium engine. The web page looks like it's displayed in Google Chrome.
Check those (although they are not JavaFX but I suppose that they can be used):
http://lobobrowser.org/java-browser.jsp - pure Java
http://www.javadesktop.org/articles/jdic/index.html - better imho, but no longer maintained

Getting Chrome Browser in java Applications

Is there a way to get the Chrome browser inside of java applications similar to the way Awesomium works in C++ and C# applications?
There is currently no way getting the UI portion into a Java. You should consider just using barebone WebKit + V8 with many JNI calls. You could consider writing a JNA wrapper around those.
To make your JNA easier, you can wrap Chromium Embedded Framework
There's a Java Wrapper for the Chromium Embedded Framework (CEF).
Try javacef. This is open source project. This project can embed Chromium browser in Java SWT with multitab browser support, cookies manipulation, tab settings, printing, back, forward, refresh buttons and enhanced file download. This project is based on Chromium Embedded Framework (CEF).

Embedding a web browser in a java application on Mac OS X

I'm developing a cross-platform desktop application using Java. My application requires displaying a couple of websites from within my application and not to open them in any full fledged web browser like Safari or Firefox. I've found some Java libraries and projects for accomplishing this for Windows like The DJ Project, JDIC for Processing and [Lobo Browser]. But most don't support Mac OS X or maybe I can't figure out how to run them on a Mac. I managed to run Lobo Browser as a simple frame and load a page, but the project is about 2 years old and doesn't render pages properly.
Please suggest if there is any cross-platform library available for embedding a web browser in a java program or even mac only library would do.
Take a look at Qt Jambi, a java API for the Qt toolkit, specifically the WebKit package. Full DOM rendering with or without a GUI.

Hosting ActiveX controls on a Java AWT Frame?

Is there a way to display a Flash or Adobe Reader ActiveX control in a Java AWT frame?
I'm porting a large old J++ application to standard Java and it needs to host a certain ActiveX control on an AWT frame.
Is this possible?
I looked at the JACOB (Java to COM Bridge) project and it doesn't appear to support ActiveX objects that draw on the screen.
It looks like this can be done by mixing AWT and SWT.
The Eclipse project has a sample snippet that embeds Microsoft Word into an AWT/SWT mixed app.
It appears that you will need to purchase a proprietary library in order to able to do this, as Java itself doesn't allow access to COM. Another similar question (about just Flash in Java) can be found here and a couple commercial solutions were listed.
I should note that whatever route you end up taking, you should optimally try to find a library that provides access to an Internet Explorer control, as opposed to just Flash or Adobe Reader. That's because, once you have access to an IE element, you can provide it with a URL (even if it's a local file) of either a .swf or .pdf document, and it will automatically load the correct plugin for each (I used this shortcut once for a personal C++ project in which I needed to load several different ActiveX controls). It appears that the EasyJCom library at the above link does provide such access to an embedded IE control.

Categories

Resources