I debugged the ArgoUML application to see how a model element is created and used. I saw that when the user clicks, on mouse press event the element is created (without an owner), and then on mouse released event the owner is set. Why isn't the owner set also when the element is created?
By "element" do you mean diagram element (ie Fig) and you're talking about the fig "owner"? In which case Is this really correct? What should be happening when (for example) the user has selected the New Class tool is that ModePlace takes control of mouse events - 1. ModePlace.mousePressed calls the renderer (in this case ClassDiagramRenderer) 2. ClassDiagramRenderer.getFigNodeFor creates the Fig and assigns the model element to it. So the model element and the diagram element should both be created on mousePressed. I have been considering that it may be better to delay creation and assignment of the model element until mouse released because a) It is safer to delay amending the model until the complete user interaction is finished. b) It may be that some Figs are only legal in certain locations (I think this may be the case with some states). If released somewhere illegal it would be best to have never created a model element. Regards Bob. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
