Interface Emulator


  • public interface Emulator
    The Emulator interface specifies emulators.
    Since:
    CQ 5.4.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canRotate()
      Indicates whether the device represented by this emulator supports device rotation (dual mode).
      java.lang.String getContentCssPath()
      Returns the path of the CSS to be used for displaying the page content in the emulator.
      java.lang.String getDescription()
      Returns the description of this emulator.
      int getHeight()
      Returns the height of this emulator.
      java.lang.String getName()
      Returns the name of this emulator.
      java.lang.String getPath()
      Returns the path of this emulator.
      double getPixelRatio()
      Returns the pixel ratio of this emulator.
      java.lang.String getTitle()
      Returns the title of this emulator.
      int getWidth()
      Returns the width of this emulator.
      boolean hasTouchScrolling()
      Indicates whether the devices represented by this emulator uses touch scrolling.
      void setContentCssPath​(java.lang.String cssPath)
      Instructs the emulator to use the given cssPath for displaying the page content.
    • Method Detail

      • getContentCssPath

        java.lang.String getContentCssPath()
        Returns the path of the CSS to be used for displaying the page content in the emulator. This is set via setContentCssPath(String).
        Returns:
        A String representing the content CSS path, or null if never set.
      • setContentCssPath

        void setContentCssPath​(java.lang.String cssPath)
        Instructs the emulator to use the given cssPath for displaying the page content. This is the same CSS path as used for rendering the page e.g. on a publish instance.
        Parameters:
        cssPath - >String representing the css path.
      • getDescription

        java.lang.String getDescription()
        Returns the description of this emulator.
        Returns:
        A String representing the description, or null if not defined.
      • getName

        java.lang.String getName()
        Returns the name of this emulator.
        Returns:
        A String representing the name.
      • getPath

        java.lang.String getPath()
        Returns the path of this emulator.
        Returns:
        A String representing the path.
      • getTitle

        java.lang.String getTitle()
        Returns the title of this emulator.
        Returns:
        A String representing the title or null if not defined.
      • canRotate

        boolean canRotate()
        Indicates whether the device represented by this emulator supports device rotation (dual mode).
        Returns:
        true if rotation is supported.
      • hasTouchScrolling

        boolean hasTouchScrolling()
        Indicates whether the devices represented by this emulator uses touch scrolling.
        Returns:
        true if touch scrolling is supported.
      • getWidth

        int getWidth()
        Returns the width of this emulator.
        Returns:
        An int representing the width or -1 if not defined.
      • getHeight

        int getHeight()
        Returns the height of this emulator.
        Returns:
        An int representing the height or -1 if not defined.
      • getPixelRatio

        double getPixelRatio()
        Returns the pixel ratio of this emulator.
        Returns:
        A double representing the pixel ratio or 1 if not defined.