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

Need way to truly veto loss of focus (vs. simply regain it in focusLost method)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1, 1.2.1
    • client-libs
    • generic, x86
    • generic, windows_95



      Name: krT82822 Date: 03/24/99


      orig synopsis: "Focus Management and event dispatching dependencies"

      This is a MUCH needed enhancement for the AWT focus management.

      There really needs to be a way of Vetoing a loseFocus event on
      a GUI control. A veto would result in gainFocus, tab key events,
      and clicked events to NEVER make it to another GUI control.

      Here is an outline that describes the problem:

      A gui control is placed on a panel, inside a window. Lets say
      this control is a text field. The text value of this field needs
      to be validated that it is a string representation of a Date.

      If the value entered by the user is "ABC" and they then click on
      a button. We want to display an error message that indicates they
      have not typed a valid date and keep focus on that control WITHOUT
      triggering the clicked event of the button. So if validation does
      not pass on the control and a lose focus event occurs AND that
      event gets vetoed, the clicked needs to either be pulled off the
      event queue or never placed on the event queue until the lose focus
      has been processed successfully.
      (Review ID: 56026)
      ======================================================================

            dmendenhsunw David Mendenhall (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: