org.jboss.errai.orientation.client.local
Class Html5OrientationDetector
java.lang.Object
org.jboss.errai.orientation.client.local.Html5OrientationDetector
- All Implemented Interfaces:
- OrientationDetector
public class Html5OrientationDetector
- extends Object
- implements OrientationDetector
Detects device orientation through the official HTML 5 API, periodically firing CDI
events with the latest orientation info.
- Author:
- Jonathan Fuerth
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Html5OrientationDetector
public Html5OrientationDetector()
fireOrientationEvent
public void fireOrientationEvent(double x,
double y,
double z)
- Specified by:
fireOrientationEvent
in interface OrientationDetector
stopFiringOrientationEvents
public void stopFiringOrientationEvents()
- Description copied from interface:
OrientationDetector
- Stops the periodic firing of CDI OrientationEvents. If this detector was
already in the stopped state, calling this method has no effect.
- Specified by:
stopFiringOrientationEvents
in interface OrientationDetector
startFiringOrientationEvents
public void startFiringOrientationEvents()
- Description copied from interface:
OrientationDetector
- Starts the periodic firing of CDI OrientationEvents. If this detector was
already in the started state, calling this method has no effect.
- Specified by:
startFiringOrientationEvents
in interface OrientationDetector
setOrientationEventSource
public void setOrientationEventSource(javax.enterprise.event.Event<OrientationEvent> orientationEventSource)
- Description copied from interface:
OrientationDetector
- The provider class that creates the detector calls this method to give us a
means of firing the event.
- Specified by:
setOrientationEventSource
in interface OrientationDetector
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.