

/**
 * Copyright (C) 2006-2008 Sun Microsystems, Inc.
 * 
 * Sun Microsystems, Inc. confidential
 * All rights reserved
 *
 * This file is autogenerated by glue-jaxws.xsl, DO NOT EDIT! 
 */

package com.sun.xml.ws.commons.virtualbox;

import java.math.BigInteger;
import java.util.List;
import java.util.UUID;
import javax.xml.ws.Holder;
import javax.xml.ws.WebServiceException;
import com.sun.xml.ws.commons.virtualbox.IUnknown;

import org.virtualbox.service.InvalidObjectFaultMsg;
import org.virtualbox.service.RuntimeFaultMsg;
import org.virtualbox.service.VboxService;
import org.virtualbox.service.VboxPortType;

public class IMouse extends IUnknown {

    public static IMouse cast(IUnknown other) {
        return new IMouse(other.getRef(), other.getRemoteWSPort());
    }

    public IMouse(String _this, VboxPortType port) {
        super(_this,port);
    }

    // read-only attribute IMouse::absoluteSupported of type boolean
    public Boolean getAbsoluteSupported() {
        try {
            Boolean retVal = port.iMouseGetAbsoluteSupported(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method IMouse::putMouseEvent(
            [in] long dx,
            [in] long dy,
            [in] long dz,
            [in] long buttonState)
     */
    public void putMouseEvent(Integer dx, Integer dy, Integer dz, Integer buttonState) {
        try {
            port.iMousePutMouseEvent(_this, dx, dy, dz, buttonState);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method IMouse::putMouseEventAbsolute(
            [in] long x,
            [in] long y,
            [in] long dz,
            [in] long buttonState)
     */
    public void putMouseEventAbsolute(Integer x, Integer y, Integer dz, Integer buttonState) {
        try {
            port.iMousePutMouseEventAbsolute(_this, x, y, dz, buttonState);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
}
