src/net/java/sip/communicator/impl/protocol/jabber/OperationSetDesktopSharingServerJabberImpl.java
/**
     * Process mouse notification received from remote peer.
     *
     * @param event <tt>MouseEvent</tt> that will be regenerated on local
     * computer
     */
Process mouse notification received from remote peer.
@param event MouseEvent that will be regenerated on local
computer
Process mouse notification received from remote peer . @param event MouseEvent that will be regenerated on local computer
public void processMouseEvent(MouseEvent event)
    {
        /* ignore command if remote control is not enabled otherwise regenerates
         * event on the computer
         */
        if (hidService != null)
        {
            switch(event.getID())
            {
            case MouseEvent.MOUSE_PRESSED:
                hidService.mousePress(event.getModifiers());
                break;
            case MouseEvent.MOUSE_RELEASED:
                hidService.mouseRelease(event.getModifiers());
                break;
            case MouseEvent.MOUSE_MOVED:
                int originX = origin != null ? origin.x : 0;
                int originY = origin != null ? origin.y : 0;
                /* x and y position are sent in percentage but we multiply
                 * by 1000 in depacketizer because we cannot passed the size
                 * to the Provider
                 */
                int x = originX + ((event.getX() * size.width) / 1000);
                int y = originY + ((event.getY() * size.height) / 1000);
                hidService.mouseMove(x, y);
                break;
            case MouseEvent.MOUSE_WHEEL:
                MouseWheelEvent evt = (MouseWheelEvent)event;
                hidService.mouseWheel(evt.getWheelRotation());
                break;
            default:
                break;
            }
        }
    }
public void processMouseEvent ( MouseEvent event ) { /* ignore command if remote control is not enabled otherwise regenerates
         * event on the computer
         */ if ( hidService != null ) { switch ( event . getID ( ) ) { case MouseEvent . MOUSE_PRESSED : hidService . mousePress ( event . getModifiers ( ) ) ; break ; case MouseEvent . MOUSE_RELEASED : hidService . mouseRelease ( event . getModifiers ( ) ) ; break ; case MouseEvent . MOUSE_MOVED : int originX = origin != null ? origin . x : 0 ; int originY = origin != null ? origin . y : 0 ; /* x and y position are sent in percentage but we multiply
                 * by 1000 in depacketizer because we cannot passed the size
                 * to the Provider
                 */ int x = originX + ( ( event . getX ( ) * size . width ) / 1000 ) ; int y = originY + ( ( event . getY ( ) * size . height ) / 1000 ) ; hidService . mouseMove ( x , y ) ; break ; case MouseEvent . MOUSE_WHEEL : MouseWheelEvent evt = ( MouseWheelEvent ) event ; hidService . mouseWheel ( evt . getWheelRotation ( ) ) ; break ; default : break ; } } }
Process mouse notification received from remote peer.
Process mouse notification received from remote peer .