Package com.openfin.desktop
Class Layout
- java.lang.Object
-
- com.openfin.desktop.Layout
-
public class Layout extends java.lang.ObjectLayouts 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
All Methods Static Methods Instance Methods Concrete Methods 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 Layoutwrap(Identity identity, DesktopConnection connection)Returns a Layout object that represents a Window's layout.
-
-
-
Method Detail
-
wrap
public static Layout wrap(Identity identity, DesktopConnection connection)
Returns a Layout object that represents a Window's layout.- Parameters:
identity- window identityconnection- 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.
-
-