Class MobileMagnetometerService
java.lang.Object
com.gluonhq.attach.magnetometer.impl.MobileMagnetometerService
- All Implemented Interfaces:
MagnetometerService
- Direct Known Subclasses:
AndroidMagnetometerService
,IOSMagnetometerService
-
Property Summary
TypePropertyDescriptionjavafx.beans.property.ReadOnlyObjectProperty<MagnetometerReading>
A frequently-updated reading from the magnetometer. -
Field Summary
Modifier and TypeFieldDescriptionprotected static final javafx.beans.property.ReadOnlyObjectWrapper<MagnetometerReading>
Fields inherited from interface com.gluonhq.attach.magnetometer.MagnetometerService
DEFAULT_PARAMETERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the value of the property reading.javafx.beans.property.ReadOnlyObjectProperty<MagnetometerReading>
A frequently-updated reading from the magnetometer.void
start()
Starts the service withMagnetometerService.DEFAULT_PARAMETERS
.void
start
(Parameters parameters) Starts the service with given parameters.protected abstract void
startMagnetometerImpl
(double frequency) void
stop()
Stops the service.protected abstract void
-
Property Details
-
reading
- Specified by:
readingProperty
in interfaceMagnetometerService
- See Also:
-
-
Field Details
-
reading
-
-
Constructor Details
-
MobileMagnetometerService
public MobileMagnetometerService()
-
-
Method Details
-
readingProperty
Description copied from interface:MagnetometerService
A frequently-updated reading from the magnetometer.- Specified by:
readingProperty
in interfaceMagnetometerService
- See Also:
-
getReading
Gets the value of the property reading.- Specified by:
getReading
in interfaceMagnetometerService
- Property description:
- Returns:
- the current magnetometer reading
-
start
public void start()Description copied from interface:MagnetometerService
Starts the service withMagnetometerService.DEFAULT_PARAMETERS
.- Specified by:
start
in interfaceMagnetometerService
-
start
Description copied from interface:MagnetometerService
Starts the service with given parameters.- Specified by:
start
in interfaceMagnetometerService
- Parameters:
parameters
- Parameters for configuring the service
-
stop
public void stop()Description copied from interface:MagnetometerService
Stops the service.- Specified by:
stop
in interfaceMagnetometerService
-
startMagnetometerImpl
protected abstract void startMagnetometerImpl(double frequency) -
stopMagnetometerImpl
protected abstract void stopMagnetometerImpl()
-