Interface Emulator


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

      • getContentCssPath

        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​(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

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

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

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

        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.