Package org.jnode.driver.input

Examples of org.jnode.driver.input.PointerAPI


        }

        public void deviceStarted(Device device) {
            if (device.implementsAPI(PointerAPI.class)) {
                try {
                    PointerAPI api = device.getAPI(PointerAPI.class);
                    pointerList.add(api);
                    for (PointerListener listener : listenerList) {
                        api.addPointerListener(listener);
                    }
                } catch (ApiNotFoundException anfe) {
                    //ignore
                }
            }
View Full Code Here


        }

        public void deviceStop(Device device) {
            if (device.implementsAPI(PointerAPI.class)) {
                try {
                    PointerAPI api = device.getAPI(PointerAPI.class);
                    pointerList.remove(api);
                    for (PointerListener listener : listenerList) {
                        api.removePointerListener(listener);
                    }
                } catch (ApiNotFoundException anfe) {
                    //ignore
                }
            }
View Full Code Here

    public static void main(String[] args)
        throws Exception {

        final String devId = (args.length > 0) ? args[0] : "ps2mouse";
        PointerAPI api = (PointerAPI) DeviceUtils.getAPI(devId, PointerAPI.class);
        api.addPointerListener(new MyListener());
    }
View Full Code Here

     *
     * @param pDev
     */
    protected final void addPointerDevice(Device pDev) {
        try {
            final PointerAPI pApi = pDev.getAPI(PointerAPI.class);
            pointerDevs.add(pDev);
            pApi.addPointerListener(this);
        } catch (ApiNotFoundException ex) {
            BootLogInstance.get().error("PointerAPI not found", ex);
        }
    }
View Full Code Here

     * @param pDev
     */
    final void removePointer(Device pDev) {
        if (pointerDevs.remove(pDev)) {
            try {
                final PointerAPI pApi = pDev.getAPI(PointerAPI.class);
                pApi.removePointerListener(this);
            } catch (ApiNotFoundException ex) {
                BootLogInstance.get().error("PointerAPI not found", ex);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.jnode.driver.input.PointerAPI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.