Class MobileAccelerometerService
java.lang.Object
com.gluonhq.attach.accelerometer.impl.MobileAccelerometerService
- All Implemented Interfaces:
AccelerometerService
- Direct Known Subclasses:
AndroidAccelerometerService
,IOSAccelerometerService
-
Property Summary
TypePropertyDescriptionjavafx.beans.property.ReadOnlyObjectProperty<Acceleration>
A frequently-updated reading from the accelerometer. -
Field Summary
Modifier and TypeFieldDescriptionprotected static final javafx.beans.property.ReadOnlyObjectWrapper<Acceleration>
Fields inherited from interface com.gluonhq.attach.accelerometer.AccelerometerService
DEFAULT_PARAMETERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.property.ReadOnlyObjectProperty<Acceleration>
A frequently-updated reading from the accelerometer.Returns a single reading from the accelerometer.void
start()
Starts the service withAccelerometerService.DEFAULT_PARAMETERS
.void
start
(Parameters parameters) Starts the service with given parameters.protected abstract void
startAccelerometerImpl
(boolean isFilterGravity, double frequency) void
stop()
Stops the service.protected abstract void
protected static LocalDateTime
toLocalDateTime
(double t)
-
Property Details
-
acceleration
- Specified by:
accelerationProperty
in interfaceAccelerometerService
-
-
Field Details
-
reading
-
-
Constructor Details
-
MobileAccelerometerService
public MobileAccelerometerService()
-
-
Method Details
-
getCurrentAcceleration
Description copied from interface:AccelerometerService
Returns a single reading from the accelerometer.- Specified by:
getCurrentAcceleration
in interfaceAccelerometerService
- Returns:
- the current accelerometer reading
-
accelerationProperty
Description copied from interface:AccelerometerService
A frequently-updated reading from the accelerometer.- Specified by:
accelerationProperty
in interfaceAccelerometerService
-
start
public void start()Description copied from interface:AccelerometerService
Starts the service withAccelerometerService.DEFAULT_PARAMETERS
.- Specified by:
start
in interfaceAccelerometerService
-
start
Description copied from interface:AccelerometerService
Starts the service with given parameters.- Specified by:
start
in interfaceAccelerometerService
- Parameters:
parameters
- Parameters for configuring the service
-
stop
public void stop()Description copied from interface:AccelerometerService
Stops the service.- Specified by:
stop
in interfaceAccelerometerService
-
toLocalDateTime
-
startAccelerometerImpl
protected abstract void startAccelerometerImpl(boolean isFilterGravity, double frequency) -
stopAccelerometerImpl
protected abstract void stopAccelerometerImpl()
-