org.jboss.errai.ui.cordova
Class PhoneGapOrientationDetector
java.lang.Object
org.jboss.errai.ui.cordova.PhoneGapOrientationDetector
- All Implemented Interfaces:
- OrientationDetector
@Singleton
public class PhoneGapOrientationDetector
- extends Object
- implements OrientationDetector
Detects device orientation through the PhoneGap 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 |
PhoneGapOrientationDetector
public PhoneGapOrientationDetector()
init
public void init()
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
fireOrientationEvent
public void fireOrientationEvent(double x,
double y,
double z)
- Specified by:
fireOrientationEvent
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
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
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.