fm.liveswitch.LayoutPreset Class Reference

A layout preset. More...

Public Member Functions

void applyPreset (fm.liveswitch.LayoutPreset preset)
 Applies a preset. More...
 
fm.liveswitch.Layout calculateLayout (int layoutWidth, int layoutHeight, boolean local, int remoteCount, fm.liveswitch.LayoutOrigin origin, fm.liveswitch.Size localVideoSize, fm.liveswitch.Size[] remoteVideoSizes)
 Gets a video frame layout. More...
 
fm.liveswitch.Layout calculateLayout (int layoutWidth, int layoutHeight, int remoteCount, fm.liveswitch.LayoutOrigin origin)
 Gets a video frame layout. More...
 
void copyToPreset (fm.liveswitch.LayoutPreset preset)
 Copies this preset's properties to another preset. More...
 
fm.liveswitch.LayoutAlignment getAlignment ()
 Gets the alignment of the layout. More...
 
int getBlockHeight ()
 Gets the height of block elements in pixels. More...
 
double getBlockHeightPercent ()
 Gets the height of block elements as a percent of the container height between 0.0 and 1.0. More...
 
int getBlockMarginX ()
 Gets the X-margin between block elements and the layout edge in pixels. More...
 
double getBlockMarginXPercent ()
 Gets the X-margin between block elements and the layout edge as a percent of the container width between 0.0 and 1.0. More...
 
int getBlockMarginY ()
 Gets the Y-margin between block elements and the layout edge in pixels. More...
 
double getBlockMarginYPercent ()
 Gets the Y-margin between block elements and the layout edge as a percent of the container height between 0.0 and 1.0. More...
 
int getBlockWidth ()
 Gets the width of block elements in pixels. More...
 
double getBlockWidthPercent ()
 Gets the width of block elements as a percent of the container width between 0.0 and 1.0. More...
 
fm.liveswitch.LayoutDirection getDirection ()
 Gets the direction of the layout flow. More...
 
int getFloatHeight ()
 Gets the height of floating elements in pixels. More...
 
double getFloatHeightPercent ()
 Gets the height of floating elements as a percent of the container height between 0.0 and 1.0. More...
 
int getFloatMarginX ()
 Gets the X-margin between floating elements and the layout edge in pixels. More...
 
double getFloatMarginXPercent ()
 Gets the X-margin between floating elements and the layout edge as a percent of the container width between 0.0 and 1.0. More...
 
int getFloatMarginY ()
 Gets the Y-margin between floating elements and the layout edge in pixels. More...
 
double getFloatMarginYPercent ()
 Gets the Y-margin between floating elements and the layout edge as a percent of the container height between 0.0 and 1.0. More...
 
int getFloatWidth ()
 Gets the width of floating elements in pixels. More...
 
double getFloatWidthPercent ()
 Gets the width of floating elements as a percent of the container width between 0.0 and 1.0. More...
 
int getInlineMargin ()
 Gets the size of the margin in pixels to use between inline elements. More...
 
fm.liveswitch.LayoutMode getMode ()
 Gets the mode used by the layout engine. More...
 
 LayoutPreset ()
 Initializes a new instance of the fm.liveswitch.LayoutPreset class. More...
 
void setAlignment (fm.liveswitch.LayoutAlignment value)
 Sets the alignment of the layout. More...
 
void setBlockHeight (int value)
 Sets the height of block elements in pixels. More...
 
void setBlockHeightPercent (double value)
 Sets the height of block elements as a percent of the container height between 0.0 and 1.0. More...
 
void setBlockMarginX (int value)
 Sets the X-margin between block elements and the layout edge in pixels. More...
 
void setBlockMarginXPercent (double value)
 Sets the X-margin between block elements and the layout edge as a percent of the container width between 0.0 and 1.0. More...
 
void setBlockMarginY (int value)
 Sets the Y-margin between block elements and the layout edge in pixels. More...
 
void setBlockMarginYPercent (double value)
 Sets the Y-margin between block elements and the layout edge as a percent of the container height between 0.0 and 1.0. More...
 
void setBlockWidth (int value)
 Sets the width of block elements in pixels. More...
 
void setBlockWidthPercent (double value)
 Sets the width of block elements as a percent of the container width between 0.0 and 1.0. More...
 
void setDirection (fm.liveswitch.LayoutDirection value)
 Sets the direction of the layout flow. More...
 
void setFloatHeight (int value)
 Sets the height of floating elements in pixels. More...
 
void setFloatHeightPercent (double value)
 Sets the height of floating elements as a percent of the container height between 0.0 and 1.0. More...
 
void setFloatMarginX (int value)
 Sets the X-margin between floating elements and the layout edge in pixels. More...
 
void setFloatMarginXPercent (double value)
 Sets the X-margin between floating elements and the layout edge as a percent of the container width between 0.0 and 1.0. More...
 
void setFloatMarginY (int value)
 Sets the Y-margin between floating elements and the layout edge in pixels. More...
 
void setFloatMarginYPercent (double value)
 Sets the Y-margin between floating elements and the layout edge as a percent of the container height between 0.0 and 1.0. More...
 
void setFloatWidth (int value)
 Sets the width of floating elements in pixels. More...
 
void setFloatWidthPercent (double value)
 Sets the width of floating elements as a percent of the container width between 0.0 and 1.0. More...
 
void setInlineMargin (int value)
 Sets the size of the margin in pixels to use between inline elements. More...
 
void setMode (fm.liveswitch.LayoutMode value)
 Sets the mode used by the layout engine. More...
 
- Public Member Functions inherited from fm.liveswitch.Dynamic
java.util.HashMap< String, Object > getDynamicProperties ()
 Gets all dynamic properties on this instance. More...
 
Object getDynamicValue (String key)
 Gets a property value from the local cache. More...
 
void setDynamicValue (String key, Object value)
 Sets a property value in the local cache. More...
 
boolean unsetDynamicValue (String key)
 Removes a property value from the local cache. More...
 

Static Public Member Functions

static fm.liveswitch.LayoutPreset getFacetime ()
 Gets a Facetime-style layout preset. More...
 
static fm.liveswitch.LayoutPreset getGoogleHangouts ()
 Gets a Google Hangouts-style layout preset. More...
 
static fm.liveswitch.LayoutPreset getSkype ()
 Gets a Skype-style layout preset. More...
 

Additional Inherited Members

- Protected Member Functions inherited from fm.liveswitch.Dynamic
 Dynamic ()
 
- Protected Member Functions inherited from fm.liveswitch.Serializable
boolean getIsDirty ()
 Gets a value indicating whether this instance is dirty. More...
 
 Serializable ()
 Initializes a new instance of the fm.liveswitch.Serializable class. More...
 
void setIsDirty (boolean value)
 Sets a value indicating whether this instance is dirty. More...
 

Detailed Description

A layout preset.

Constructor & Destructor Documentation

◆ LayoutPreset()

fm.liveswitch.LayoutPreset.LayoutPreset ( )

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

Member Function Documentation

◆ applyPreset()

void fm.liveswitch.LayoutPreset.applyPreset ( fm.liveswitch.LayoutPreset  preset)

Applies a preset.

Parameters
presetThe preset to apply.

◆ calculateLayout() [1/2]

fm.liveswitch.Layout fm.liveswitch.LayoutPreset.calculateLayout ( int  layoutWidth,
int  layoutHeight,
boolean  local,
int  remoteCount,
fm.liveswitch.LayoutOrigin  origin,
fm.liveswitch.Size  localVideoSize,
fm.liveswitch.Size[]  remoteVideoSizes 
)

Gets a video frame layout.

Parameters
layoutWidthThe total width of the layout.
layoutHeightThe total height of the layout.
localWhether a local frame is needed.
remoteCountThe number of remote frames.
originThe layout origin.
localVideoSizeThe local video size.
remoteVideoSizesThe remote video sizes.
Returns
The video frame layout.

◆ calculateLayout() [2/2]

fm.liveswitch.Layout fm.liveswitch.LayoutPreset.calculateLayout ( int  layoutWidth,
int  layoutHeight,
int  remoteCount,
fm.liveswitch.LayoutOrigin  origin 
)

Gets a video frame layout.

Parameters
layoutWidthThe total width of the layout.
layoutHeightThe total height of the layout.
remoteCountThe number of remote frames.
originThe layout origin.
Returns
The video frame layout.

◆ copyToPreset()

void fm.liveswitch.LayoutPreset.copyToPreset ( fm.liveswitch.LayoutPreset  preset)

Copies this preset's properties to another preset.

Parameters
presetThe target preset.

◆ getAlignment()

fm.liveswitch.LayoutAlignment fm.liveswitch.LayoutPreset.getAlignment ( )

Gets the alignment of the layout.

Defaults to fm.liveswitch.LayoutAlignment#BottomRight.

◆ getBlockHeight()

int fm.liveswitch.LayoutPreset.getBlockHeight ( )

Gets the height of block elements in pixels.

Overrides fm.liveswitch.LayoutPreset#getBlockHeightPercent.

◆ getBlockHeightPercent()

double fm.liveswitch.LayoutPreset.getBlockHeightPercent ( )

Gets the height of block elements as a percent of the container height between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getBlockHeight.

◆ getBlockMarginX()

int fm.liveswitch.LayoutPreset.getBlockMarginX ( )

Gets the X-margin between block elements and the layout edge in pixels.

Overrides fm.liveswitch.LayoutPreset#getBlockMarginXPercent.

◆ getBlockMarginXPercent()

double fm.liveswitch.LayoutPreset.getBlockMarginXPercent ( )

Gets the X-margin between block elements and the layout edge as a percent of the container width between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getBlockMarginX.

◆ getBlockMarginY()

int fm.liveswitch.LayoutPreset.getBlockMarginY ( )

Gets the Y-margin between block elements and the layout edge in pixels.

Overrides fm.liveswitch.LayoutPreset#getBlockMarginYPercent.

◆ getBlockMarginYPercent()

double fm.liveswitch.LayoutPreset.getBlockMarginYPercent ( )

Gets the Y-margin between block elements and the layout edge as a percent of the container height between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getBlockMarginY.

◆ getBlockWidth()

int fm.liveswitch.LayoutPreset.getBlockWidth ( )

Gets the width of block elements in pixels.

Overrides fm.liveswitch.LayoutPreset#getBlockWidthPercent.

◆ getBlockWidthPercent()

double fm.liveswitch.LayoutPreset.getBlockWidthPercent ( )

Gets the width of block elements as a percent of the container width between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getBlockWidth.

◆ getDirection()

fm.liveswitch.LayoutDirection fm.liveswitch.LayoutPreset.getDirection ( )

Gets the direction of the layout flow.

Defaults to fm.liveswitch.LayoutDirection#Horizontal.

◆ getFacetime()

static fm.liveswitch.LayoutPreset fm.liveswitch.LayoutPreset.getFacetime ( )
static

Gets a Facetime-style layout preset.

◆ getFloatHeight()

int fm.liveswitch.LayoutPreset.getFloatHeight ( )

Gets the height of floating elements in pixels.

Overrides fm.liveswitch.LayoutPreset#getFloatHeightPercent.

◆ getFloatHeightPercent()

double fm.liveswitch.LayoutPreset.getFloatHeightPercent ( )

Gets the height of floating elements as a percent of the container height between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getFloatHeight.

◆ getFloatMarginX()

int fm.liveswitch.LayoutPreset.getFloatMarginX ( )

Gets the X-margin between floating elements and the layout edge in pixels.

Overrides fm.liveswitch.LayoutPreset#getFloatMarginXPercent.

◆ getFloatMarginXPercent()

double fm.liveswitch.LayoutPreset.getFloatMarginXPercent ( )

Gets the X-margin between floating elements and the layout edge as a percent of the container width between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getFloatMarginX.

◆ getFloatMarginY()

int fm.liveswitch.LayoutPreset.getFloatMarginY ( )

Gets the Y-margin between floating elements and the layout edge in pixels.

Overrides fm.liveswitch.LayoutPreset#getFloatMarginYPercent.

◆ getFloatMarginYPercent()

double fm.liveswitch.LayoutPreset.getFloatMarginYPercent ( )

Gets the Y-margin between floating elements and the layout edge as a percent of the container height between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getFloatMarginY.

◆ getFloatWidth()

int fm.liveswitch.LayoutPreset.getFloatWidth ( )

Gets the width of floating elements in pixels.

Overrides fm.liveswitch.LayoutPreset#getFloatWidthPercent.

◆ getFloatWidthPercent()

double fm.liveswitch.LayoutPreset.getFloatWidthPercent ( )

Gets the width of floating elements as a percent of the container width between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getFloatWidth.

◆ getGoogleHangouts()

static fm.liveswitch.LayoutPreset fm.liveswitch.LayoutPreset.getGoogleHangouts ( )
static

Gets a Google Hangouts-style layout preset.

Note that this will present differently on mobile devices.

◆ getInlineMargin()

int fm.liveswitch.LayoutPreset.getInlineMargin ( )

Gets the size of the margin in pixels to use between inline elements.

◆ getMode()

fm.liveswitch.LayoutMode fm.liveswitch.LayoutPreset.getMode ( )

Gets the mode used by the layout engine.

Defaults to fm.liveswitch.LayoutMode#FloatLocal.

◆ getSkype()

static fm.liveswitch.LayoutPreset fm.liveswitch.LayoutPreset.getSkype ( )
static

Gets a Skype-style layout preset.

Note that this will present differently on mobile devices.

◆ setAlignment()

void fm.liveswitch.LayoutPreset.setAlignment ( fm.liveswitch.LayoutAlignment  value)

Sets the alignment of the layout.

Defaults to fm.liveswitch.LayoutAlignment#BottomRight.

◆ setBlockHeight()

void fm.liveswitch.LayoutPreset.setBlockHeight ( int  value)

Sets the height of block elements in pixels.

Overrides fm.liveswitch.LayoutPreset#getBlockHeightPercent.

◆ setBlockHeightPercent()

void fm.liveswitch.LayoutPreset.setBlockHeightPercent ( double  value)

Sets the height of block elements as a percent of the container height between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getBlockHeight.

◆ setBlockMarginX()

void fm.liveswitch.LayoutPreset.setBlockMarginX ( int  value)

Sets the X-margin between block elements and the layout edge in pixels.

Overrides fm.liveswitch.LayoutPreset#getBlockMarginXPercent.

◆ setBlockMarginXPercent()

void fm.liveswitch.LayoutPreset.setBlockMarginXPercent ( double  value)

Sets the X-margin between block elements and the layout edge as a percent of the container width between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getBlockMarginX.

◆ setBlockMarginY()

void fm.liveswitch.LayoutPreset.setBlockMarginY ( int  value)

Sets the Y-margin between block elements and the layout edge in pixels.

Overrides fm.liveswitch.LayoutPreset#getBlockMarginYPercent.

◆ setBlockMarginYPercent()

void fm.liveswitch.LayoutPreset.setBlockMarginYPercent ( double  value)

Sets the Y-margin between block elements and the layout edge as a percent of the container height between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getBlockMarginY.

◆ setBlockWidth()

void fm.liveswitch.LayoutPreset.setBlockWidth ( int  value)

Sets the width of block elements in pixels.

Overrides fm.liveswitch.LayoutPreset#getBlockWidthPercent.

◆ setBlockWidthPercent()

void fm.liveswitch.LayoutPreset.setBlockWidthPercent ( double  value)

Sets the width of block elements as a percent of the container width between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getBlockWidth.

◆ setDirection()

void fm.liveswitch.LayoutPreset.setDirection ( fm.liveswitch.LayoutDirection  value)

Sets the direction of the layout flow.

Defaults to fm.liveswitch.LayoutDirection#Horizontal.

◆ setFloatHeight()

void fm.liveswitch.LayoutPreset.setFloatHeight ( int  value)

Sets the height of floating elements in pixels.

Overrides fm.liveswitch.LayoutPreset#getFloatHeightPercent.

◆ setFloatHeightPercent()

void fm.liveswitch.LayoutPreset.setFloatHeightPercent ( double  value)

Sets the height of floating elements as a percent of the container height between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getFloatHeight.

◆ setFloatMarginX()

void fm.liveswitch.LayoutPreset.setFloatMarginX ( int  value)

Sets the X-margin between floating elements and the layout edge in pixels.

Overrides fm.liveswitch.LayoutPreset#getFloatMarginXPercent.

◆ setFloatMarginXPercent()

void fm.liveswitch.LayoutPreset.setFloatMarginXPercent ( double  value)

Sets the X-margin between floating elements and the layout edge as a percent of the container width between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getFloatMarginX.

◆ setFloatMarginY()

void fm.liveswitch.LayoutPreset.setFloatMarginY ( int  value)

Sets the Y-margin between floating elements and the layout edge in pixels.

Overrides fm.liveswitch.LayoutPreset#getFloatMarginYPercent.

◆ setFloatMarginYPercent()

void fm.liveswitch.LayoutPreset.setFloatMarginYPercent ( double  value)

Sets the Y-margin between floating elements and the layout edge as a percent of the container height between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getFloatMarginY.

◆ setFloatWidth()

void fm.liveswitch.LayoutPreset.setFloatWidth ( int  value)

Sets the width of floating elements in pixels.

Overrides fm.liveswitch.LayoutPreset#getFloatWidthPercent.

◆ setFloatWidthPercent()

void fm.liveswitch.LayoutPreset.setFloatWidthPercent ( double  value)

Sets the width of floating elements as a percent of the container width between 0.0 and 1.0.

Overrides fm.liveswitch.LayoutPreset#getFloatWidth.

◆ setInlineMargin()

void fm.liveswitch.LayoutPreset.setInlineMargin ( int  value)

Sets the size of the margin in pixels to use between inline elements.

◆ setMode()

void fm.liveswitch.LayoutPreset.setMode ( fm.liveswitch.LayoutMode  value)

Sets the mode used by the layout engine.

Defaults to fm.liveswitch.LayoutMode#FloatLocal.