Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[do not yet merge] ChangeEventSource & fromChangeEvents #28

Closed

Conversation

samuelgruetter
Copy link
Contributor

Here's how I would add a ChangeEventSource and SwingObservable.fromChangeEvents(...) methods.

The problem is that the many Swing classes which have addChangeListener and removeChangeListener methods don't implement a common interface or super class, so we need to write a separate fromChangeEvents 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 and removeChangeListener 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 ;-)

@whymarrh
Copy link

Possible extra overloads: javax.swing.AbstractButton and javax.swing.JTabbedPane

@Petikoch
Copy link
Contributor

@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...

@samuelgruetter
Copy link
Contributor Author

I guess closing the PR is enough... ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants