类sun.awt.AWTAccessor.MouseEventAccessor源码实例Demo

下面列出了怎么用sun.awt.AWTAccessor.MouseEventAccessor的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: dragonwell8_jdk   文件: Autoscroller.java
/**
 * ActionListener method. Invoked when the Timer fires. This will scroll
 * if necessary.
 */
public void actionPerformed(ActionEvent x) {
    JComponent component = Autoscroller.component;

    if (component == null || !component.isShowing() || (event == null)) {
        _stop(component);
        return;
    }
    Point screenLocation = component.getLocationOnScreen();
    MouseEvent e = new MouseEvent(component, event.getID(),
                                  event.getWhen(), event.getModifiers(),
                                  event.getX() - screenLocation.x,
                                  event.getY() - screenLocation.y,
                                  event.getXOnScreen(),
                                  event.getYOnScreen(),
                                  event.getClickCount(),
                                  event.isPopupTrigger(),
                                  MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(e,
        meAccessor.isCausedByTouchEvent(event));
    component.superProcessMouseMotionEvent(e);
}
 
源代码2 项目: dragonwell8_jdk   文件: BasicComboPopup.java
/**
 * Creates the JList used in the popup to display
 * the items in the combo box model. This method is called when the UI class
 * is created.
 *
 * @return a <code>JList</code> used to display the combo box items
 */
protected JList createList() {
    return new JList( comboBox.getModel() ) {
        public void processMouseEvent(MouseEvent e)  {
            if (BasicGraphicsUtils.isMenuShortcutKeyDown(e))  {
                // Fix for 4234053. Filter out the Control Key from the list.
                // ie., don't allow CTRL key deselection.
                Toolkit toolkit = Toolkit.getDefaultToolkit();
                MouseEvent newEvent = new MouseEvent(
                                   (Component)e.getSource(), e.getID(), e.getWhen(),
                                   e.getModifiers() ^ toolkit.getMenuShortcutKeyMask(),
                                   e.getX(), e.getY(),
                                   e.getXOnScreen(), e.getYOnScreen(),
                                   e.getClickCount(),
                                   e.isPopupTrigger(),
                                   MouseEvent.NOBUTTON);
                MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
                meAccessor.setCausedByTouchEvent(newEvent,
                    meAccessor.isCausedByTouchEvent(e));
                e = newEvent;
            }
            super.processMouseEvent(e);
        }
    };
}
 
源代码3 项目: dragonwell8_jdk   文件: BasicComboPopup.java
protected MouseEvent convertMouseEvent( MouseEvent e ) {
    Point convertedPoint = SwingUtilities.convertPoint( (Component)e.getSource(),
                                                        e.getPoint(), list );
    MouseEvent newEvent = new MouseEvent( (Component)e.getSource(),
                                          e.getID(),
                                          e.getWhen(),
                                          e.getModifiers(),
                                          convertedPoint.x,
                                          convertedPoint.y,
                                          e.getXOnScreen(),
                                          e.getYOnScreen(),
                                          e.getClickCount(),
                                          e.isPopupTrigger(),
                                          MouseEvent.NOBUTTON );
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    return newEvent;
}
 
源代码4 项目: TencentKona-8   文件: Autoscroller.java
/**
 * ActionListener method. Invoked when the Timer fires. This will scroll
 * if necessary.
 */
public void actionPerformed(ActionEvent x) {
    JComponent component = Autoscroller.component;

    if (component == null || !component.isShowing() || (event == null)) {
        _stop(component);
        return;
    }
    Point screenLocation = component.getLocationOnScreen();
    MouseEvent e = new MouseEvent(component, event.getID(),
                                  event.getWhen(), event.getModifiers(),
                                  event.getX() - screenLocation.x,
                                  event.getY() - screenLocation.y,
                                  event.getXOnScreen(),
                                  event.getYOnScreen(),
                                  event.getClickCount(),
                                  event.isPopupTrigger(),
                                  MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(e,
        meAccessor.isCausedByTouchEvent(event));
    component.superProcessMouseMotionEvent(e);
}
 
源代码5 项目: TencentKona-8   文件: BasicComboPopup.java
/**
 * Creates the JList used in the popup to display
 * the items in the combo box model. This method is called when the UI class
 * is created.
 *
 * @return a <code>JList</code> used to display the combo box items
 */
protected JList createList() {
    return new JList( comboBox.getModel() ) {
        public void processMouseEvent(MouseEvent e)  {
            if (BasicGraphicsUtils.isMenuShortcutKeyDown(e))  {
                // Fix for 4234053. Filter out the Control Key from the list.
                // ie., don't allow CTRL key deselection.
                Toolkit toolkit = Toolkit.getDefaultToolkit();
                MouseEvent newEvent = new MouseEvent(
                                   (Component)e.getSource(), e.getID(), e.getWhen(),
                                   e.getModifiers() ^ toolkit.getMenuShortcutKeyMask(),
                                   e.getX(), e.getY(),
                                   e.getXOnScreen(), e.getYOnScreen(),
                                   e.getClickCount(),
                                   e.isPopupTrigger(),
                                   MouseEvent.NOBUTTON);
                MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
                meAccessor.setCausedByTouchEvent(newEvent,
                    meAccessor.isCausedByTouchEvent(e));
                e = newEvent;
            }
            super.processMouseEvent(e);
        }
    };
}
 
源代码6 项目: TencentKona-8   文件: BasicComboPopup.java
protected MouseEvent convertMouseEvent( MouseEvent e ) {
    Point convertedPoint = SwingUtilities.convertPoint( (Component)e.getSource(),
                                                        e.getPoint(), list );
    MouseEvent newEvent = new MouseEvent( (Component)e.getSource(),
                                          e.getID(),
                                          e.getWhen(),
                                          e.getModifiers(),
                                          convertedPoint.x,
                                          convertedPoint.y,
                                          e.getXOnScreen(),
                                          e.getYOnScreen(),
                                          e.getClickCount(),
                                          e.isPopupTrigger(),
                                          MouseEvent.NOBUTTON );
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    return newEvent;
}
 
源代码7 项目: JDKSourceCode1.8   文件: Autoscroller.java
/**
 * ActionListener method. Invoked when the Timer fires. This will scroll
 * if necessary.
 */
public void actionPerformed(ActionEvent x) {
    JComponent component = Autoscroller.component;

    if (component == null || !component.isShowing() || (event == null)) {
        _stop(component);
        return;
    }
    Point screenLocation = component.getLocationOnScreen();
    MouseEvent e = new MouseEvent(component, event.getID(),
                                  event.getWhen(), event.getModifiers(),
                                  event.getX() - screenLocation.x,
                                  event.getY() - screenLocation.y,
                                  event.getXOnScreen(),
                                  event.getYOnScreen(),
                                  event.getClickCount(),
                                  event.isPopupTrigger(),
                                  MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(e,
        meAccessor.isCausedByTouchEvent(event));
    component.superProcessMouseMotionEvent(e);
}
 
源代码8 项目: JDKSourceCode1.8   文件: BasicComboPopup.java
/**
 * Creates the JList used in the popup to display
 * the items in the combo box model. This method is called when the UI class
 * is created.
 *
 * @return a <code>JList</code> used to display the combo box items
 */
protected JList createList() {
    return new JList( comboBox.getModel() ) {
        public void processMouseEvent(MouseEvent e)  {
            if (BasicGraphicsUtils.isMenuShortcutKeyDown(e))  {
                // Fix for 4234053. Filter out the Control Key from the list.
                // ie., don't allow CTRL key deselection.
                Toolkit toolkit = Toolkit.getDefaultToolkit();
                MouseEvent newEvent = new MouseEvent(
                                   (Component)e.getSource(), e.getID(), e.getWhen(),
                                   e.getModifiers() ^ toolkit.getMenuShortcutKeyMask(),
                                   e.getX(), e.getY(),
                                   e.getXOnScreen(), e.getYOnScreen(),
                                   e.getClickCount(),
                                   e.isPopupTrigger(),
                                   MouseEvent.NOBUTTON);
                MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
                meAccessor.setCausedByTouchEvent(newEvent,
                    meAccessor.isCausedByTouchEvent(e));
                e = newEvent;
            }
            super.processMouseEvent(e);
        }
    };
}
 
源代码9 项目: JDKSourceCode1.8   文件: BasicComboPopup.java
protected MouseEvent convertMouseEvent( MouseEvent e ) {
    Point convertedPoint = SwingUtilities.convertPoint( (Component)e.getSource(),
                                                        e.getPoint(), list );
    MouseEvent newEvent = new MouseEvent( (Component)e.getSource(),
                                          e.getID(),
                                          e.getWhen(),
                                          e.getModifiers(),
                                          convertedPoint.x,
                                          convertedPoint.y,
                                          e.getXOnScreen(),
                                          e.getYOnScreen(),
                                          e.getClickCount(),
                                          e.isPopupTrigger(),
                                          MouseEvent.NOBUTTON );
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    return newEvent;
}
 
源代码10 项目: openjdk-jdk8u   文件: Autoscroller.java
/**
 * ActionListener method. Invoked when the Timer fires. This will scroll
 * if necessary.
 */
public void actionPerformed(ActionEvent x) {
    JComponent component = Autoscroller.component;

    if (component == null || !component.isShowing() || (event == null)) {
        _stop(component);
        return;
    }
    Point screenLocation = component.getLocationOnScreen();
    MouseEvent e = new MouseEvent(component, event.getID(),
                                  event.getWhen(), event.getModifiers(),
                                  event.getX() - screenLocation.x,
                                  event.getY() - screenLocation.y,
                                  event.getXOnScreen(),
                                  event.getYOnScreen(),
                                  event.getClickCount(),
                                  event.isPopupTrigger(),
                                  MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(e,
        meAccessor.isCausedByTouchEvent(event));
    component.superProcessMouseMotionEvent(e);
}
 
源代码11 项目: openjdk-jdk8u   文件: BasicComboPopup.java
/**
 * Creates the JList used in the popup to display
 * the items in the combo box model. This method is called when the UI class
 * is created.
 *
 * @return a <code>JList</code> used to display the combo box items
 */
protected JList createList() {
    return new JList( comboBox.getModel() ) {
        public void processMouseEvent(MouseEvent e)  {
            if (BasicGraphicsUtils.isMenuShortcutKeyDown(e))  {
                // Fix for 4234053. Filter out the Control Key from the list.
                // ie., don't allow CTRL key deselection.
                Toolkit toolkit = Toolkit.getDefaultToolkit();
                MouseEvent newEvent = new MouseEvent(
                                   (Component)e.getSource(), e.getID(), e.getWhen(),
                                   e.getModifiers() ^ toolkit.getMenuShortcutKeyMask(),
                                   e.getX(), e.getY(),
                                   e.getXOnScreen(), e.getYOnScreen(),
                                   e.getClickCount(),
                                   e.isPopupTrigger(),
                                   MouseEvent.NOBUTTON);
                MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
                meAccessor.setCausedByTouchEvent(newEvent,
                    meAccessor.isCausedByTouchEvent(e));
                e = newEvent;
            }
            super.processMouseEvent(e);
        }
    };
}
 
源代码12 项目: openjdk-jdk8u   文件: BasicComboPopup.java
protected MouseEvent convertMouseEvent( MouseEvent e ) {
    Point convertedPoint = SwingUtilities.convertPoint( (Component)e.getSource(),
                                                        e.getPoint(), list );
    MouseEvent newEvent = new MouseEvent( (Component)e.getSource(),
                                          e.getID(),
                                          e.getWhen(),
                                          e.getModifiers(),
                                          convertedPoint.x,
                                          convertedPoint.y,
                                          e.getXOnScreen(),
                                          e.getYOnScreen(),
                                          e.getClickCount(),
                                          e.isPopupTrigger(),
                                          MouseEvent.NOBUTTON );
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    return newEvent;
}
 
源代码13 项目: openjdk-jdk8u-backup   文件: Autoscroller.java
/**
 * ActionListener method. Invoked when the Timer fires. This will scroll
 * if necessary.
 */
public void actionPerformed(ActionEvent x) {
    JComponent component = Autoscroller.component;

    if (component == null || !component.isShowing() || (event == null)) {
        _stop(component);
        return;
    }
    Point screenLocation = component.getLocationOnScreen();
    MouseEvent e = new MouseEvent(component, event.getID(),
                                  event.getWhen(), event.getModifiers(),
                                  event.getX() - screenLocation.x,
                                  event.getY() - screenLocation.y,
                                  event.getXOnScreen(),
                                  event.getYOnScreen(),
                                  event.getClickCount(),
                                  event.isPopupTrigger(),
                                  MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(e,
        meAccessor.isCausedByTouchEvent(event));
    component.superProcessMouseMotionEvent(e);
}
 
源代码14 项目: openjdk-jdk8u-backup   文件: BasicComboPopup.java
/**
 * Creates the JList used in the popup to display
 * the items in the combo box model. This method is called when the UI class
 * is created.
 *
 * @return a <code>JList</code> used to display the combo box items
 */
protected JList createList() {
    return new JList( comboBox.getModel() ) {
        public void processMouseEvent(MouseEvent e)  {
            if (BasicGraphicsUtils.isMenuShortcutKeyDown(e))  {
                // Fix for 4234053. Filter out the Control Key from the list.
                // ie., don't allow CTRL key deselection.
                Toolkit toolkit = Toolkit.getDefaultToolkit();
                MouseEvent newEvent = new MouseEvent(
                                   (Component)e.getSource(), e.getID(), e.getWhen(),
                                   e.getModifiers() ^ toolkit.getMenuShortcutKeyMask(),
                                   e.getX(), e.getY(),
                                   e.getXOnScreen(), e.getYOnScreen(),
                                   e.getClickCount(),
                                   e.isPopupTrigger(),
                                   MouseEvent.NOBUTTON);
                MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
                meAccessor.setCausedByTouchEvent(newEvent,
                    meAccessor.isCausedByTouchEvent(e));
                e = newEvent;
            }
            super.processMouseEvent(e);
        }
    };
}
 
源代码15 项目: openjdk-jdk8u-backup   文件: BasicComboPopup.java
protected MouseEvent convertMouseEvent( MouseEvent e ) {
    Point convertedPoint = SwingUtilities.convertPoint( (Component)e.getSource(),
                                                        e.getPoint(), list );
    MouseEvent newEvent = new MouseEvent( (Component)e.getSource(),
                                          e.getID(),
                                          e.getWhen(),
                                          e.getModifiers(),
                                          convertedPoint.x,
                                          convertedPoint.y,
                                          e.getXOnScreen(),
                                          e.getYOnScreen(),
                                          e.getClickCount(),
                                          e.isPopupTrigger(),
                                          MouseEvent.NOBUTTON );
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    return newEvent;
}
 
源代码16 项目: Bytecoder   文件: Autoscroller.java
/**
 * ActionListener method. Invoked when the Timer fires. This will scroll
 * if necessary.
 */
@SuppressWarnings("deprecation")
public void actionPerformed(ActionEvent x) {
    JComponent component = Autoscroller.component;

    if (component == null || !component.isShowing() || (event == null)) {
        _stop(component);
        return;
    }
    Point screenLocation = component.getLocationOnScreen();
    MouseEvent e = new MouseEvent(component, event.getID(),
                                  event.getWhen(), event.getModifiers(),
                                  event.getX() - screenLocation.x,
                                  event.getY() - screenLocation.y,
                                  event.getXOnScreen(),
                                  event.getYOnScreen(),
                                  event.getClickCount(),
                                  event.isPopupTrigger(),
                                  MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(e,
        meAccessor.isCausedByTouchEvent(event));
    component.superProcessMouseMotionEvent(e);
}
 
源代码17 项目: Bytecoder   文件: BasicComboPopup.java
/**
 * Creates the JList used in the popup to display
 * the items in the combo box model. This method is called when the UI class
 * is created.
 *
 * @return a <code>JList</code> used to display the combo box items
 */
protected JList<Object> createList() {
    return new JList<Object>( comboBox.getModel() ) {
        public void processMouseEvent(MouseEvent e)  {
            if (BasicGraphicsUtils.isMenuShortcutKeyDown(e))  {
                // Fix for 4234053. Filter out the Control Key from the list.
                // ie., don't allow CTRL key deselection.
                Toolkit toolkit = Toolkit.getDefaultToolkit();
                MouseEvent newEvent = new MouseEvent(
                                   (Component)e.getSource(), e.getID(), e.getWhen(),
                                   e.getModifiersEx() ^ toolkit.getMenuShortcutKeyMaskEx(),
                                   e.getX(), e.getY(),
                                   e.getXOnScreen(), e.getYOnScreen(),
                                   e.getClickCount(),
                                   e.isPopupTrigger(),
                                   MouseEvent.NOBUTTON);
                MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
                meAccessor.setCausedByTouchEvent(newEvent,
                    meAccessor.isCausedByTouchEvent(e));
                e = newEvent;
            }
            super.processMouseEvent(e);
        }
    };
}
 
源代码18 项目: Bytecoder   文件: BasicComboPopup.java
/**
 * Converts mouse event.
 *
 * @param e a mouse event
 * @return converted mouse event
 */
protected MouseEvent convertMouseEvent( MouseEvent e ) {
    Point convertedPoint = SwingUtilities.convertPoint( (Component)e.getSource(),
                                                        e.getPoint(), list );
    @SuppressWarnings("deprecation")
    MouseEvent newEvent = new MouseEvent( (Component)e.getSource(),
                                          e.getID(),
                                          e.getWhen(),
                                          e.getModifiers(),
                                          convertedPoint.x,
                                          convertedPoint.y,
                                          e.getXOnScreen(),
                                          e.getYOnScreen(),
                                          e.getClickCount(),
                                          e.isPopupTrigger(),
                                          MouseEvent.NOBUTTON );
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    return newEvent;
}
 
源代码19 项目: jdk8u_jdk   文件: Autoscroller.java
/**
 * ActionListener method. Invoked when the Timer fires. This will scroll
 * if necessary.
 */
public void actionPerformed(ActionEvent x) {
    JComponent component = Autoscroller.component;

    if (component == null || !component.isShowing() || (event == null)) {
        _stop(component);
        return;
    }
    Point screenLocation = component.getLocationOnScreen();
    MouseEvent e = new MouseEvent(component, event.getID(),
                                  event.getWhen(), event.getModifiers(),
                                  event.getX() - screenLocation.x,
                                  event.getY() - screenLocation.y,
                                  event.getXOnScreen(),
                                  event.getYOnScreen(),
                                  event.getClickCount(),
                                  event.isPopupTrigger(),
                                  MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(e,
        meAccessor.isCausedByTouchEvent(event));
    component.superProcessMouseMotionEvent(e);
}
 
源代码20 项目: jdk8u_jdk   文件: BasicComboPopup.java
/**
 * Creates the JList used in the popup to display
 * the items in the combo box model. This method is called when the UI class
 * is created.
 *
 * @return a <code>JList</code> used to display the combo box items
 */
protected JList createList() {
    return new JList( comboBox.getModel() ) {
        public void processMouseEvent(MouseEvent e)  {
            if (BasicGraphicsUtils.isMenuShortcutKeyDown(e))  {
                // Fix for 4234053. Filter out the Control Key from the list.
                // ie., don't allow CTRL key deselection.
                Toolkit toolkit = Toolkit.getDefaultToolkit();
                MouseEvent newEvent = new MouseEvent(
                                   (Component)e.getSource(), e.getID(), e.getWhen(),
                                   e.getModifiers() ^ toolkit.getMenuShortcutKeyMask(),
                                   e.getX(), e.getY(),
                                   e.getXOnScreen(), e.getYOnScreen(),
                                   e.getClickCount(),
                                   e.isPopupTrigger(),
                                   MouseEvent.NOBUTTON);
                MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
                meAccessor.setCausedByTouchEvent(newEvent,
                    meAccessor.isCausedByTouchEvent(e));
                e = newEvent;
            }
            super.processMouseEvent(e);
        }
    };
}
 
源代码21 项目: jdk8u_jdk   文件: BasicComboPopup.java
protected MouseEvent convertMouseEvent( MouseEvent e ) {
    Point convertedPoint = SwingUtilities.convertPoint( (Component)e.getSource(),
                                                        e.getPoint(), list );
    MouseEvent newEvent = new MouseEvent( (Component)e.getSource(),
                                          e.getID(),
                                          e.getWhen(),
                                          e.getModifiers(),
                                          convertedPoint.x,
                                          convertedPoint.y,
                                          e.getXOnScreen(),
                                          e.getYOnScreen(),
                                          e.getClickCount(),
                                          e.isPopupTrigger(),
                                          MouseEvent.NOBUTTON );
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    return newEvent;
}
 
void forwardEventToParent(MouseEvent e) {
    MouseEvent newEvent = new MouseEvent(
        getParent(), e.getID(), e.getWhen(), e.getModifiers(),
        e.getX(), e.getY(),  e.getXOnScreen(),
        e.getYOnScreen(), e.getClickCount(),
        e.isPopupTrigger(),  MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    getParent().dispatchEvent(newEvent);
}
 
源代码23 项目: dragonwell8_jdk   文件: MotifDesktopIconUI.java
void forwardEventToParent(MouseEvent e) {
    MouseEvent newEvent = new MouseEvent(
        getParent(), e.getID(), e.getWhen(), e.getModifiers(),
        e.getX(), e.getY(), e.getXOnScreen(),
        e.getYOnScreen(), e.getClickCount(),
        e.isPopupTrigger(), MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    getParent().dispatchEvent(newEvent);
}
 
源代码24 项目: dragonwell8_jdk   文件: MotifDesktopIconUI.java
void forwardEventToParent(MouseEvent e) {
    MouseEvent newEvent = new MouseEvent(
        getParent(), e.getID(), e.getWhen(), e.getModifiers(),
        e.getX(), e.getY(), e.getXOnScreen(), e.getYOnScreen(),
        e.getClickCount(), e.isPopupTrigger(), MouseEvent.NOBUTTON );
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    getParent().dispatchEvent(newEvent);
}
 
源代码25 项目: dragonwell8_jdk   文件: Autoscroller.java
/**
 * Starts the timer targeting the passed in component.
 */
private void start(JComponent c, MouseEvent e) {
    Point screenLocation = c.getLocationOnScreen();

    if (component != c) {
        _stop(component);
    }
    component = c;
    event = new MouseEvent(component, e.getID(), e.getWhen(),
                           e.getModifiers(), e.getX() + screenLocation.x,
                           e.getY() + screenLocation.y,
                           e.getXOnScreen(),
                           e.getYOnScreen(),
                           e.getClickCount(), e.isPopupTrigger(),
                           MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(event,
        meAccessor.isCausedByTouchEvent(e));

    if (timer == null) {
        timer = new Timer(100, this);
    }

    if (!timer.isRunning()) {
        timer.start();
    }
}
 
void forwardEventToParent(MouseEvent e) {
    MouseEvent newEvent = new MouseEvent(
        getParent(), e.getID(), e.getWhen(), e.getModifiers(),
        e.getX(), e.getY(),  e.getXOnScreen(),
        e.getYOnScreen(), e.getClickCount(),
        e.isPopupTrigger(),  MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    getParent().dispatchEvent(newEvent);
}
 
源代码27 项目: TencentKona-8   文件: MotifDesktopIconUI.java
void forwardEventToParent(MouseEvent e) {
    MouseEvent newEvent = new MouseEvent(
        getParent(), e.getID(), e.getWhen(), e.getModifiers(),
        e.getX(), e.getY(), e.getXOnScreen(),
        e.getYOnScreen(), e.getClickCount(),
        e.isPopupTrigger(), MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    getParent().dispatchEvent(newEvent);
}
 
源代码28 项目: TencentKona-8   文件: MotifDesktopIconUI.java
void forwardEventToParent(MouseEvent e) {
    MouseEvent newEvent = new MouseEvent(
        getParent(), e.getID(), e.getWhen(), e.getModifiers(),
        e.getX(), e.getY(), e.getXOnScreen(), e.getYOnScreen(),
        e.getClickCount(), e.isPopupTrigger(), MouseEvent.NOBUTTON );
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    getParent().dispatchEvent(newEvent);
}
 
源代码29 项目: TencentKona-8   文件: Autoscroller.java
/**
 * Starts the timer targeting the passed in component.
 */
private void start(JComponent c, MouseEvent e) {
    Point screenLocation = c.getLocationOnScreen();

    if (component != c) {
        _stop(component);
    }
    component = c;
    event = new MouseEvent(component, e.getID(), e.getWhen(),
                           e.getModifiers(), e.getX() + screenLocation.x,
                           e.getY() + screenLocation.y,
                           e.getXOnScreen(),
                           e.getYOnScreen(),
                           e.getClickCount(), e.isPopupTrigger(),
                           MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(event,
        meAccessor.isCausedByTouchEvent(e));

    if (timer == null) {
        timer = new Timer(100, this);
    }

    if (!timer.isRunning()) {
        timer.start();
    }
}
 
void forwardEventToParent(MouseEvent e) {
    MouseEvent newEvent = new MouseEvent(
        getParent(), e.getID(), e.getWhen(), e.getModifiers(),
        e.getX(), e.getY(),  e.getXOnScreen(),
        e.getYOnScreen(), e.getClickCount(),
        e.isPopupTrigger(),  MouseEvent.NOBUTTON);
    MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
    meAccessor.setCausedByTouchEvent(newEvent,
        meAccessor.isCausedByTouchEvent(e));
    getParent().dispatchEvent(newEvent);
}
 
 类所在包
 类方法
 同包方法