fm.liveswitch.LayoutFrame Class Reference

A layout frame definition, including X/Y coordinates and width/height values. More...

Public Member Functions

String getClientId ()
 Gets the client identifier. More...
String getDeviceId ()
 Gets the device identifier. More...
int getHeight ()
 Gets the height value. More...
int getOrientation ()
 Gets the orientation in degrees. More...
String getUserId ()
 Gets the user identifier. More...
String getViewId ()
 Gets the view ID. More...
int getWidth ()
 Gets the width value. More...
int getX ()
 Gets the X coordinate. More...
int getY ()
 Gets the Y coordinate. More...
boolean isEquivalent (fm.liveswitch.LayoutFrame layoutFrame)
 Determines whether the specified layout frame is equivalent. More...
 LayoutFrame (int x, int y, int width, int height)
 Initializes a new instance of the fm.liveswitch.LayoutFrame class. More...
void setClientId (String value)
 Sets the client identifier. More...
void setDeviceId (String value)
 Sets the device identifier. More...
void setHeight (int value)
 Sets the height value. More...
void setOrientation (int value)
 Sets the orientation in degrees. More...
void setUserId (String value)
 Sets the user identifier. More...
void setViewId (String value)
 Sets the view ID. More...
void setWidth (int value)
 Sets the width value. More...
void setX (int value)
 Sets the X coordinate. More...
void setY (int value)
 Sets the Y coordinate. More...
String toJson ()
 Serializes this instance to JSON. More...

Static Public Member Functions

static fm.liveswitch.LayoutFrame fromJson (String layoutFrameJson)
 Deserializes a layout frame from JSON. More...
static fm.liveswitch.LayoutFrame getScaledFrame (fm.liveswitch.LayoutScale scale, int outerWidth, int outerHeight, int innerWidth, int innerHeight)
 Gets a scaled frame. More...
static String toJson (fm.liveswitch.LayoutFrame layoutFrame)
 Serializes a layout frame to JSON. More...

Detailed Description

A layout frame definition, including X/Y coordinates and width/height values.

Constructor & Destructor Documentation

◆ LayoutFrame()

fm.liveswitch.LayoutFrame.LayoutFrame ( int  x,
int  y,
int  width,
int  height 

Initializes a new instance of the fm.liveswitch.LayoutFrame class.

xThe X coordinate.
yThe Y coordinate.
widthThe width value.
heightThe height value.

Member Function Documentation

◆ fromJson()

static fm.liveswitch.LayoutFrame fm.liveswitch.LayoutFrame.fromJson ( String  layoutFrameJson)

Deserializes a layout frame from JSON.

layoutFrameJsonThe layout frame JSON.

◆ getClientId()

String fm.liveswitch.LayoutFrame.getClientId ( )

Gets the client identifier.

◆ getDeviceId()

String fm.liveswitch.LayoutFrame.getDeviceId ( )

Gets the device identifier.

◆ getHeight()

int fm.liveswitch.LayoutFrame.getHeight ( )

Gets the height value.

◆ getOrientation()

int fm.liveswitch.LayoutFrame.getOrientation ( )

Gets the orientation in degrees.

◆ getScaledFrame()

static fm.liveswitch.LayoutFrame fm.liveswitch.LayoutFrame.getScaledFrame ( fm.liveswitch.LayoutScale  scale,
int  outerWidth,
int  outerHeight,
int  innerWidth,
int  innerHeight 

Gets a scaled frame.

scaleThe scaling algorithm to use.
outerWidthThe width of the outer container.
outerHeightThe height of the outer container.
innerWidthThe width of the inner element.
innerHeightThe height of the inner element.

◆ getUserId()

String fm.liveswitch.LayoutFrame.getUserId ( )

Gets the user identifier.

◆ getViewId()

String fm.liveswitch.LayoutFrame.getViewId ( )

Gets the view ID.

◆ getWidth()

int fm.liveswitch.LayoutFrame.getWidth ( )

Gets the width value.

◆ getX()

int fm.liveswitch.LayoutFrame.getX ( )

Gets the X coordinate.

◆ getY()

int fm.liveswitch.LayoutFrame.getY ( )

Gets the Y coordinate.

◆ isEquivalent()

boolean fm.liveswitch.LayoutFrame.isEquivalent ( fm.liveswitch.LayoutFrame  layoutFrame)

Determines whether the specified layout frame is equivalent.

layoutFrameThe layout frame.

◆ setClientId()

void fm.liveswitch.LayoutFrame.setClientId ( String  value)

Sets the client identifier.

◆ setDeviceId()

void fm.liveswitch.LayoutFrame.setDeviceId ( String  value)

Sets the device identifier.

◆ setHeight()

void fm.liveswitch.LayoutFrame.setHeight ( int  value)

Sets the height value.

◆ setOrientation()

void fm.liveswitch.LayoutFrame.setOrientation ( int  value)

Sets the orientation in degrees.

◆ setUserId()

void fm.liveswitch.LayoutFrame.setUserId ( String  value)

Sets the user identifier.

◆ setViewId()

void fm.liveswitch.LayoutFrame.setViewId ( String  value)

Sets the view ID.

◆ setWidth()

void fm.liveswitch.LayoutFrame.setWidth ( int  value)

Sets the width value.

◆ setX()

void fm.liveswitch.LayoutFrame.setX ( int  value)

Sets the X coordinate.

◆ setY()

void fm.liveswitch.LayoutFrame.setY ( int  value)

Sets the Y coordinate.

◆ toJson() [1/2]

String fm.liveswitch.LayoutFrame.toJson ( )

Serializes this instance to JSON.

◆ toJson() [2/2]

static String fm.liveswitch.LayoutFrame.toJson ( fm.liveswitch.LayoutFrame  layoutFrame)

Serializes a layout frame to JSON.

layoutFrameThe layout frame.