fm.liveswitch.java.LayoutManager Class Reference

An AWT-based layout manager. More...

Public Member Functions

Container getContainer ()
 Gets the layout container. More...
 
void setMode (LayoutMode value)
 Gets or sets the mode used by the layout engine. Defaults to LayoutMode.FloatLocal. More...
 
 LayoutManager (Container container)
 Initializes a new instance of the LayoutManager class. More...
 
 LayoutManager (Container container, LayoutPreset preset)
 Initializes a new instance of the LayoutManager class. More...
 
void layout ()
 Positions the local and remote views within the layout. More...
 
void componentHidden (ComponentEvent e)
 
void componentMoved (ComponentEvent e)
 
void componentShown (ComponentEvent e)
 
void componentResized (ComponentEvent e)
 
- Public Member Functions inherited from fm.liveswitch.LayoutManager< Component >
void addOnLayout (fm.liveswitch.IAction1< fm.liveswitch.Layout > value)
 Adds a handler that is raised when a layout is calculated. More...
 
boolean addRemoteMedia (fm.liveswitch.IViewableMedia< T > remoteMedia)
 Adds remote media to the layout. More...
 
boolean addRemoteView (String idValue, T view)
 Adds a remote view to the layout. More...
 
boolean addRemoteViews (String[] ids, T[] views)
 Adds remote views to the layout. More...
 
fm.liveswitch.LayoutOrigin getLayoutOrigin ()
 Gets the layout origin. More...
 
getLocalView ()
 Gets the local view from the layout. More...
 
getRemoteView (String idValue)
 Gets a remote view from the layout. More...
 
String[] getRemoteViewIds ()
 Gets the IDs of the remote views in the layout. More...
 
java.util.ArrayList< T > getRemoteViews ()
 Gets all remote views from the layout. More...
 
java.util.ArrayList< T > getRemoteViews (String[] ids)
 Gets remote views from the layout. More...
 
abstract void layout ()
 Positions the local and remote views within the layout. More...
 
 LayoutManager ()
 Initializes a new instance of the fm.liveswitch.LayoutManager class. More...
 
 LayoutManager (fm.liveswitch.LayoutPreset preset)
 Initializes a new instance of the fm.liveswitch.LayoutManager class. More...
 
void layoutOnMainThread ()
 Positions the local and remote views within the layout after dispatching to the main thread. More...
 
void removeOnLayout (fm.liveswitch.IAction1< fm.liveswitch.Layout > value)
 Removes a handler that is raised when a layout is calculated. More...
 
boolean removeRemoteMedia (fm.liveswitch.IViewableMedia< T > remoteMedia)
 Removes remote media from the layout. More...
 
boolean removeRemoteView (String idValue)
 Removes a remote view from the layout. More...
 
void removeRemoteViews ()
 Removes all remote views from the layout. More...
 
boolean removeRemoteViews (String[] ids)
 Removes remote views from the layout. More...
 
void reset ()
 Removes all remote views from the layout, then removes the local view from the layout. More...
 
boolean setLocalMedia (fm.liveswitch.IViewableMedia< T > localMedia)
 Adds the local media to the layout. More...
 
boolean setLocalView (T view)
 Adds the local view to the layout. More...
 
boolean swapRemoteMedia (fm.liveswitch.IViewableMedia< T > remoteMediaToRemove, fm.liveswitch.IViewableMedia< T > remoteMediaToAdd)
 Swaps remote media in the layout. More...
 
boolean swapRemoteView (String idToRemove, String idToAdd, T viewToAdd)
 Swaps a remote view in the layout. More...
 
boolean swapRemoteViews (String[] idsToRemove, String[] idsToAdd, T[] viewsToAdd)
 Swaps remote views in the layout. More...
 
boolean unsetLocalView ()
 Removes the local view from the layout. More...
 

Protected Member Functions

void addView (Component view)
 Adds a view to the container. More...
 
void removeView (Component view)
 Removes a view from the container. More...
 
