Class IOSBatteryService

java.lang.Object
com.gluonhq.attach.battery.impl.IOSBatteryService
All Implemented Interfaces:
BatteryService

public class IOSBatteryService extends Object implements BatteryService
  • Property Summary

    Properties
    Type
    Property
    Description
    javafx.beans.property.ReadOnlyFloatProperty
    Returns a property that will be frequently updated to reflect the current battery level.
    javafx.beans.property.ReadOnlyBooleanProperty
    Returns a property that will be updated to reflect whether the device is plugged in to an external power source or not.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.beans.property.ReadOnlyFloatProperty
    Returns a property that will be frequently updated to reflect the current battery level.
    float
    Gets the value of the property batteryLevel.
    boolean
    Gets the value of the property pluggedIn.
    javafx.beans.property.ReadOnlyBooleanProperty
    Returns a property that will be updated to reflect whether the device is plugged in to an external power source or not.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Property Details

  • Constructor Details

    • IOSBatteryService

      public IOSBatteryService()
  • Method Details

    • getBatteryLevel

      public float getBatteryLevel()
      Gets the value of the property batteryLevel.
      Specified by:
      getBatteryLevel in interface BatteryService
      Property description:
      Returns:
      A float value between 0 and 1 to indicate battery charge levels.
    • batteryLevelProperty

      public javafx.beans.property.ReadOnlyFloatProperty batteryLevelProperty()
      Description copied from interface: BatteryService
      Returns a property that will be frequently updated to reflect the current battery level.
      Specified by:
      batteryLevelProperty in interface BatteryService
      See Also:
    • isPluggedIn

      public boolean isPluggedIn()
      Gets the value of the property pluggedIn.
      Specified by:
      isPluggedIn in interface BatteryService
      Property description:
      Returns:
      Returns true to indicate power is coming from an external source, and false to indicate that the battery is powering the device.
    • pluggedInProperty

      public javafx.beans.property.ReadOnlyBooleanProperty pluggedInProperty()
      Description copied from interface: BatteryService
      Returns a property that will be updated to reflect whether the device is plugged in to an external power source or not.
      Specified by:
      pluggedInProperty in interface BatteryService
      See Also: