-
Notifications
You must be signed in to change notification settings - Fork 0
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
Some more code cleanup in tutorials #3
Conversation
The merge should be pushed into https://github.com/jacobsallan/scala-swing branch swingtut now. The demos that use createImageIcon have already been altered, so most of the merge was easy. I also changed the scaladoc so that the urls are enclosed in double-brackets. One thing you caught this time that is not completely addressed is when xLayoutAlignment is set to a double instead of a constant from java.awt.Component. I've checked in changes to the orientation of split panes. The orientation in scala-swing's SplitPane constructor is the orientation of the divider and is 90 degrees off from Java swing's. I've changed the tutorials so the visual display is correct. There are some peer usages removed, too. But, I think I'm done with these. Any more is going to required either more scala-swing knowledge than I have or changes to scala-swing. |
The merge was not bad at all. Should the examples with peer's be moved Two of the demos with setLabelFor problems can be saved for release by examples/tutorials/layout/FlowLayoutDemo.scala may never be fixed to go $ find examples -type f -print -exec grep peer {} ; On 10/01/2014 08:12 AM, Andy Hicks wrote:
|
Thanks, As for using peer. - scala-swing should be a wrapper for java-swing and the This may be more of a problem with things like repaint but I'm leaving that I think the examples/tutorials should show nice ways that people should use On 1 October 2014 21:03, Allan Jacobs [email protected] wrote:
|
Let's fix the labelFor in a separate branch off of java7. The fix Allan On 10/02/2014 02:19 AM, Andy Hicks wrote:
|
Doing a separate branch and pull request for the labelFor (and other On 2 October 2014 21:04, Allan Jacobs [email protected] wrote:
|
Hi Andy, I went through the demos looking at all the uses of peer components. Some of the demos require new components analogous to The TextComponentDemo will require more work and require special The other issue raised by the demo for which a fix is non-trivial is the Enhancement #1Add member functions to scala.swing.Action that get and set Enhancement #2Add a new component Box to wrap javax.swing.Box. It should be possible Enhancement #3Add to scala.swing.UIElement wrappers for the javax.swing.JComponent methods Enhancement #4Add to scala.swing.UIElement wrappers for the javax.swing.JComponent methods Enhancement scala#5Add to scala.swing.UIElement wrappers for the javax.swing.JComponent method Enhancement scala#6Add to scala.swing.UIElement replacements for the javax.swing.JComponent Enhancement scala#7In scala.swing.AbstractButton, scala.swing.TextComponent, and Enhancement scala#8Add to scala.swing.TextComponent wrappers for Enhancement scala#9In scala.swing.RichWindow, in the class Dialog Enhancement scala#10In scala.swing.RichWindow for the class Frame, add an analogue to Enhancement scala#11In scala.swing.ListView, add an analogue for the JList methods Enhancement scala#12Add a mechanism to determine whether or not a mouse event is associated Enhancement scala#13In scala.swing.Label, add analogues for JLabel instance methods Enhancement scala#14Add to scala.swing.ScrollPane a wrapper for the javax.swing.JScrollPane Enhancement scala#15Add to scala.swing.ScrollPane a wrapper for the javax.swing.JScrollPane Enhancement scala#16In scala.swing.ComboBox add wrappers for Enhancement scala#17In scala.swing.Table add a wrapper for Enhancement scala#18In scala.swing.Table add wrappers for Enhancement scala#19In scala.swing.Table wrappers for On 10/03/2014 02:13 AM, Andy Hicks wrote:
|
Hi I've just done a pull request for the last of the tutorials that are not Thanks for the list of enhancements,
It may be possible to add Accessibility to Component either directly or as When you've removed the tutorials using .peer from the pull request then On 4 October 2014 06:21, Allan Jacobs [email protected] wrote:
|
Hello, All references to peer are removed from my swingtut branch. Pull into The deleted code is saved away in a local branch. Where do you plan to Allan On 10/05/2014 03:11 AM, Andy Hicks wrote:
|
All pulled :-) thanks For the others, I'm hoping it will be like this: This may be the simple case but hope that gives the idea. PS: I'm still working on trying to setup some kind of unit testing, so that may also get added at some point. |
Hi, some more :-)
I've done all examples down to 'I', hope they are ok, and haven't broken anything
The two I had problems with where FormattedTextFieldDemo, FrameDemo2. I think they both have functions missing from scala-swing. What we could do is move them into a issue saying 'functions x needed' or if easier just create a separate pull request for them (assuming you can't get them working without 'peer.xx' etc)
(even found some errors in the original java code :-) )