Proposal: make all methods in all listeners default. (original) (raw)
Petr Pchelko petr.pchelko at oracle.com
Thu Jan 16 14:27:05 UTC 2014
- Previous message: [9] Review request: 8028616 Htmleditorkit parser doesn't handle leading slash (/)
- Next message: Proposal: make all methods in all listeners default.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello, AWT and Swing Team.
I want to discuss an idea with you. What do you think making almost all methods in all listener interfaces in Swing and AWT default with empty implementation, the same way it's done in adapters? This would be convenient if we are writing something like this:
public class MyPanel extends Panel implements MouseListener
but do not need all methods in a MouseListener. So, without this change we would need to override the methods with empty implementation ourselves, and if all of the methods are default we can choose which methods to implement. Actually, if done like this we could take one step further and deprecate adapters..
What do you think?
With best regards. Petr.
- Previous message: [9] Review request: 8028616 Htmleditorkit parser doesn't handle leading slash (/)
- Next message: Proposal: make all methods in all listeners default.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]