Class Event.NativePreviewEvent

    • Constructor Detail

      • NativePreviewEvent

        public NativePreviewEvent()
    • Method Detail

      • cancel

        public void cancel()
        Cancel the native event and prevent it from firing. Note that the event can still fire if another handler calls consume(). Classes overriding this method should still call super.cancel().
      • consume

        public void consume()
        Consume the native event and prevent it from being canceled, even if it has already been canceled by another handler. Event.NativePreviewHandler that fire first have priority over later handlers, so all handlers should check if the event has already been canceled before calling this method.
      • getTypeInt

        public final int getTypeInt()
        Gets the type int corresponding to the native event that triggered this preview.
        Returns:
        the type int associated with this native event
      • isCanceled

        public boolean isCanceled()
        Has the event already been canceled? Note that isConsumed() will still return true if the native event has also been consumed.
        Returns:
        true if the event has been canceled
        See Also:
        cancel()
      • isConsumed

        public boolean isConsumed()
        Has the native event been consumed? Note that isCanceled() will still return true if the native event has also been canceled.
        Returns:
        true if the event has been consumed
        See Also:
        consume()
      • isFirstHandler

        public boolean isFirstHandler()
        Is the current handler the first to preview this event?
        Returns:
        true if the current handler is the first to preview the event