Issue Details (XML | Word | Printable)

Key: GROOVY-501
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Guillaume Laforge
Reporter: Danno Ferrin
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
groovy

SwingBuilder - add more components to support ButtonDemo

Created: 26/May/04 12:06 AM   Updated: 14/Jul/04 03:15 PM   Resolved: 14/Jul/04 03:15 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0-beta-6

Time Tracking:
Not Specified

File Attachments: 1. File ButtonDemo.groovy (8 kB)
2. Java Source File SwingBuilder.java (28 kB)
3. Text File swingbuilderboxy-patch-unix.txt (13 kB)
4. Text File swingbuilderboxy-patch.txt (13 kB)



 Description  « Hide

For a test of the relative size and ease of a Groovy swing applicaiton I though of re-implementing the SwingSet from the JFC demos in groovy. It wound up being about a third of the size of the original!

To do a really groovy job I needed to add some more items and concepts to the SwingBuilder.jar.

notable changes:

  • add more methiods from javax.swing.Box for glue, struts, and rigid areas
  • add buttonGroup case for AbstractButtons so we don't have to dive into the model to set a button group on a checkBox or radioButton

tweaks:

  • add support for adding components to a tabbed pane explicitly
  • introduce some "pass through nodes" where the widget is not nesscicarily created but provided by the user (an elaboration of the widget() node from GROOVY-333) they are widget, action, and tableModel.
  • refactor code where attribures are set as java beans proeprties on the widget.

This patch may contain stuff from the GROOVY-333 patch. I don't thuink it's been applied yet.

Also, ButtonDemo.groovy is the portion of the Buttons tab from SwingSet in ButtonDemo.java, sans the images.



Danno Ferrin added a comment - 13/Jul/04 11:11 PM

strange, the patch file in cygwin liked it just fine. is it \r\n vs. \n? If so I did unix lin endingx in the -unix patch, otherwise I attached the entire file as well.


Guillaume Laforge added a comment - 14/Jul/04 03:15 PM

Patch applied, thank you Danno.
Could you also have a look back at GROOVY-333, to see if some of its enhancements could be added ?