Sorry, i'm tired to repeat the same thing over and over, so this will be the 
last time.

If you're storing Rectangle objects in your model, and then during the painting 
of the view you're passing the same exact Rectangles, then you're creating 
coupling between the model and the view. The Rectangle object doesn't draw 
itself - you pass it to the draw* methods of Graphics which draws it. That is 
indeed state, but for that specific view. Not only that, but just calling 
setLocation on your rectangle doesn't magically redraw it on the screen in the 
new location (like, say, changing a node in the default implementation of tree 
would).

And if your renderers hold colors in them, then it's not the best renderer 
implementation. You get the model object in the get*Renderer, and you should 
set the text, icon and colors according to that model object. After the 
renderer has been rubber-stamped, it should be treated as "gone" (even though 
you'll return the same exact object for the next cell / row).

Kirill
[Message sent by forum member 'kirillcool' (kirillcool)]

http://forums.java.net/jive/thread.jspa?messageID=228066

===========================================================================
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