> >> Event bubbling. Flex/Flash has the concept of event bubbling. >> Bubbling helps alleviate the performance issues because events can be >> defined to bubble or not at event creation time. Swing used to >> bubble >> all events in 1.0, but that got neutered when they had performance >> problems. That was a serious mistake. I think just introducing the >> concept of events that bubble or don't could have kept the old model >> around with the benefit of performance. > > Not sure about this, I know I'd like keyboard and mouse events to > automatically bubble up through the scene graph, but not sure if it > does it in 1.2
Events are projected through the scenegraph. If you click on a rectangle it will get the mouse event. If the rectangle doesn't have blocksMouse:true set then the event will also go to the nodes below it. This is essentially bubbling. You can then register event handlers for the events you actually care about on the nodes that receive them. What JavaFX doesn't have yet is a way to receive global events. For example, all right clicks in the app to implement a global context menu. Or low level keyboard events to the entire window, regardless of which component has the focus. The are RFEs filed for these use cases, so we should get them in a future release. >> > >> Simpler layout rules. Flex doesn't have LayoutManagers. Swing's > > Layout sucks in JavaFX right now. JFXtra's offers some assistance > here with a Grid and MigLayout layout helpers, but its a priority I > believe for the team. Actually, the layout mechanism and API is great. We threw away layout managers and went to a container managed system. You also have the option for absolute positioning, and a few in-between cases. The reason why layout seems crappy right now is because we have so few built in containers. That's something we are actively working on. Expect more containers and components in future releases. > >> Finally Flex data structures work with their UI toolkits out of the >> box. Why don't we have a ListModel that implements the List >> interface >> yet? Why do Swing models suck so hard that you are constantly >> reinventing them for every project? Flex got it right where >> ArrayCollection and ICollection just work. JavaFX must be better in >> this area. > > There aren't enough complex controls in JavaFX to know how this is > going to be handled. Josh? :) Swing's concept of a model is really an adapter class between your real data model and the UI control. In JavaFX we have binding instead of an adapter class. > From what I've seen over the past 10 months of working with JavaFX is > that > > 1. It was initially quite immature > 2. It's rapidly improving > 3. The guys at Sun seem to 'get' it, and are working their butts off > to make it work. > 4. Version 1.3 might be the tipping point for 'real' apps - both with > controls and performance > 5. Java 7 (JDK 1.7), Jigsaw (whatever you wanna call it) might be the > thing that gets it to the Flash level startup times. <- That > statement is a statement of pure faith and hope. We are doing a ton of work on startup performance. Some of that will come in JDK 7 and some will be in further Java 6 update releases. We are also working on our alternate graphics stack which is much faster and fully hardware accelerated. Lots more to come. - Josh > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---