Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Can an Applet be Transparent or Given z-index? (http://www.velocityreviews.com/forums/t125637-can-an-applet-be-transparent-or-given-z-index.html)

JSJprogr 08-14-2003 07:25 PM

Can an Applet be Transparent or Given z-index?
 
(this did not seem to make it, so I'll try again)
I have a web page that is a combo of a JavaScript drag-and-drop
program and a Java drawing applet. I want to be able to drap
the dragable divs (made dragable via JavaSCRIPT) over the applet
where line drawing is done. There would be 2 solutions, but I do
not know if either is possible or how to do them

(1) If I could make the applet transparent (except for the line drawings)
then the JS dragable gifs would drag to where I want them

OR

(2) If the applet could be put in a layer or div and given a z-index
or level, then the background of the applet need not be transparent,
I could drag the divs right OVER the part of the applet I wanted to.

If either of these solutions are possible, could someone tell me how?




Neomorph 08-15-2003 11:20 AM

Re: Can an Applet be Transparent or Given z-index?
 
On 14 Aug 2003 21:25:23 +0200, JSJprogr <zerozerozerozero4811@no-id.com>
two-finger typed:

>(this did not seem to make it, so I'll try again)
>I have a web page that is a combo of a JavaScript drag-and-drop
>program and a Java drawing applet. I want to be able to drap
>the dragable divs (made dragable via JavaSCRIPT) over the applet
>where line drawing is done. There would be 2 solutions, but I do
>not know if either is possible or how to do them
>
>(1) If I could make the applet transparent (except for the line drawings)
> then the JS dragable gifs would drag to where I want them
>
>OR
>
>(2) If the applet could be put in a layer or div and given a z-index
> or level, then the background of the applet need not be transparent,
> I could drag the divs right OVER the part of the applet I wanted to.
>
>If either of these solutions are possible, could someone tell me how?
>
>


Nope. You can't really give an Applet an Alpha channel or something like
that. All you can do is make your Applet draw something in it that may look
exactly like it fits in its surroundings.

I have an Applet like that, but it only works on specific browser versions:
http://www.xs4all.nl/~leimann/javadev/glassApplet.html

http://www.xs4all.nl/~leimann/javadev/source/glass.zip
contains the source code, in case you're interested in implementation
details.

It basically uses Javascript access from Java to retrieve information about
its location on screen and uses the same background picture or color to
make it look like it's invisible (apart from its own animation).

It's currently limited to Netscape 4.x (under Windows - I had to make
assumptions about the widths of the lower and right hand window borders to
be able to figure out the Applet's position in the page) and IE 4.0
onwards, which provides enough positioning info through Javascript to get
it exactly right.

This means: the GlassApplet framework only works when Java and Javascript
are both enabled - if Javascript is disabled, but java is enabled you may
get an error, or the positioning will be incorrect (which for fine
granularity background patterns may not be a problem...).

Cheers.

Tim Tyler 08-22-2003 11:59 AM

Re: Can an Applet be Transparent or Given z-index?
 
Neomorph <neomorph@nospam.demon.co.uk> wrote:

: I have an Applet like that, but it only works on specific browser versions:
: http://www.xs4all.nl/~leimann/javadev/glassApplet.html

A funky chiquita you have there ;-)

: It's currently limited to Netscape 4.x (under Windows - I had to make
: assumptions about the widths of the lower and right hand window borders to
: be able to figure out the Applet's position in the page) and IE 4.0
: onwards, which provides enough positioning info through Javascript to get
: it exactly right.

I have a similar applet: http://cafaq.com/

However I never managed to get positioning info from Sun's JVMs under IE.

Do you know if you have managed that feat?
--
__________
|im |yler http://timtyler.org/ tim@tt1.org

Liu, Chunyen 08-22-2003 02:03 PM

Re: Can an Applet be Transparent or Given z-index?
 
Did not seem to line up well in my IE 6.0 on Windows NT.


> -----Original Message-----
> From: Neomorph [SMTP:neomorph@nospam.demon.co.uk]
> Posted At: Friday, August 15, 2003 6:20 AM
> Posted To: programmer
> Conversation: Can an Applet be Transparent or Given z-index?
> Subject: Re: Can an Applet be Transparent or Given z-index?
>
> On 14 Aug 2003 21:25:23 +0200, JSJprogr
> <zerozerozerozero4811@no-id.com>
> two-finger typed:
>
> >(this did not seem to make it, so I'll try again)
> >I have a web page that is a combo of a JavaScript drag-and-drop
> >program and a Java drawing applet. I want to be able to drap
> >the dragable divs (made dragable via JavaSCRIPT) over the applet
> >where line drawing is done. There would be 2 solutions, but I do
> >not know if either is possible or how to do them
> >
> >(1) If I could make the applet transparent (except for the line

> drawings)
> > then the JS dragable gifs would drag to where I want them
> >
> >OR
> >
> >(2) If the applet could be put in a layer or div and given a z-index
> > or level, then the background of the applet need not be

> transparent,
> > I could drag the divs right OVER the part of the applet I wanted

> to.
> >
> >If either of these solutions are possible, could someone tell me how?
> >
> >

>
> Nope. You can't really give an Applet an Alpha channel or something
> like
> that. All you can do is make your Applet draw something in it that may
> look
> exactly like it fits in its surroundings.
>
> I have an Applet like that, but it only works on specific browser
> versions:
> http://www.xs4all.nl/~leimann/javadev/glassApplet.html
>
> http://www.xs4all.nl/~leimann/javadev/source/glass.zip
> contains the source code, in case you're interested in implementation
> details.
>
> It basically uses Javascript access from Java to retrieve information
> about
> its location on screen and uses the same background picture or color
> to
> make it look like it's invisible (apart from its own animation).
>
> It's currently limited to Netscape 4.x (under Windows - I had to make
> assumptions about the widths of the lower and right hand window
> borders to
> be able to figure out the Applet's position in the page) and IE 4.0
> onwards, which provides enough positioning info through Javascript to
> get
> it exactly right.
>
> This means: the GlassApplet framework only works when Java and
> Javascript
> are both enabled - if Javascript is disabled, but java is enabled you
> may
> get an error, or the positioning will be incorrect (which for fine
> granularity background patterns may not be a problem...).
>
> Cheers.




All times are GMT. The time now is 02:10 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.