Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6470683

Add SourcesActionEvents Interface

    XMLWordPrintable

Details

    Description

      A DESCRIPTION OF THE REQUEST :
      Please add this class

      package javax.swing;
      public interface SourcesActionEvents {
          public void addActionListener(ActionListener l);
          public void removeActionListener(ActionListener l);
      }

      Then have all widgets with addActionListener implement this new interface. The Google Web Toolkit did this, and it now allows awesome programming of unit tests using mocklibraries. Check out the gwtMockLib for an example here......

      http://mocklib.sourceforge.net

      Please do this for all Swing events as well. Otherwise, I end up with a ListenerManager(see GwtMockLib example) that has multiple addActionListener methods that take different Swing components. This would be great for test first GUI development!!!!!

      JUSTIFICATION :
      Make unit testing and would allow the test to simulate events. See the GwtMockLib example at http://mocklib.sourceforge.net.

      Attachments

        Activity

          People

            svioletsunw Scott Violet (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: