I'm going to need this functionality very soon.   I'll probably just modify
the GLF to add the needed removeLayer method and fuctionality in the
Composite classes (as well as adding functionality of Layer shuffling
and visibility)

But one thing you can do without modifying the GLF
is to use the setLayers method (i think that's what it's called).  It
takes a
array of Layers so you can keep a seperate model of all your layers in
a custom class and retrive them as an array to use with the
setLayers(Layer[])
method.



kaiwen wrote:

Hi,

I just started reading on java2d and glf (Graphics Layered Framework).

I am very keen on learning glf, I hope to achieve layered graphics
like those in Photoshop drawing.
What I wanted is to draw each Shape in seperate Layer, and modify a
particular Layer and redraw that modified Layer WITHOUT redrawing the
whole canvas. Can I do this with glf?

I tried a few example from sun.com, I cannot find a method
Layer.remove(Layer). Or there is another way doing this?

I used to keep all Shape drawn in a Vector and later search for the
Shape I want to modify, modify it and draw the whole Vector on Canvas
again. Yes, it is very slow.

What is a better way of doing this? Please advice.

Best ragards,
Calvin Kuan
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body of the message "signoff JAVA2D-INTEREST". For general help, send
email to [EMAIL PROTECTED] and include in the body of the message
"help".

=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to