In a Swing application, I can declare an Action object that allows me to support:
- availability of action
- accelerator key
- what action
and other things in one place.
Let me tell you a few details:
I have a scene with a TreeView . In the scene, I have several buttons that allow you to add a child and delete the selected item.
Additionally, I have a ContextMenu for TreeView with a MenuItem that does the same thing as buttons.
Depending on the selected item, I need to enable or disable these menu items and buttons.
In Swing, I can easily solve this with Swing Action. That is, enabling / disabling will enable / disable all related components.
Does JavaFX 2.2 have some kind of Swing action counterpart?
acc15 source share