Skip to main content

fundamental question

9 replies [Last post]
psychostud
Offline
Joined: 2005-11-02

Hi Alex,

How does the jxlayer actually layer itself .
1: Does it use the glasspane of the rootpane or a layered pane
2: Does it layer itself on top of a compont using the overlaylayout

Please clarify this since it would be really helpful to dig deep and start using jxlayer for my applications.

Regards,
Pavan Kumar S

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kirillcool
Offline
Joined: 2004-11-17

> If there was a similar question posted on the
> Substance forum would you advise ur users to go
> thru the code in order to find the solution ?

Pavan,

You did not state any problem in your original post. You asked two very specific questions about the current implementation details of JXLayer. You have not asked "this is my problem, how do i address it".

Going to Substance, if anybody asks me what kind of a data structure do i use for internal caching, or whether i use radial gradients anywhere, i would point them to the code. If instead they tell me that they're concerned about memory consumption on low end machines, or performance issues on multiple screens, that would be another kind of question.

Kirill

alexfromsun
Offline
Joined: 2005-09-05

Hello Pavan Kumar S

> 1: Does it use the glasspane of the rootpane or a layered pane

It doesn't use glassPane of the rootpane nor a layered pane.

JXLayer uses its own transparent panel (also called glasspane)

which placed on top of the wrapped component

So it won't be a problem if your application uses frame's glasspane tricks.

>2: Does it layer itself on top of a compont using the overlaylayout

It doesn't use overlaylayout, I created my own JXLayer layout

Welcome to JXLayer forum

and good luck with your applications


alexp

psychostud
Offline
Joined: 2005-11-02

Thanks for the clear reply Alex ,
I have currently written code in my application for overlaying, or freezing a component , JXlayer would certainly make it much easier in future to achive such tasks and many more complex ones with ease.

Thanks,
Pavan Kumar S

Message was edited by: psychostud

Message was edited by: psychostud

kirillcool
Offline
Joined: 2004-11-17

Wouldn't the answer come from reading the code?

psychostud
Offline
Joined: 2005-11-02

I would definitely do that, but it would help if i get a higher level view of how layering is achieved.

jacek
Offline
Joined: 2003-08-22

Hm, I guess I am a pragmatist...I don't care about the internals of the code as long as it works.

And it does. So go use JXLayer. :-)

jacek
Offline
Joined: 2003-08-22

Plus, I figure if someone like Kiril (whose knowledge of Swing and Java 2D is probably years ahead of mine) endorses JXLayer in his blog postings, that's good enough for me.

http://www.pushing-pixels.org/?p=88

psychostud
Offline
Joined: 2005-11-02

One of the reasons i ask this question is that i would like to use animatedTransitions(by chet) along with jxlayer in my application. Since animated transitions uses a glasspane i thought that would create problems if jxlayer also uses a glass pane to layer itself.

Krill ,
If there was a similar question posted on the Substance forum would you advise ur users to go thru the code in order to find the solution ?

jacek
Offline
Joined: 2003-08-22

Ah, a valid question then, for sure.

I believe the glass pane is not used for painting, it is used more as an option to add additional swing controls.

The painting happens in the LayerUI implementation that you associated with your JXLayer.
However, who is actually responsible for invoking that paint logic is beyond my knowledge of JXLayer at this point.