Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-329

Automatic conversion of acceleratorKey in SwingBuilder

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.0-beta-4
    • 1.0-beta-6
    • None
    • None

    Description

      In order to create an action with an accelerator key, it is necessary to pass it an javax.swing.KeyStroke. It would be more convinient if the action could receive a string and convert it to a KeyStroke automatically.

      Currently:

      action( name: "Exit",
      keyStroke: new javax.swing.KeyStroke( "control X" ),
      closure:

      { System.exit(0) }
      )


      After improvement:

      action( name: "Exit",
      keyStroke: "control X",
      closure: { System.exit(0) }

      )

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            slobberchops Rapheal Kaplan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified