Class Layout

java.lang.Object
com.openfin.desktop.Layout

public class Layout
extends java.lang.Object
Layouts give app providers the ability to embed multiple views in a single window. The Layout enables the initialization and manipulation of a window's Layout.
Author:
Anthony
  • Method Summary

    Modifier and Type Method Description
    java.util.concurrent.CompletionStage<java.lang.Void> applyPreset​(java.lang.String presetType)
    Replaces a Platform window's layout with a preset layout arrangement using the existing Views attached to the window.
    java.util.concurrent.CompletionStage<LayoutOptions> getConfig()
    Returns the configuration of the window's layout.
    java.util.concurrent.CompletionStage<java.lang.Void> replace​(LayoutOptions newLayout)
    Replaces a Platform window's layout with a new layout.
    static Layout wrap​(Identity identity, DesktopConnection connection)
    Returns a Layout object that represents a Window's layout.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • wrap

      public static Layout wrap​(Identity identity, DesktopConnection connection)
      Returns a Layout object that represents a Window's layout.
      Parameters:
      identity - window identity
      connection - Connection object to the AppDesktop.
      Returns:
      Layout object that represents a Window's layout.
    • getConfig

      public java.util.concurrent.CompletionStage<LayoutOptions> getConfig()
      Returns the configuration of the window's layout. Returns the same information that is returned for all windows in getSnapshot.
      Returns:
      New CompletionStage for the configuration of the window's layout.
    • applyPreset

      public java.util.concurrent.CompletionStage<java.lang.Void> applyPreset​(java.lang.String presetType)
      Replaces a Platform window's layout with a preset layout arrangement using the existing Views attached to the window. The preset options are "columns", "grid", "rows", or "tabs".
      Parameters:
      presetType - "columns", "grid", "rows", or "tabs".
      Returns:
      New CompletionStage when the command is delivered.
    • replace

      public java.util.concurrent.CompletionStage<java.lang.Void> replace​(LayoutOptions newLayout)
      Replaces a Platform window's layout with a new layout. Any views that were in the old layout but not the new layout will be destroyed.
      Parameters:
      newLayout - New layout to implement in the target window.
      Returns:
      New CompletionStage when the command is delivered.