void dispatchToMainThread (final IAction2< Object, Object > action, final Object arg1, final Object arg2)
 Dispatches an action to the main thread. More...
 
- Protected Member Functions inherited from fm.liveswitch.LayoutManager< Component >
abstract void addView (T view)
 Adds a view to the container. More...
 
abstract void dispatchToMainThread (fm.liveswitch.IAction2< Object, Object > action, Object arg1, Object arg2)
 Dispatches an action to the main thread. More...
 
doGetLocalView ()
 Gets the local view. More...
 
java.util.ArrayList< T > doGetRemoteViews (String idValue)
 Gets the remote views for a given remote view ID. More...
 
String[] doGetRemoteViewsIds ()
 Gets the remote view IDs. More...
 
fm.liveswitch.Layout getLayout (int layoutWidth, int layoutHeight, boolean local, int remoteCount)
 Gets a video frame layout. More...
 
fm.liveswitch.Layout getLayout (int layoutWidth, int layoutHeight, boolean local, int remoteCount, String[] remoteViewIds)
 Gets a video frame layout. More...
 
fm.liveswitch.Layout getLayout (int layoutWidth, int layoutHeight, boolean local, int remoteCount, String[] remoteViewIds, fm.liveswitch.Size localVideoSize, fm.liveswitch.Size[] remoteVideoSizes)
 Gets a video frame layout. More...
 
fm.liveswitch.Layout getLayout (int layoutWidth, int layoutHeight, int remoteCount)
 Gets a video frame layout. More...
 
fm.liveswitch.Layout getLayout (int layoutWidth, int layoutHeight, int remoteCount, String[] remoteViewIds)
 Gets a video frame layout. More...
 
abstract void removeView (T view)
 Removes a view from the container. More...
 
void setLayoutOrigin (fm.liveswitch.LayoutOrigin value)
 Sets the layout origin. More...
 

Detailed Description

An AWT-based layout manager.

Constructor & Destructor Documentation

◆ LayoutManager() [1/2]

fm.liveswitch.java.LayoutManager.LayoutManager ( Container  container)

Initializes a new instance of the LayoutManager class.

Parameters
containerThe layout container.

◆ LayoutManager() [2/2]

fm.liveswitch.java.LayoutManager.LayoutManager ( Container  container,
LayoutPreset  preset 
)

Initializes a new instance of the LayoutManager class.

Parameters
containerThe layout container.
presetThe layout preset.

Member Function Documentation

◆ addView()

void fm.liveswitch.java.LayoutManager.addView ( Component  view)
protected

Adds a view to the container.

Parameters
viewThe view to add.

◆ componentHidden()

void fm.liveswitch.java.LayoutManager.componentHidden ( ComponentEvent  e)

◆ componentMoved()

void fm.liveswitch.java.LayoutManager.componentMoved ( ComponentEvent  e)

◆ componentResized()

void fm.liveswitch.java.LayoutManager.componentResized ( ComponentEvent  e)

◆ componentShown()

void fm.liveswitch.java.LayoutManager.componentShown ( ComponentEvent  e)

◆ dispatchToMainThread()

void fm.liveswitch.java.LayoutManager.dispatchToMainThread ( final IAction2< Object, Object >  action,
final Object  arg1,
final Object  arg2 
)
protected

Dispatches an action to the main thread.

Parameters
actionThe action to invoke.
arg1The first argument.
arg2The second argument.

◆ getContainer()

Container fm.liveswitch.java.LayoutManager.getContainer ( )

Gets the layout container.

◆ layout()

void fm.liveswitch.java.LayoutManager.layout ( )

Positions the local and remote views within the layout.

◆ removeView()

void fm.liveswitch.java.LayoutManager.removeView ( Component  view)
protected

Removes a view from the container.

Parameters
viewThe view to remove.

◆ setMode()

void fm.liveswitch.java.LayoutManager.setMode ( LayoutMode  value)

Gets or sets the mode used by the layout engine. Defaults to LayoutMode.FloatLocal.