Package com.day.cq.wcm.emulator
Interface Emulator
-
public interface Emulator
TheEmulator
interface specifies emulators.- Since:
- CQ 5.4.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NN_EMULATORCONFIG
Node namesstatic java.lang.String
PN_CANROTATE
static java.lang.String
PN_HEIGHT
static java.lang.String
PN_PIXELRATIO
static java.lang.String
PN_TOUCHSCROLLING
static java.lang.String
PN_WIDTH
static java.lang.String
RESOURCE_TYPE
-
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 givencssPath
for 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
String
representing the content CSS path, ornull
if never set.
-
setContentCssPath
void setContentCssPath(java.lang.String cssPath)
Instructs the emulator to use the givencssPath
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, ornull
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 ornull
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 or1
if not defined.
-
-