From: Christian H. <chr...@tu...> - 2002-12-16 08:33:19
|
Hi, and sorry for using this list for a general Java question, but I know there are so many experts reading it :-) Where and How are mouse events caught by the JDK? The mouse event causes an interrupt in the OS but how does Java now catch this event? Is it in the JVM? Or the AWT? Where does Java find out over which AWT/Swing component the mouse pointer was when the mouse was clicked? ...same question for keyboard events. -- One idea that might be interesting for Scope MVC: The classical MVC has a hierarchical View, the HMVC has a hierarchical Controller - so why shouldn't the Model be hierarchical as well? In fact, it is in the latest domain modelling approaches (Ontologies), like the OpenEHR.org/GEHR.org project for medical software. I've realized that actually not only MVC but ALL items in the real world are hierarchical. Nothing new, I guess, but nobody really implemented this into software. The key design decision to implement this is to make the top-most class a tree node/container so that all inheriting classes are tree nodes automatically. Thank you, Christian |
From: Steve M. <sme...@ya...> - 2002-12-16 08:55:07
|
Mouse events are delivered to the application by the OS in an event queue. The "application" in this case is the JDK, and the event queue is exposed through the AWT. AWT delivers to heavyweight components, and from there Swing receives and despatches to lightweight components. --- Agree with you on the hierarchical models, and in fact scope models are already hierarchical in the sense that they can contain other models (as properties). There is support for some of the subtleties that arise from this in the BasicController's handling of MODEL_CHANGED Controls. I can explain that handling some more if you like? SteveM ----- Original Message ----- From: "Christian Heller" <chr...@tu...> To: <sco...@li...> Sent: Monday, December 16, 2002 8:36 AM Subject: [Scope-dev] Mouse Events in JDK > Hi, > > and sorry for using this list for a general Java question, but I know > there are so many experts reading it :-) > > Where and How are mouse events caught by the JDK? > The mouse event causes an interrupt in the OS but how does Java now > catch this event? Is it in the JVM? Or the AWT? > Where does Java find out over which AWT/Swing component the mouse > pointer was when the mouse was clicked? > ...same question for keyboard events. > > -- > One idea that might be interesting for Scope MVC: > The classical MVC has a hierarchical View, the HMVC has a hierarchical > Controller - so why shouldn't the Model be hierarchical as well? > In fact, it is in the latest domain modelling approaches (Ontologies), > like the OpenEHR.org/GEHR.org project for medical software. > > I've realized that actually not only MVC but ALL items in the real world > are hierarchical. Nothing new, I guess, but nobody really implemented > this into software. The key design decision to implement this is to make > the top-most class a tree node/container so that all inheriting classes > are tree nodes automatically. > > Thank you, > Christian > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility > Learn to use your power at OSDN's High Performance Computing Channel > http://hpc.devchannel.org/ > _______________________________________________ > Scope-dev mailing list > Sco...@li... > https://lists.sourceforge.net/lists/listinfo/scope-dev |
From: Christian H. <chr...@tu...> - 2002-12-16 11:44:52
|
> Mouse events are delivered to the application by the OS in an event queue. > The "application" in this case is the JDK, and the event queue is exposed > through the AWT. AWT delivers to heavyweight components, and from there > Swing receives and despatches to lightweight components. Aha! Thanks, Steve. Just started digging into EventQueue, Runtime, Shutdown etc. :-) > Agree with you on the hierarchical models, and in fact scope models are > already hierarchical in the sense that they can contain other models (as > properties). There is support for some of the subtleties that arise from > this in the BasicController's handling of MODEL_CHANGED Controls. I can > explain that handling some more if you like? Thank you but I'm currently into other parts of our framework. I will definitely ask you again when needing help! The idea behind our framework is slightly different. I've taken the human body as example for modelling and it works perfectly. The system/application is a human being having organs (View = Eye, Controller = Brain etc.) as components which are built up hierarchically within the initialize methods and destroyed properly by the finalize methods, so that a complete lifecycle of each component is assured. In my thinking, a gui component of the view should be able to have their own ControllerComponent (Brain/Nerve Cell), reacting to signals/ events, quite similar to the event handling of HMVC/Scope. But I plan to avoid sending signals which are created somewhere and not properly destroyed because they don't belong to a specific object. (Garbage Collecting is not enough for me, I want to destroy all objects properly by calling their lifecycle methods in the right order, at a defined time.) That means, that a gui component (eye cell) has to call some method on its associated controller component (nerve cell) and is only allowed to hand over references to already existing objects, not creating new signals/events which would be sent into Nirvana. Does this all make some sense to you? Christian |