Jim- right on and well said-  that was exactly my confusion....

Kirillcool said:
you're using core view classes in your model. The Shape and its derived classes 
are for painting on the screen. Although they might seem like a good option to 
use in the model, they aren't in most cases (as you're starting to see), since 
they're targeting the screen (view).

Well Rectangle keeps state in just the way you say it shouldn't, if you mean by 
state enough information to draw it to the screen in a specific place. It has 
an x and a y and you can mutate those through it's methods and as a result of 
that mutation it will draw itself elsewhere. That's state. .

 So I am not understanding what you're saying. In what sense is Rectangle not 
keeping the state you think I want to keep, because I want to keep the same 
"state" it has.

It's not that views shouldn't hold state, it's that they shouldn't hold 
non-view state. Renderers etc have state to them, colors Components etc etc.... 
so also does rectangle have a state- the x and y  coordinates of it's upper 
left hand corner (ULHC going forward).  Are you saying Rectangle is wrong for 
holding onto this state?
[Message sent by forum member 'swv' (swv)]

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

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