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

RFE: Signal-Handling for catching events

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: specification
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: rlT66838 Date: 03/29/2000


      java version "1.2.2"
      Classic VM (build 1.2.2-I, green threads, javacomp)


      It would be nice, if the Java-Language would support Signal's in away, similar
      to the Qt-Library (http://doc.trolltech.com/signalsandslots.html).

      A signal in Java should be a method, that will not be implemented, like an
      abstract method:

      public signal int foo (int a);

      This signal can be called in the class, whenever an special event occurs. The
      signal can be assigned to any other method with the same signature:

      public int bar (int a) {...}

      ...
      connect (bar(), otherClass.foo());

      Now will be executed the connected method every time the signal will be called,
      until the method is disconnected to the signal.

      This signal-system can be used for instance for a button ... the button class
      can declare a signal isClicked(), that will be called every time the button is
      clicked. I think, this is easier to use, than the ...Listener-Interfaces.
      (Review ID: 103032)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              abuckley Alex Buckley
              Reporter:
              rlewis Roger Lewis (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: