Package com.day.cq.wcm.emulator
Interface Emulator
-
public interface EmulatorTheEmulatorinterface specifies emulators.- Since:
- CQ 5.4.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNN_EMULATORCONFIGNode namesstatic java.lang.StringPN_CANROTATEstatic java.lang.StringPN_HEIGHTstatic java.lang.StringPN_PIXELRATIOstatic java.lang.StringPN_TOUCHSCROLLINGstatic java.lang.StringPN_WIDTHstatic java.lang.StringRESOURCE_TYPE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanRotate()Indicates whether the device represented by this emulator supports device rotation (dual mode).java.lang.StringgetContentCssPath()Returns the path of the CSS to be used for displaying the page content in the emulator.java.lang.StringgetDescription()Returns the description of this emulator.intgetHeight()Returns the height of this emulator.java.lang.StringgetName()Returns the name of this emulator.java.lang.StringgetPath()Returns the path of this emulator.doublegetPixelRatio()Returns the pixel ratio of this emulator.java.lang.StringgetTitle()Returns the title of this emulator.intgetWidth()Returns the width of this emulator.booleanhasTouchScrolling()Indicates whether the devices represented by this emulator uses touch scrolling.voidsetContentCssPath(java.lang.String cssPath)Instructs the emulator to use the givencssPathfor displaying the page content.
-
-
-
Field Detail
-
RESOURCE_TYPE
static final java.lang.String RESOURCE_TYPE
- See Also:
- Constant Field Values
-
PN_CANROTATE
static final java.lang.String PN_CANROTATE
- See Also:
- Constant Field Values
-
PN_TOUCHSCROLLING
static final java.lang.String PN_TOUCHSCROLLING
- See Also:
- Constant Field Values
-
PN_WIDTH
static final java.lang.String PN_WIDTH
- See Also:
- Constant Field Values
-
PN_HEIGHT
static final java.lang.String PN_HEIGHT
- See Also:
- Constant Field Values
-
PN_PIXELRATIO
static final java.lang.String PN_PIXELRATIO
- See Also:
- Constant Field Values
-
NN_EMULATORCONFIG
static final java.lang.String NN_EMULATORCONFIG
Node names- See Also:
- Constant Field Values
-
-
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 viasetContentCssPath(String).- Returns:
- A
Stringrepresenting the content CSS path, ornullif never set.
-
setContentCssPath
void setContentCssPath(java.lang.String cssPath)
Instructs the emulator to use the givencssPathfor displaying the page content. This is the same CSS path as used for rendering the page e.g. on a publish instance.- Parameters:
cssPath-<code>String</code>representing the css path.
-
getDescription
java.lang.String getDescription()
Returns the description of this emulator.- Returns:
- A
Stringrepresenting the description, ornullif not defined.
-
getName
java.lang.String getName()
Returns the name of this emulator.- Returns:
- A
Stringrepresenting the name.
-
getPath
java.lang.String getPath()
Returns the path of this emulator.- Returns:
- A
Stringrepresenting the path.
-
getTitle
java.lang.String getTitle()
Returns the title of this emulator.- Returns:
- A
Stringrepresenting the title ornullif not defined.
-
canRotate
boolean canRotate()
Indicates whether the device represented by this emulator supports device rotation (dual mode).- Returns:
trueif rotation is supported.
-
hasTouchScrolling
boolean hasTouchScrolling()
Indicates whether the devices represented by this emulator uses touch scrolling.- Returns:
trueif touch scrolling is supported.
-
getWidth
int getWidth()
Returns the width of this emulator.- Returns:
- An
intrepresenting the width or-1if not defined.
-
getHeight
int getHeight()
Returns the height of this emulator.- Returns:
- An
intrepresenting the height or-1if not defined.
-
getPixelRatio
double getPixelRatio()
Returns the pixel ratio of this emulator.- Returns:
- A
doublerepresenting the pixel ratio or1if not defined.
-
-