Closed samuelgruetter closed 8 years ago
Possible extra overloads: javax.swing.AbstractButton
and javax.swing.JTabbedPane
@samuelgruetter and @mikebaum
I propose to delete this PR. Since 0.26.0 there is already a ChangeEventSource.
Let's do some cleanup for RxSwing...
I guess closing the PR is enough... ;-)
Here's how I would add a
ChangeEventSource
andSwingObservable.fromChangeEvents(...)
methods.The problem is that the many Swing classes which have
addChangeListener
andremoveChangeListener
methods don't implement a common interface or super class, so we need to write a separatefromChangeEvents
overload for each such Swing class.So the goal is to have no code duplication except at the place where we have to show to the Java compiler that the Swing class in question indeed has
addChangeListener
andremoveChangeListener
methods. This PR gives one way of achieving this, comments/feedback are welcome ;-)Note that this PR is not yet complete: It has no tests yet, needs more
fromChangeEvents
overloads, and probably also some doc improvements. I don't have time to continue on this right now, but everyone please feel free to branch from here and continue ;-)