Class: View

View

Represents an OpenFin View.

Methods

(async, static) create(options) → {Promise.<View>}

EXPERIMENTAL

Creates a new View.

Parameters:
Name Type Description
options View~options

View creation options

Tutorials:
Returns:
Type
Promise.<View>

(static) getCurrent() → {Promise.<View>}

EXPERIMENTAL

Asynchronously returns a View object that represents the current view

Tutorials:
  • Tutorial: View.getCurrent
Returns:
Type
Promise.<View>

(static) getCurrentSync() → {View}

EXPERIMENTAL

Synchronously returns a View object that represents the current view

Tutorials:
  • Tutorial: View.getCurrentSync
Returns:
Type
View

(async, static) wrap(identity) → {Promise.<View>}

EXPERIMENTAL

Asynchronously returns a View object that represents an existing view.

Parameters:
Name Type Description
identity Identity
Tutorials:
  • Tutorial: View.wrap
Returns:
Type
Promise.<View>

(static) wrapSync(identity) → {View}

EXPERIMENTAL

Synchronously returns a View object that represents an existing view.

Parameters:
Name Type Description
identity Identity
Tutorials:
Returns:
Type
View

attach() → {Promise.<void>}

EXPERIMENTAL

Attaches the current view to a the given window identity. Identity must be the identity of a window in the same application. This detaches the view from it's current window, and sets the view to be destroyed when its new window closes.

Tutorials:
Returns:
Type
Promise.<void>

destroy() → {Promise.<void>}

EXPERIMENTAL

Destroys the current view

Tutorials:
  • Tutorial: View.destroy
Returns:
Type
Promise.<void>

getCurrentWindow() → {Promise.<_Window>}

EXPERIMENTAL
EXPERIMENTAL

Retrieves the window the view is currently attached to.

Tutorials:
  • Tutorial: View.getCurrentWindow
Returns:
Type
Promise.<_Window>

getInfo() → {Promise.<ViewInfo>}

EXPERIMENTAL

Gets the view's info.

Tutorials:
Returns:
Type
Promise.<ViewInfo>

hide() → {Promise.<void>}

EXPERIMENTAL

Hides the current view if it is currently visible.

Tutorials:
Returns:
Type
Promise.<void>

setBounds(bounds) → {Promise.<void>}

EXPERIMENTAL

Sets the bounds (top, left, width, height) of the view relative to its window.

Parameters:
Name Type Description
bounds Bounds
Tutorials:
Returns:
Type
Promise.<void>

show() → {Promise.<void>}

EXPERIMENTAL

Shows the current view if it is currently hidden.

Tutorials:
Returns:
Type
Promise.<void>