OBJECT/EMBED applets

Koos Vriezen koos.vriezen at xs4all.nl
Fri Jan 31 14:54:11 GMT 2003


Hi,

I managed to get applets working defined in a OBJECT/EMBED tag by making a
KPart out of KJAS. It's a standalone package for now, the source are from
khtml/java with a kjavaappletviewer part addition. Because kjas.jar,
kjas.policy and use of konquerorrc are hardcoded in kjavaappletserver.cpp,
it's not needed to copy these.
The only changes I had to make to the existing source, except from some
includes because it's not build inside kdelibs, is implement a
'showEvent(QShowEvent*)' in KJavaAppletWidget and call 'showApplet()'
there to get the initial size right.

LiveConnect only partially works. Eg.
    <EMBED src="myapplet.class" name="myname" width=500 height=80
      type="application/x-java-applet">
    </EMBED>
JS->Java works, Java->JS not because the current
org.kde.javascript.JSObject makes use of the document.applets collection.

In
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
            WIDTH = 400 HEIGHT = 80
            codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
       <PARAM NAME = CODE VALUE = "jsapplet.class" >
       <PARAM NAME="type" VALUE ="application/x-java-applet">
       <EMMBED type="application/x-java-applet;version=1.3"
               CODE="myapplet.class" WIDTH = 400 HEIGHT = 80
                  pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html">
       </EMBED>
    </OBJECT>
LiveConnect doesn't work. The problem here is that the part is created
after KHTMLEmbedElementImpl::attach() :-(.

To build it, copy a admin dir for somewhere and run 'make -f
admin/Makefile.cvs' first.

Koos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kjavaappletviewer-tar.bz2
Type: application/octet-stream
Size: 20208 bytes
Desc: 
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20030131/cc9a6231/attachment.obj>


More information about the kfm-devel mailing list