Package com.openfin.desktop
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.
-
Method Details
-
wrap
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
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
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.
-