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

Hiding a Stage cannot be cancelled in the onHiding's handle method

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Labels:
    • Environment:

      Windows7

      Description

      After setting an EventHandler to a Stage via setOnHiding(...) the Stage is unconditionally hidden when the handler's handle(...) method returns. IMO the primary purpose of differentiating between onHiding and onHidden is to permit canceling the hiding in the former.

      Perhaps this could be implemented by not hiding the Stage if the WindowEvent is consume()d in the onHiding handler, or maybe by providing a defaultCloseOperation as in Swing's top level windows.

      The first suggested approach could facilitate conditionally consume()ing a WindowEvent.WINDOW_HIDING in an EventFilter to prevent the window from being closed.

      Discussion here: http://forums.oracle.com/forums/thread.jspa?threadID=2245058

      db

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lnerad Ľubomír Nerád
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: