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

JDK9 swing generification changes #15

Closed
andy1138 opened this issue Jul 27, 2014 · 14 comments
Closed

JDK9 swing generification changes #15

andy1138 opened this issue Jul 27, 2014 · 14 comments

Comments

@andy1138
Copy link
Contributor

Joseph Darcy (@jddarcy) has tweeted ( https://twitter.com/jddarcy/status/493137546814042112 )

Swing developers, please recompile your apps with JDK 9 build 24 to test the compatibility of recent swing generification changes.

Guess this will need another branch (based on java7) with more changes.

@jacobsallan
Copy link
Contributor

There is only one line of change to make to get a clean compile. Slider.scala line 61 changes from
val table = new java.util.Hashtable[Any, Any]
to
val table = new java.util.Hashtable[java.lang.Integer, javax.swing.JComponent]

The compilation was performed with sbt 0.13.5, scala 2.11.2, and JDK 1.9.0-ea-b27.

@jacobsallan
Copy link
Contributor

I forgot to mention the branch I used: java7. The one line change is backwards compatible with JDK 1.7.0_51, so a separate java9 branch is overkill.

@andy1138
Copy link
Contributor Author

andy1138 commented Sep 2, 2014

Hi Allan
Thanks for trying jdk9 out and I'm pleased it's such a small change without
having to fork it (again).

I'll do the change in the next couple of days, (or please create a pull
request)

On 2 September 2014 00:31, Allan Jacobs [email protected] wrote:

I forgot to mention the branch I used: java7. The one line change is
backwards compatible with JDK 1.7.0_51, so a separate java9 branch is
overkill.


Reply to this email directly or view it on GitHub
#15 (comment).

@jacobsallan
Copy link
Contributor

Hi Andy,

Have you taken over the job of maintaining the module? There is a page
in scala-lang.org that says that it is going away in 2.12 for lack of a
maintainer.

On 09/02/2014 11:53 AM, Andy Hicks wrote:

Hi Allan
Thanks for trying jdk9 out and I'm pleased it's such a small change
without
having to fork it (again).

I'll do the change in the next couple of days, (or please create a pull
request)

On 2 September 2014 00:31, Allan Jacobs [email protected] wrote:

I forgot to mention the branch I used: java7. The one line change is
backwards compatible with JDK 1.7.0_51, so a separate java9 branch is
overkill.


Reply to this email directly or view it on GitHub
#15 (comment).


Reply to this email directly or view it on GitHub
#15 (comment).

@andy1138
Copy link
Contributor Author

andy1138 commented Sep 7, 2014

Hi Allen

Yes, I've been given commit access to scala-swing and given some spare time
home to fix some of it. I'm also looking into trying to get some test
working
So now pull request will now be seriously looked at, but mainly for the
'java7' branch. Help and changes will be much appreciated :-)

As for, "will it be in 2.12"? That's still open, I think it will depend
on the changes that have been made by the time 2.12 is released. Either way
there will still be a scala-swing.jar in a repo somewhere that will be
usable.

Andy

On 6 September 2014 17:32, Allan Jacobs [email protected] wrote:

Hi Andy,

Have you taken over the job of maintaining the module? There is a page
in scala-lang.org that says that it is going away in 2.12 for lack of a
maintainer.

On 09/02/2014 11:53 AM, Andy Hicks wrote:

Hi Allan
Thanks for trying jdk9 out and I'm pleased it's such a small change
without
having to fork it (again).

I'll do the change in the next couple of days, (or please create a pull
request)

On 2 September 2014 00:31, Allan Jacobs [email protected]
wrote:

I forgot to mention the branch I used: java7. The one line change is
backwards compatible with JDK 1.7.0_51, so a separate java9 branch is
overkill.


Reply to this email directly or view it on GitHub
<#15 (comment)
.


Reply to this email directly or view it on GitHub
#15 (comment).


Reply to this email directly or view it on GitHub
#15 (comment).

@jacobsallan
Copy link
Contributor

Hi Andy,

I have converted the majority of the Swing demos at
http://docs.oracle.com/javase/tutorial/uiswing/examples/components/index.html
to use Swing scala. Do you have a use for this?

The conversion is deliberately close to the Java (a) so that the
discussions in the tutorial can still be followed and (b) calls to use
scala swing component peers disclosed missing features in Scala swing.
Two of the demos required baby versions of scala.swing components that
are not in the library yet. I skipped sixteen of the component demos
(so far) for lack of scala.swing support of some feature or other.

Allan

On 09/07/2014 05:17 AM, Andy Hicks wrote:

Hi Allen

Yes, I've been given commit access to scala-swing and given some spare
time
home to fix some of it. I'm also looking into trying to get some test
working
So now pull request will now be seriously looked at, but mainly for the
'java7' branch. Help and changes will be much appreciated :-)

As for, "will it be in 2.12"? That's still open, I think it will depend
on the changes that have been made by the time 2.12 is released.
Either way
there will still be a scala-swing.jar in a repo somewhere that will be
usable.

Andy

On 6 September 2014 17:32, Allan Jacobs [email protected] wrote:

Hi Andy,

Have you taken over the job of maintaining the module? There is a page
in scala-lang.org that says that it is going away in 2.12 for lack of a
maintainer.

On 09/02/2014 11:53 AM, Andy Hicks wrote:

Hi Allan
Thanks for trying jdk9 out and I'm pleased it's such a small change
without
having to fork it (again).

I'll do the change in the next couple of days, (or please create a
pull
request)

On 2 September 2014 00:31, Allan Jacobs [email protected]
wrote:

I forgot to mention the branch I used: java7. The one line
change is
backwards compatible with JDK 1.7.0_51, so a separate java9
branch is
overkill.


Reply to this email directly or view it on GitHub

<#15 (comment)
.


Reply to this email directly or view it on GitHub

#15 (comment).


Reply to this email directly or view it on GitHub
#15 (comment).


Reply to this email directly or view it on GitHub
#15 (comment).

@andy1138
Copy link
Contributor Author

Hi Allan

That sounds really great :-)

If you havent done so, can you 'sign' the Scala CLA
http://typesafe.com/contribute/cla/scala ( a bit more detail
https://github.com/scala/scala/blob/2.11.x/CONTRIBUTING.md )

I would suggest adding them to the folder
scala-swing/examples/src/main/scala/scala/swing/examples/tutorials in the
java7 branch. (unless you can think of something better)

Andy

On 19 September 2014 16:39, Allan Jacobs [email protected] wrote:

Hi Andy,

I have converted the majority of the Swing demos at

http://docs.oracle.com/javase/tutorial/uiswing/examples/components/index.html
to use Swing scala. Do you have a use for this?

The conversion is deliberately close to the Java (a) so that the
discussions in the tutorial can still be followed and (b) calls to use
scala swing component peers disclosed missing features in Scala swing.
Two of the demos required baby versions of scala.swing components that
are not in the library yet. I skipped sixteen of the component demos
(so far) for lack of scala.swing support of some feature or other.

Allan

On 09/07/2014 05:17 AM, Andy Hicks wrote:

Hi Allen

Yes, I've been given commit access to scala-swing and given some spare
time
home to fix some of it. I'm also looking into trying to get some test
working
So now pull request will now be seriously looked at, but mainly for the
'java7' branch. Help and changes will be much appreciated :-)

As for, "will it be in 2.12"? That's still open, I think it will depend
on the changes that have been made by the time 2.12 is released.
Either way
there will still be a scala-swing.jar in a repo somewhere that will be
usable.

Andy

On 6 September 2014 17:32, Allan Jacobs [email protected]
wrote:

Hi Andy,

Have you taken over the job of maintaining the module? There is a page
in scala-lang.org that says that it is going away in 2.12 for lack of
a
maintainer.

On 09/02/2014 11:53 AM, Andy Hicks wrote:

Hi Allan
Thanks for trying jdk9 out and I'm pleased it's such a small change
without
having to fork it (again).

I'll do the change in the next couple of days, (or please create a
pull
request)

On 2 September 2014 00:31, Allan Jacobs [email protected]
wrote:

I forgot to mention the branch I used: java7. The one line
change is
backwards compatible with JDK 1.7.0_51, so a separate java9
branch is
overkill.


Reply to this email directly or view it on GitHub

<#15 (comment)
.


Reply to this email directly or view it on GitHub

#15 (comment).


Reply to this email directly or view it on GitHub
<#15 (comment)
.


Reply to this email directly or view it on GitHub
#15 (comment).


Reply to this email directly or view it on GitHub
#15 (comment).

@jacobsallan
Copy link
Contributor

Hi Andy,

Under examples/src/main/scala/scala/swing/examples I've created a
directory "tutorials", as you suggested.

Below the "tutorials" directory, I would like to preserve some directory
structure. One of the demos uses a Java file and almost all of them use
image files. So, under "tutorials", I've kept the "java", "scala", and
"resources" directories that would go under "main" in a Maven project.

I've only converted a subset of the "components" tutorials. These all
use a package "components". There are other tutorials about other Swing
topics that use other packages. It makes sense to preserve more of the
Maven directory structure to make it easier for readers to get the demos
working. So, under "tutorials/java" and "tutorials/scala", I've kept a
"components" directory for the package. Below "resources", I've
preserved the subdirectories used in the source code.

Another issue: What do you want to do with demos that should work but
do not? Do you want the source code and a bug report or should the demo
codes go into a different location?

Examples: (1) "TableSortDemo" displays a table that is supposed to have
sortable columns, but the sorting does not work. This looks to be a bug
in scala-swing. (2) In "SimpleTableSelectionDemo", selection events are
caught by the application, but the range of column indices is often wrong.

Allan

$ ls -lR examples/src/main/scala/scala/swing/examples/tutorials
examples/src/main/scala/scala/swing/examples/tutorials:
total 12
drwxrwxr-x 3 allan allan 4096 Sep 21 21:18 java
drwxrwxr-x 13 allan allan 4096 Sep 21 21:16 resources
drwxrwxr-x 3 allan allan 4096 Sep 21 21:17 scala

examples/src/main/scala/scala/swing/examples/tutorials/java:
total 4
drwxrwxr-x 2 allan allan 4096 Sep 21 21:19 components

examples/src/main/scala/scala/swing/examples/tutorials/java/components:
total 8
-rw-rw-r-- 1 allan allan 7257 Sep 21 21:14 IntegerEditor.java

examples/src/main/scala/scala/swing/examples/tutorials/resources:
total 184
drwx------ 2 allan allan 4096 Sep 21 21:16 arnold_files
-rw-r----- 1 allan allan 963 Sep 21 21:16 arnold.html
drwx------ 2 allan allan 4096 Sep 21 21:16 bloch_files
-rw-r----- 1 allan allan 978 Sep 21 21:16 bloch.html
drwx------ 2 allan allan 4096 Sep 21 21:16 chan_files
-rw-r----- 1 allan allan 955 Sep 21 21:16 chan.html
-rw-r----- 1 allan allan 11349 Sep 21 21:16 content.txt
-rw-r----- 1 allan allan 83557 Sep 21 21:16 flyingBee.jpg
drwxrwxr-x 6 allan allan 4096 Sep 21 21:16 images
drwx------ 2 allan allan 4096 Sep 21 21:16 jls_files
-rw-r----- 1 allan allan 956 Sep 21 21:16 jls.html
drwx------ 2 allan allan 4096 Sep 21 21:16 Styled Text Sample_files
-rw-r----- 1 allan allan 1539 Sep 21 21:16 Styled Text Sample.html
drwx------ 2 allan allan 4096 Sep 21 21:16 swingtutorial_files
-rw-r----- 1 allan allan 1121 Sep 21 21:16 swingtutorial.html
-rw-rw-r-- 1 allan allan 1382 Sep 21 21:16 TextSamplerDemoHelp.html
drwx------ 2 allan allan 4096 Sep 21 21:16 TreeDemoHelp_files
-rw-r----- 1 allan allan 1294 Sep 21 21:16 TreeDemoHelp.html
drwx------ 2 allan allan 4096 Sep 21 21:16 tutorialcont_files
-rw-r----- 1 allan allan 974 Sep 21 21:16 tutorialcont.html
drwx------ 2 allan allan 4096 Sep 21 21:16 tutorial_files
-rw-r----- 1 allan allan 1084 Sep 21 21:16 tutorial.html
drwx------ 2 allan allan 4096 Sep 21 21:16 vm_files
-rw-r----- 1 allan allan 960 Sep 21 21:16 vm.html

examples/src/main/scala/scala/swing/examples/tutorials/resources/arnold_files:
total 36
-rw-r----- 1 allan allan 1656 Sep 21 21:16 s_code_download.js
-rw-r----- 1 allan allan 29626 Sep 21 21:16 s_code.js

examples/src/main/scala/scala/swing/examples/tutorials/resources/bloch_files:
total 36
-rw-r----- 1 allan allan 1656 Sep 21 21:16 s_code_download.js
-rw-r----- 1 allan allan 29626 Sep 21 21:16 s_code.js

examples/src/main/scala/scala/swing/examples/tutorials/resources/chan_files:
total 36
-rw-r----- 1 allan allan 1656 Sep 21 21:16 s_code_download.js
-rw-r----- 1 allan allan 29626 Sep 21 21:16 s_code.js

examples/src/main/scala/scala/swing/examples/tutorials/resources/images:
total 672
-rw-r----- 1 allan allan 422 Sep 21 21:16 Back24.gif
-rw-r----- 1 allan allan 5377 Sep 21 21:16 Bird.gif
-rw-r----- 1 allan allan 13061 Sep 21 21:16 blue.gif
-rw-r----- 1 allan allan 3366 Sep 21 21:16 Cat.gif
-rw-r----- 1 allan allan 3587 Sep 21 21:16 Dog.gif
drwxrwxr-x 2 allan allan 4096 Sep 21 21:16 doggy
-rw-r----- 1 allan allan 1638 Sep 21 21:16 dukeWaveRed.gif
-rw-r----- 1 allan allan 2339 Sep 21 21:16 FD.jpg
-rw-r----- 1 allan allan 83557 Sep 21 21:16 flyingBee.jpg
-rw-r----- 1 allan allan 434 Sep 21 21:16 Forward24.gif
drwxrwxr-x 2 allan allan 4096 Sep 21 21:16 geek
-rw-r----- 1 allan allan 557 Sep 21 21:16 gifIcon.gif
-rw-r----- 1 allan allan 12455 Sep 21 21:16 green.gif
-rw-r----- 1 allan allan 481 Sep 21 21:16 jpgIcon.gif
-rw-r----- 1 allan allan 29844 Sep 21 21:16 kathyCosmo.gif
-rw-r----- 1 allan allan 63185 Sep 21 21:16 lainesTongue.gif
-rw-r----- 1 allan allan 172 Sep 21 21:16 left.gif
-rw-r----- 1 allan allan 235 Sep 21 21:16 middle.gif
-rw-r----- 1 allan allan 228 Sep 21 21:16 Open16.gif
-rw-r----- 1 allan allan 8613 Sep 21 21:16 Pig.gif
-rw-r----- 1 allan allan 685 Sep 21 21:16 pngIcon.png
-rw-r----- 1 allan allan 6220 Sep 21 21:16 Rabbit.gif
-rw-r----- 1 allan allan 12017 Sep 21 21:16 red.gif
-rw-r----- 1 allan allan 172 Sep 21 21:16 right.gif
-rw-r----- 1 allan allan 206 Sep 21 21:16 Save16.gif
-rw-r----- 1 allan allan 248 Sep 21 21:16 sound.gif
-rw-r----- 1 allan allan 26850 Sep 21 21:16 stickerface.gif
drwx------ 2 allan allan 4096 Sep 21 21:16 Styled Text Sample_files
-rw-r----- 1 allan allan 1539 Sep 21 21:16 Styled Text Sample.html
-rw-r----- 1 allan allan 64004 Sep 21 21:16 sunw01.jpg
-rw-r----- 1 allan allan 57300 Sep 21 21:16 sunw02.jpg
-rw-r----- 1 allan allan 50526 Sep 21 21:16 sunw03.jpg
-rw-r----- 1 allan allan 54051 Sep 21 21:16 sunw04.jpg
-rw-r----- 1 allan allan 55490 Sep 21 21:16 sunw05.jpg
-rw-r----- 1 allan allan 565 Sep 21 21:16 tiffIcon.gif
drwxrwxr-x 2 allan allan 4096 Sep 21 21:16 tumble
-rw-r----- 1 allan allan 429 Sep 21 21:16 Up24.gif
-rw-r----- 1 allan allan 194 Sep 21 21:16 wavy.gif
-rw-r----- 1 allan allan 12354 Sep 21 21:16 yellow.gif

examples/src/main/scala/scala/swing/examples/tutorials/resources/images/doggy:
total 104
-rw-r----- 1 allan allan 4955 Sep 21 21:16 T0.gif
-rw-r----- 1 allan allan 4660 Sep 21 21:16 T10.gif
-rw-r----- 1 allan allan 4775 Sep 21 21:16 T11.gif
-rw-r----- 1 allan allan 3917 Sep 21 21:16 T12.gif
-rw-r----- 1 allan allan 5000 Sep 21 21:16 T13.gif
-rw-r----- 1 allan allan 4747 Sep 21 21:16 T1.gif
-rw-r----- 1 allan allan 4301 Sep 21 21:16 T2.gif
-rw-r----- 1 allan allan 4672 Sep 21 21:16 T3.gif
-rw-r----- 1 allan allan 4787 Sep 21 21:16 T4.gif
-rw-r----- 1 allan allan 3926 Sep 21 21:16 T5.gif
-rw-r----- 1 allan allan 5015 Sep 21 21:16 T6.gif
-rw-r----- 1 allan allan 4935 Sep 21 21:16 T7.gif
-rw-r----- 1 allan allan 4759 Sep 21 21:16 T8.gif
-rw-r----- 1 allan allan 4305 Sep 21 21:16 T9.gif

examples/src/main/scala/scala/swing/examples/tutorials/resources/images/geek:
total 124
-rw-r----- 1 allan allan 4693 Sep 21 21:16 geek-cg--.gif
-rw-r----- 1 allan allan 3675 Sep 21 21:16 geek-cgh-.gif
-rw-r----- 1 allan allan 4997 Sep 21 21:16 geek-cght.gif
-rw-r----- 1 allan allan 4576 Sep 21 21:16 geek-c---.gif
-rw-r----- 1 allan allan 4805 Sep 21 21:16 geek-cg-t.gif
-rw-r----- 1 allan allan 4718 Sep 21 21:16 geek-c-h-.gif
-rw-r----- 1 allan allan 4841 Sep 21 21:16 geek-c-ht.gif
-rw-r----- 1 allan allan 4699 Sep 21 21:16 geek-c--t.gif
-rw-r----- 1 allan allan 4762 Sep 21 21:16 geek--g--.gif
-rw-r----- 1 allan allan 4846 Sep 21 21:16 geek--gh-.gif
-rw-r----- 1 allan allan 4843 Sep 21 21:16 geek--ght.gif
-rw-r----- 1 allan allan 4599 Sep 21 21:16 geek-----.gif
-rw-r----- 1 allan allan 4832 Sep 21 21:16 geek--g-t.gif
-rw-r----- 1 allan allan 4736 Sep 21 21:16 geek---h-.gif
-rw-r----- 1 allan allan 4849 Sep 21 21:16 geek---ht.gif
-rw-r----- 1 allan allan 4685 Sep 21 21:16 geek----t.gif

examples/src/main/scala/scala/swing/examples/tutorials/resources/images/Styled
Text Sample_files:
total 40
-rw-r----- 1 allan allan 1638 Sep 21 21:16 dukeWaveRed.gif
-rw-r----- 1 allan allan 1656 Sep 21 21:16 s_code_download.js
-rw-r----- 1 allan allan 29626 Sep 21 21:16 s_code.js

examples/src/main/scala/scala/swing/examples/tutorials/resources/images/tumble:
total 68
-rw-r----- 1 allan allan 2083 Sep 21 21:16 T10.gif
-rw-r----- 1 allan allan 2011 Sep 21 21:16 T11.gif
-rw-r----- 1 allan allan 2144 Sep 21 21:16 T12.gif
-rw-r----- 1 allan allan 2226 Sep 21 21:16 T13.gif
-rw-r----- 1 allan allan 2090 Sep 21 21:16 T14.gif
-rw-r----- 1 allan allan 1986 Sep 21 21:16 T15.gif
-rw-r----- 1 allan allan 2015 Sep 21 21:16 T16.gif
-rw-r----- 1 allan allan 2115 Sep 21 21:16 T17.gif
-rw-r----- 1 allan allan 1934 Sep 21 21:16 T1.gif
-rw-r----- 1 allan allan 1898 Sep 21 21:16 T2.gif
-rw-r----- 1 allan allan 1880 Sep 21 21:16 T3.gif
-rw-r----- 1 allan allan 1989 Sep 21 21:16 T4.gif
-rw-r----- 1 allan allan 1971 Sep 21 21:16 T5.gif
-rw-r----- 1 allan allan 2027 Sep 21 21:16 T6.gif
-rw-r----- 1 allan allan 2076 Sep 21 21:16 T7.gif
-rw-r----- 1 allan allan 1985 Sep 21 21:16 T8.gif
-rw-r----- 1 allan allan 2053 Sep 21 21:16 T9.gif

examples/src/main/scala/scala/swing/examples/tutorials/resources/jls_files:
total 36
-rw-r----- 1 allan allan 1656 Sep 21 21:16 s_code_download.js
-rw-r----- 1 allan allan 29626 Sep 21 21:16 s_code.js

examples/src/main/scala/scala/swing/examples/tutorials/resources/Styled
Text Sample_files:
total 40
-rw-r----- 1 allan allan 1638 Sep 21 21:16 dukeWaveRed.gif
-rw-r----- 1 allan allan 1656 Sep 21 21:16 s_code_download.js
-rw-r----- 1 allan allan 29626 Sep 21 21:16 s_code.js

examples/src/main/scala/scala/swing/examples/tutorials/resources/swingtutorial_files:
total 36
-rw-r----- 1 allan allan 1656 Sep 21 21:16 s_code_download.js
-rw-r----- 1 allan allan 29626 Sep 21 21:16 s_code.js

examples/src/main/scala/scala/swing/examples/tutorials/resources/TreeDemoHelp_files:
total 36
-rw-r----- 1 allan allan 1656 Sep 21 21:16 s_code_download.js
-rw-r----- 1 allan allan 29626 Sep 21 21:16 s_code.js

examples/src/main/scala/scala/swing/examples/tutorials/resources/tutorialcont_files:
total 36
-rw-r----- 1 allan allan 1656 Sep 21 21:16 s_code_download.js
-rw-r----- 1 allan allan 29626 Sep 21 21:16 s_code.js

examples/src/main/scala/scala/swing/examples/tutorials/resources/tutorial_files:
total 36
-rw-r----- 1 allan allan 1656 Sep 21 21:16 s_code_download.js
-rw-r----- 1 allan allan 29626 Sep 21 21:16 s_code.js

examples/src/main/scala/scala/swing/examples/tutorials/resources/vm_files:
total 36
-rw-r----- 1 allan allan 1656 Sep 21 21:16 s_code_download.js
-rw-r----- 1 allan allan 29626 Sep 21 21:16 s_code.js

examples/src/main/scala/scala/swing/examples/tutorials/scala:
total 4
drwxrwxr-x 2 allan allan 4096 Sep 21 21:20 components

examples/src/main/scala/scala/swing/examples/tutorials/scala/components:
total 396
-rw-rw-r-- 1 allan allan 4343 Sep 21 21:13 ButtonDemo.scala
-rw-rw-r-- 1 allan allan 6236 Sep 21 21:13 CheckboxDemo.scala
-rw-rw-r-- 1 allan allan 3573 Sep 21 21:13 ColorChooserDemo.scala
-rw-rw-r-- 1 allan allan 4837 Sep 21 21:13 ComboBoxDemo2.scala
-rw-rw-r-- 1 allan allan 4356 Sep 21 21:13 ComboBoxDemo.scala
-rw-rw-r-- 1 allan allan 1885 Sep 21 21:13 Corner.scala
-rw-rw-r-- 1 allan allan 5337 Sep 21 21:13 CustomComboBoxDemo.scala
-rw-rw-r-- 1 allan allan 19056 Sep 21 21:13 DialogDemo.scala
-rw-rw-r-- 1 allan allan 2967 Sep 21 21:13 DocumentSizeFilter.scala
-rw-rw-r-- 1 allan allan 4577 Sep 21 21:13 FileChooserDemo.scala
-rw-rw-r-- 1 allan allan 6605 Sep 21 21:13 FormattedTextFieldDemo.scala
-rw-rw-r-- 1 allan allan 9892 Sep 21 21:13 FrameDemo2.scala
-rw-rw-r-- 1 allan allan 2583 Sep 21 21:13 FrameDemo.scala
-rw-rw-r-- 1 allan allan 4605 Sep 21 21:13 HtmlDemo.scala
-rw-rw-r-- 1 allan allan 8064 Sep 21 21:13 IconDemoApp.scala
-rw-rw-r-- 1 allan allan 3868 Sep 21 21:13 LabelDemo.scala
-rw-rw-r-- 1 allan allan 6575 Sep 21 21:13 ListDemo.scala
-rw-rw-r-- 1 allan allan 5077 Sep 21 21:13 ListDialogRunner.scala
-rw-rw-r-- 1 allan allan 6099 Sep 21 21:13 ListDialog.scala
-rw-rw-r-- 1 allan allan 8390 Sep 21 21:13 MenuDemo.scala
-rw-rw-r-- 1 allan allan 3367 Sep 21 21:13 MenuGlueDemo.scala
-rw-rw-r-- 1 allan allan 6933 Sep 21 21:13 MenuLookDemo.scala
-rw-rw-r-- 1 allan allan 2733 Sep 21 21:13 MissingIcon.scala
-rw-rw-r-- 1 allan allan 3302 Sep 21 21:13 PasswordDemo.scala
-rw-rw-r-- 1 allan allan 9991 Sep 21 21:13 PopupMenuDemo.scala
-rw-rw-r-- 1 allan allan 5421 Sep 21 21:13 RadioButtonDemo.scala
-rw-rw-r-- 1 allan allan 4614 Sep 21 21:13 Rule.scala
-rw-rw-r-- 1 allan allan 3932 Sep 21 21:13 ScrollablePicture.scala
-rw-rw-r-- 1 allan allan 5476 Sep 21 21:13 ScrollDemo.scala
-rw-rw-r-- 1 allan allan 4133 Sep 21 21:13 SimpleTableDemo.scala
-rw-rw-r-- 1 allan allan 6013 Sep 21 21:13 SimpleTableSelectionDemo.scala
-rw-rw-r-- 1 allan allan 4515 Sep 21 21:13 SizeDisplayer.scala
-rw-rw-r-- 1 allan allan 6482 Sep 21 21:13 SliderDemo2.scala
-rw-rw-r-- 1 allan allan 6434 Sep 21 21:13 SliderDemo.scala
-rw-rw-r-- 1 allan allan 4413 Sep 21 21:13 SplitPaneDemo2.scala
-rw-rw-r-- 1 allan allan 4770 Sep 21 21:13 SplitPaneDemo.scala
-rw-rw-r-- 1 allan allan 4184 Sep 21 21:13 SplitPaneDividerDemo.scala
-rw-rw-r-- 1 allan allan 4405 Sep 21 21:13 TabbedPaneDemo.scala
-rw-rw-r-- 1 allan allan 5464 Sep 21 21:13 TableDemo.scala
-rw-rw-r-- 1 allan allan 5875 Sep 21 21:13 TableFTFEditDemo.scala
-rw-rw-r-- 1 allan allan 6090 Sep 21 21:13 TablePrintDemo.scala
-rw-rw-r-- 1 allan allan 10641 Sep 21 21:13 TableSelectionDemo.scala
-rw-rw-r-- 1 allan allan 6819 Sep 21 21:13 TableSortDemo.scala
-rw-rw-r-- 1 allan allan 14857 Sep 21 21:13 TextComponentDemo.scala
-rw-rw-r-- 1 allan allan 3367 Sep 21 21:13 TextDemo.scala
-rw-rw-r-- 1 allan allan 12043 Sep 21 21:13 TextSamplerDemo.scala
-rw-rw-r-- 1 allan allan 3074 Sep 21 21:13 TopLevelDemo.scala
-rw-rw-r-- 1 allan allan 9875 Sep 21 21:13 TumbleItem.scala
-rw-rw-r-- 1 allan allan 2448 Sep 21 21:13 Utils.scala

On 09/21/2014 10:27 AM, Andy Hicks wrote:

Hi Allan

That sounds really great :-)

If you havent done so, can you 'sign' the Scala CLA
http://typesafe.com/contribute/cla/scala ( a bit more detail
https://github.com/scala/scala/blob/2.11.x/CONTRIBUTING.md )

I would suggest adding them to the folder
scala-swing/examples/src/main/scala/scala/swing/examples/tutorials in the
java7 branch. (unless you can think of something better)

Andy

On 19 September 2014 16:39, Allan Jacobs [email protected]
wrote:

Hi Andy,

I have converted the majority of the Swing demos at

http://docs.oracle.com/javase/tutorial/uiswing/examples/components/index.html
to use Swing scala. Do you have a use for this?

The conversion is deliberately close to the Java (a) so that the
discussions in the tutorial can still be followed and (b) calls to use
scala swing component peers disclosed missing features in Scala swing.
Two of the demos required baby versions of scala.swing components that
are not in the library yet. I skipped sixteen of the component demos
(so far) for lack of scala.swing support of some feature or other.

Allan

On 09/07/2014 05:17 AM, Andy Hicks wrote:

Hi Allen

Yes, I've been given commit access to scala-swing and given some
spare
time
home to fix some of it. I'm also looking into trying to get some test
working
So now pull request will now be seriously looked at, but mainly
for the
'java7' branch. Help and changes will be much appreciated :-)

As for, "will it be in 2.12"? That's still open, I think it will
depend
on the changes that have been made by the time 2.12 is released.
Either way
there will still be a scala-swing.jar in a repo somewhere that
will be
usable.

Andy

On 6 September 2014 17:32, Allan Jacobs [email protected]
wrote:

Hi Andy,

Have you taken over the job of maintaining the module? There is
a page
in scala-lang.org that says that it is going away in 2.12 for
lack of
a
maintainer.

On 09/02/2014 11:53 AM, Andy Hicks wrote:

Hi Allan
Thanks for trying jdk9 out and I'm pleased it's such a small
change
without
having to fork it (again).

I'll do the change in the next couple of days, (or please
create a
pull
request)

On 2 September 2014 00:31, Allan Jacobs
[email protected]
wrote:

I forgot to mention the branch I used: java7. The one line
change is
backwards compatible with JDK 1.7.0_51, so a separate java9
branch is
overkill.


Reply to this email directly or view it on GitHub

<#15 (comment)
.


Reply to this email directly or view it on GitHub

#15 (comment).


Reply to this email directly or view it on GitHub

<#15 (comment)
.


Reply to this email directly or view it on GitHub

#15 (comment).


Reply to this email directly or view it on GitHub
#15 (comment).


Reply to this email directly or view it on GitHub
#15 (comment).

@retronym
Copy link
Member

IANAL, but but doesn't seem to me that the Java Swing demo's are suitably licensed for us to include a derivative work with Scala. WDYT?

@Sciss
Copy link
Contributor

Sciss commented Sep 22, 2014

Why? It's basically a BSD-style license. In any case, neither source nor binary should go into scala-swing.jar which should only contain the library you want to link to. It could be easily made available through a dedicated jar/sub-project.

For reasons of clarity and simplicity, I would not include Java files. From your list, it looks like you have only one file. Better convert it to a Scala equivalent.

@retronym
Copy link
Member

You are right, I didn't read the "with or without modification" part. So long as we retain the Oracle copyright in addition to the standard Scala copyright, things should be okay.

@andy1138
Copy link
Contributor Author

In the IANAL sections - ya we should keep a copy of the Oracle copyright
and to make it more useful by including a link to the java tutorial that
uses it.

I'm cant find a github repo with the code yet so this is a little
second-guessing and probably picking the 'worst cast' :-(

  • I think we may have to have a rethink on the directories as it beginning
    to look messy with lots duplicates (
    examples/src/main/scala/scala/swing/examples/tutorials/resources could be
    examples/src/main/resources/tutorials ) or we have a new sub-project called
    'tutorials'. Open to suggestions.
  • I'm worried about including any java code. That doesn't sound like a good
    example of scala-swing
  • Non-working code should be raised as an issue and concluded that way (if
    its not working there there is probably something wrong/missing from
    scala-swing.jar and should be fixed)
  • The examples should be scala-fied, things like dukeWaveRed.gif should be
    scala-logo.gif and book examples should be scala books (probably other
    things)
  • (I cant figure out what all the .js files are for :-)

If you create a fork with the code in I'm more than happy to help

On 22 September 2014 06:52, Jason Zaugg [email protected] wrote:

You are right, I didn't read the "with or without modification" part. So
long as we retain the Oracle copyright in addition to the standard Scala
copyright, things should be okay.


Reply to this email directly or view it on GitHub
#15 (comment).

@SethTisue
Copy link
Member

@Sciss should this ticket remain open?

@Sciss
Copy link
Contributor

Sciss commented Jan 30, 2019

With respect to the ticket's title; I can cross compile under JDK 11, so I would assume that there are no pending necessary changes regarding generification. In that sense I guess the ticket can be closed.

I would like to ask @jacobsallan if you are still interested in contributing your tutorials. That should go into a separate PR, however. I can see that you have extra branches in your fork; you could try to rebase them if necessary. There is an open ticket #68 regarding contributions, but last status was that it's still advisable to have the CLA signed. Perhaps @SethTisue could help identifying how to proceed there. I'm closing this issue now, so please for the tutorials open a new one or submit the PR directly.

@Sciss Sciss closed this as completed Jan 30, 2019
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

No branches or pull requests

5 participants