com.hp.lft.sdk.web

Class EmulatedDevice

  • java.lang.Object
    • com.hp.lft.sdk.web.EmulatedDevice
    • Constructor Summary

      Constructor and Description
      EmulatedDevice()
      Initializes a new instance of the EmulatedDevice class.
      EmulatedDevice(java.lang.String name, int width, int height, double scaleFactor, boolean touchable, boolean mobile, java.lang.String userAgent)
      Initializes a new instance of the EmulatedDevice class with the initialization parameters.
    • Method Summary

      Modifier and TypeMethod and Description
      static EmulatedDeviceGalaxyS5()
      Returns the predefined Samsung Galaxy S5 emulated device.
      intgetHeight()
      Returns the height of the emulated device screen (in pixels).
      java.lang.StringgetName()
      Returns the name of the emulated device.
      doublegetScaleFactor()
      Returns the scale factor of the emulated device screen.
      java.lang.StringgetUserAgent()
      Returns the userAgent property of the emulated device.
      intgetWidth()
      Returns the width of the emulated device screen (in pixels).
      static EmulatedDeviceIPad()
      Returns the predefined IPad emulated device.
      static EmulatedDeviceIPhone5()
      Returns the predefined iPhone 5 emulated device.
      static EmulatedDeviceIPhone6()
      Returns the predefined iPhone 6 emulated device.
      static EmulatedDeviceIPhone6Plus()
      Returns the predefined iPhone 6 Plus emulated device.
      booleanisMobile()
      Returns true if the emulated device is mobile device.
      booleanisTouchable()
      Returns true if the emulated device screen touch feature is enabled.
      static EmulatedDeviceNexus5X()
      Returns the predefined Nexus 5X emulated device.
      static EmulatedDeviceNexus6P()
      Returns the predefined Nexus 6P emulated device.
      voidsetHeight(int height)
      Sets height of the emulated device screen (in pixels).
      voidsetMobile(boolean mobile)
      Sets the mobile property of the emulated device.
      voidsetName(java.lang.String name)
      Sets name of the emulated device.
      voidsetScaleFactor(double scaleFactor)
      Sets the scale factor of the emulated device screen.
      voidsetTouchable(boolean touchable)
      Sets the touchable property of the emulated device screen.
      voidsetUserAgent(java.lang.String userAgent)
      Sets the userAgent property of the emulated device.
      voidsetWidth(int width)
      Sets width of the emulated device screen (in pixels).
      • Methods inherited from class java.lang.Object

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

      • EmulatedDevice

        public EmulatedDevice()
        Initializes a new instance of the EmulatedDevice class.
      • EmulatedDevice

        public EmulatedDevice(java.lang.String name,
                              int width,
                              int height,
                              double scaleFactor,
                              boolean touchable,
                              boolean mobile,
                              java.lang.String userAgent)
        Initializes a new instance of the EmulatedDevice class with the initialization parameters.
        Parameters:
        name - the emulated device name.
        width - the emulated device screen width.
        height - the emulated device screen height.
        scaleFactor - the emulated device screen scale factor.
        touchable - the emulated device screen can use the touch feature.
        userAgent - the emulated device user agent.
        mobile - the emulated device is mobile device.
    • Method Detail

      • setName

        public void setName(java.lang.String name)
        Sets name of the emulated device.
        Specified by:
        setName in interface EmulatedEnvironment
        Parameters:
        name - the device name.
      • getName

        public java.lang.String getName()
        Returns the name of the emulated device.
        Specified by:
        getName in interface EmulatedEnvironment
        Returns:
        name of the emulated device.
      • setWidth

        public void setWidth(int width)
        Sets width of the emulated device screen (in pixels).
        Specified by:
        setWidth in interface EmulatedEnvironment
        Parameters:
        width - the width of the emulated device screen (in pixels).
      • getWidth

        public int getWidth()
        Returns the width of the emulated device screen (in pixels).
        Specified by:
        getWidth in interface EmulatedEnvironment
        Returns:
        the width of the emulated device screen (in pixels).
      • setHeight

        public void setHeight(int height)
        Sets height of the emulated device screen (in pixels).
        Specified by:
        setHeight in interface EmulatedEnvironment
        Parameters:
        height - the height of the emulated device screen (in pixels).
      • getHeight

        public int getHeight()
        Returns the height of the emulated device screen (in pixels).
        Specified by:
        getHeight in interface EmulatedEnvironment
        Returns:
        the height of the emulated device screen (in pixels).
      • setScaleFactor

        public void setScaleFactor(double scaleFactor)
        Sets the scale factor of the emulated device screen.
        Specified by:
        setScaleFactor in interface EmulatedEnvironment
        Parameters:
        scaleFactor - the scale factor of the emulated device screen.
      • getScaleFactor

        public double getScaleFactor()
        Returns the scale factor of the emulated device screen.
        Specified by:
        getScaleFactor in interface EmulatedEnvironment
        Returns:
        the scale factor of the emulated device screen.
      • setTouchable

        public void setTouchable(boolean touchable)
        Sets the touchable property of the emulated device screen.
        Specified by:
        setTouchable in interface EmulatedEnvironment
        Parameters:
        touchable - the touchable property of the emulated device screen.
      • isTouchable

        public boolean isTouchable()
        Returns true if the emulated device screen touch feature is enabled.
        Specified by:
        isTouchable in interface EmulatedEnvironment
        Returns:
        true if the emulated device screen touch feature is enabled.
      • setUserAgent

        public void setUserAgent(java.lang.String userAgent)
        Sets the userAgent property of the emulated device.
        Specified by:
        setUserAgent in interface EmulatedEnvironment
        Parameters:
        userAgent - the userAgent property of the emulated device.
      • getUserAgent

        public java.lang.String getUserAgent()
        Returns the userAgent property of the emulated device.
        Specified by:
        getUserAgent in interface EmulatedEnvironment
        Returns:
        the userAgent property of the emulated device.
      • setMobile

        public void setMobile(boolean mobile)
        Sets the mobile property of the emulated device.
        Specified by:
        setMobile in interface EmulatedEnvironment
        Parameters:
        mobile - the mobile property of the emulated device.
      • isMobile

        public boolean isMobile()
        Returns true if the emulated device is mobile device.
        Specified by:
        isMobile in interface EmulatedEnvironment
        Returns:
        true if the emulated device is mobile device.
      • GalaxyS5

        public static EmulatedDevice GalaxyS5()
        Returns the predefined Samsung Galaxy S5 emulated device.
        Returns:
        the predefined Samsung Galaxy S5 emulated device.
      • Nexus5X

        public static EmulatedDevice Nexus5X()
        Returns the predefined Nexus 5X emulated device.
        Returns:
        the predefined Nexus 5X emulated device.
      • Nexus6P

        public static EmulatedDevice Nexus6P()
        Returns the predefined Nexus 6P emulated device.
        Returns:
        the predefined Nexus 6P emulated device.
      • IPhone5

        public static EmulatedDevice IPhone5()
        Returns the predefined iPhone 5 emulated device.
        Returns:
        the predefined iPhone 5 emulated device.
      • IPhone6

        public static EmulatedDevice IPhone6()
        Returns the predefined iPhone 6 emulated device.
        Returns:
        the predefined iPhone 6 emulated device.
      • IPhone6Plus

        public static EmulatedDevice IPhone6Plus()
        Returns the predefined iPhone 6 Plus emulated device.
        Returns:
        the predefined iPhone 6 Plus emulated device.
      • IPad

        public static EmulatedDevice IPad()
        Returns the predefined IPad emulated device.
        Returns:
        the predefined IPad emulated device.