We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Layering PApplets
Page Index Toggle Pages: 1
Layering PApplets (Read 598 times)
Layering PApplets
Dec 14th, 2005, 2:02pm
 
Hello,
Is there any resource which shows examples using layering in processing?
Specifically i would like to layer PApplets. Can this be done?
What are implications of Z order on receiving user inputs?
Is it that only the top layer can receive inputs?

thank you
Sameer
Re: Layering PApplets
Reply #1 - Dec 14th, 2005, 6:23pm
 
Are you talking about layering at the web-page level, or layering at the processing level?

At the web-page level, it'd work just as you expect, applets wouldn't be transparent and only the topmost one would receive input.  However, it's quite likely for browsers to give you grief when you try to layer them.

At the processing level, it's simply a matter of designing your code to that effect.  I could go into detail, but the approach really varies depending on what you're trying to do.

Marcello
Re: Layering PApplets
Reply #2 - Dec 15th, 2005, 6:19am
 
Thank you for the response.
The layering i need is not for the web pages.
I have a java fat client which is displaying super contig/contig and base pair data. I was exploring the possibility of using layers to superimpose information instead of having multiple views and trying to synchronize information between them. I am using a Papplet to show the supercontig/contig and base pair information. The PApplet is inside a swing container. I plan to layer only the Papplet area.

thank you
Sameer
Re: Layering PApplets
Reply #3 - Dec 15th, 2005, 11:45pm
 
This would be a little complicated because PApplet is a heavyweight object, and Swing doesn't always play well with heavyweight layering (for example if you used JInternalFrames, the PApplets of windows beneath the active window would display above the active window's border).

You would want to do a little hacking to get PApplet (or even use PGraphics directly) to function as a lightweight Component, then you could use it as a normal Swing widget in your GUI.

Marcello
Page Index Toggle Pages: 1