Class Layout


  • public class Layout
    extends 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 Detail

      • 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 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 CompletionStage<Void> applyPreset​(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 CompletionStage<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.