Java 8 MouseInputListener - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 MouseInputListener class.

This code example shows how to use the following methods:mouseClicked, mouseReleased
This code example shows how to use the following methods:mouseEntered
    public void mouseEntered(MouseEvent e) {
        clickCount = 0;
        lastTime = 0;
        lastPeer = null; 
 
        listener.mouseEntered(e);
    } 
 
    public void mouseExited(MouseEvent e) {
        clickCount = 0;
        lastTime = 0;
        lastPeer = null; 
 
        listener.mouseExited(e);
    } 
 
    public void mousePressed(MouseEvent e) {
        int x;
        int y;
 
4
CodeRank
This code example shows how to use the following methods:mouseExited
        listener.mouseEntered(translateToGrid(e));
    } 
 
    @Override 
    public void mouseExited(MouseEvent e) {
        listener.mouseExited(translateToGrid(e));
    } 
 
    @Override 
    public void mouseDragged(MouseEvent e) {
        listener.mouseDragged(translateToGrid(e));
    } 
 
    @Override 
    public void mouseMoved(MouseEvent e) {
        listener.mouseMoved(translateToGrid(e));
    } 
} 
4
CodeRank
This code example shows how to use the following methods:mouseDragged
            _mouseEventFilter.mouseExited(e);
        } 
 
        public void mouseDragged(MouseEvent e) {
            if (_listener != null) {
                _listener.mouseDragged(e);
            } 
        } 
 
        public void mouseMoved(MouseEvent e) {
            if (_listener != null) {
                _listener.mouseMoved(e);
            } 
        } 
    } 
 
    private static class MouseEventFilter implements MouseListener {
 
        private final int _timeout;
        private final MouseListener _listener;
4
CodeRank
This code example shows how to use the following methods:mousePressed
        } 
    } 
 
    public void mousePressed(MouseEvent e) {
        if (_listener != null) {
            _listener.mousePressed(e);
        } 
    } 
 
    public void mouseReleased(MouseEvent e) {
        if (_listener != null) {
            _listener.mouseReleased(e);
        } 
    } 
 
    public void mouseEntered(MouseEvent e) {
        if (_listener != null) {
            _listener.mouseEntered(e);
        } 
    } 
4
CodeRank
See Code Examples for Java 8 MouseInputListener Methods: