by, 04-26-2012 at 07:49 PM (454 Views)
A useful extension is provided by the Action interface to the Action Listener interface where multiple controls may access similar functionality.
ActionPerformed method that has been defined by the help of ActionListener interface, this interface would be allowing application to define:
- One or more than one text strings that provide details regarding the function. Strings could be used for display of the button;s flyover text or setting up of the text, in menu item.
- One or more than one icons which will be depicting the function. Such icons could be for menu control images, or for sake of the composite entries.
- Enabled or disabled functionality state. Rather than separately disabling menu item or toolbar button the function which causes implementation of interface could be disabled by the application. All components registered to be as listeners know how event generation could be disabled for that item or how display could be modified.