Class UiDevice


  • public class UiDevice
    extends UiNode
    Represents a device.
    • Constructor Summary

      Constructors 
      Constructor Description
      UiDevice​(UiTopology topology, Device device)
      Creates a new UI device.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Device backingDevice()
      Returns the device instance backing this UI device.
      DeviceId id()
      Returns the identity of the device.
      java.lang.String idAsString()
      Returns a string representation of the element identifier.
      RegionId regionId()
      Returns the identifier of the region to which this device belongs.
      void setRegionId​(RegionId regionId)
      Sets the ID of the region to which this device belongs.
      java.lang.String toString()  
      java.lang.String type()
      Returns a string representation of the type of the backing device.
      UiRegion uiRegion()
      Returns the UI region to which this device belongs.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • UiDevice

        public UiDevice​(UiTopology topology,
                        Device device)
        Creates a new UI device.
        Parameters:
        topology - parent topology
        device - backing device
    • Method Detail

      • setRegionId

        public void setRegionId​(RegionId regionId)
        Sets the ID of the region to which this device belongs.
        Parameters:
        regionId - region identifier
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • id

        public DeviceId id()
        Returns the identity of the device.
        Returns:
        device ID
      • idAsString

        public java.lang.String idAsString()
        Description copied from class: UiElement
        Returns a string representation of the element identifier.
        Specified by:
        idAsString in class UiElement
        Returns:
        the element unique identifier
      • backingDevice

        public Device backingDevice()
        Returns the device instance backing this UI device.
        Returns:
        the backing device instance
      • regionId

        public RegionId regionId()
        Returns the identifier of the region to which this device belongs. This will be null if the device does not belong to any region.
        Returns:
        region ID
      • uiRegion

        public UiRegion uiRegion()
        Returns the UI region to which this device belongs.
        Returns:
        the UI region
      • type

        public java.lang.String type()
        Returns a string representation of the type of the backing device.
        Returns:
        the device type