Module com.gluonhq.attach.compass
Package com.gluonhq.attach.compass.impl
Class MobileCompassService
- java.lang.Object
-
- com.gluonhq.attach.compass.impl.MobileCompassService
-
- All Implemented Interfaces:
CompassService
- Direct Known Subclasses:
AndroidCompassService,IOSCompassService
public abstract class MobileCompassService extends java.lang.Object implements CompassService
-
-
Constructor Summary
Constructors Constructor Description MobileCompassService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetHeading()Returns the compass heading, represented as a value between 0.0 and 359.99, where 0.0 is north.javafx.beans.property.ReadOnlyDoublePropertyheadingProperty()A frequently-updated heading of the compass.voidstart()Starts the service.voidstop()Stops the service.
-
-
-
Method Detail
-
getHeading
public double getHeading()
Description copied from interface:CompassServiceReturns the compass heading, represented as a value between 0.0 and 359.99, where 0.0 is north. If there is no heading data available, -1.0 will be returned to represent this error state.- Specified by:
getHeadingin interfaceCompassService- Returns:
- The current compass heading.
-
headingProperty
public javafx.beans.property.ReadOnlyDoubleProperty headingProperty()
Description copied from interface:CompassServiceA frequently-updated heading of the compass.- Specified by:
headingPropertyin interfaceCompassService- Returns:
- A property containing a frequently-updated compass heading.
-
start
public void start()
Description copied from interface:CompassServiceStarts the service.- Specified by:
startin interfaceCompassService
-
stop
public void stop()
Description copied from interface:CompassServiceStops the service.- Specified by:
stopin interfaceCompassService
-
-