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

Implemented DesktopPane and InternalFrame #120

Merged
merged 2 commits into from
Jun 20, 2020

Conversation

reggert
Copy link
Contributor

@reggert reggert commented May 7, 2020

This feature adds support for JDesktopPane and JInternalFrame, as well as the latter's event hierarchy, to resolve #119 .

I branched directly off the v2.1.1 tag to allow it to be applied as a patch for the latest release. I can rebase onto work if necessary, though, but there should be no conflicts either way.

I tried to follow the conventions used by Window/RichWindow/Frame as much as possible, and avoided implementing wrappers for any parts of the Swing API that were documented as not intended for use by applications. It's possible that I may have neglected to implement some obscure feature, but I think I've covered all the likely use cases.

I originally implemented this within and tested it with a separate project that I am working on, and everything I tried out seems to be working.

Note that JInternalFrame does not extend the AWT Window class, so there was no way (that I could see) to integrate InternalFrame directly into the Window/RichWindow hierarchy.

@reggert reggert force-pushed the feature/internal-frame-support branch 2 times, most recently from 9683ef4 to 086cd35 Compare May 7, 2020 17:22
@reggert reggert force-pushed the feature/internal-frame-support branch from 086cd35 to 827e393 Compare May 7, 2020 17:27
@Sciss
Copy link
Contributor

Sciss commented May 10, 2020

Thank you! I will only be able to review this in the first week of June. If someone else wants to go ahead, please do so. Please remind me if I don't follow up on this.

@reggert
Copy link
Contributor Author

reggert commented Jun 3, 2020

Anyone had a chance to look at this yet?

@benhutchison
Copy link
Contributor

benhutchison commented Jun 8, 2020 via email

@Sciss
Copy link
Contributor

Sciss commented Jun 17, 2020

Thanks for your contribution, and for your patience. I had a brief look, in general it looks good. Of course one question would be if there is a common interface to Frame and InternalFrame, which could fix a design mistake (IMO) in Java Swing; but this could be also added at a later point.

The DragMode style is a bit different than the rest of Scala Swing when it comes to wrapping constants. I think it should be an Enumeration like everywhere else (e.g. FileChooser.Result, FileChooser.SelectionMode, BorderPanel.Position, Alignment, etc.)

Apart from this change, I would be happy to merge. If a second pair of eyes is available, it would be great, but at least from cursory examination, I cannot see any issues.

@Sciss
Copy link
Contributor

Sciss commented Jun 17, 2020

Another question is if you have already signed the CLA? (See #51 (comment)). To avoid future problems, we require this from any first time contributor.

@reggert
Copy link
Contributor Author

reggert commented Jun 19, 2020

CLA signed.

@reggert
Copy link
Contributor Author

reggert commented Jun 19, 2020

I've converted DragMode to an Enumeration and added some documentation for it.

@reggert reggert force-pushed the feature/internal-frame-support branch from 6fdfcc6 to 2f29aad Compare June 19, 2020 18:29
@reggert
Copy link
Contributor Author

reggert commented Jun 19, 2020

Last (force) push was just tweaks to the wording of the DragMode documentation.

@Sciss Sciss merged commit 192ff1c into scala:work Jun 20, 2020
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.

Missing support for JInternalFrame and JDesktopPane
3 participants