Class BridgeEventSupport.Listener

    • Field Detail

      • lastTargetElement

        protected org.w3c.dom.Element lastTargetElement
      • isDown

        protected boolean isDown
    • Method Detail

      • dispatchKeyEvent

        protected void dispatchKeyEvent​(java.lang.String eventType,
                                        GraphicsNodeKeyEvent evt)
        Dispatch a DOM 2 Draft Key event.
      • mapKeyCode

        protected final int mapKeyCode​(int keyCode)
        The java KeyEvent keyCodes and the DOMKeyEvent keyCodes map except for the VK_ENTER code (which has a different value in DOM and the VK_KANA_LOCK and VK_INPUT_METHOD_ON_OFF which have no DOM equivalent.
      • dispatchMouseEvent

        protected void dispatchMouseEvent​(java.lang.String eventType,
                                          GraphicsNodeMouseEvent evt,
                                          boolean cancelable)
        Dispatches a DOM MouseEvent according to the specified parameters.
        Parameters:
        eventType - the event type
        evt - the GVT GraphicsNodeMouseEvent
        cancelable - true means the event is cancelable
      • dispatchMouseEvent

        protected void dispatchMouseEvent​(java.lang.String eventType,
                                          org.w3c.dom.Element targetElement,
                                          org.w3c.dom.Element relatedElement,
                                          java.awt.Point clientXY,
                                          GraphicsNodeMouseEvent evt,
                                          boolean cancelable)
        Dispatches a DOM MouseEvent according to the specified parameters.
        Parameters:
        eventType - the event type
        targetElement - the target of the event
        relatedElement - the related target if any
        clientXY - the mouse coordinates in the client space
        evt - the GVT GraphicsNodeMouseEvent
        cancelable - true means the event is cancelable
      • getRelatedElement

        protected org.w3c.dom.Element getRelatedElement​(GraphicsNodeMouseEvent evt)
        Returns the related element according to the specified event.
        Parameters:
        evt - the GVT GraphicsNodeMouseEvent
      • getEventTarget

        protected org.w3c.dom.Element getEventTarget​(GraphicsNode node,
                                                     java.awt.geom.Point2D pt)
        Returns the element that is the target of the specified event or null if any.
        Parameters:
        node - the graphics node that received the event
        pt - the mouse coordinates in the GVT tree space