Package com.smartgwt.client.browser.window

# Class RemoteWindow

java.lang.Object
com.smartgwt.client.core.BaseClass
com.smartgwt.client.browser.window.RemoteWindow

All Implemented Interfaces:
  `HasHandlers`, `HasOtherWindowsChangedHandlers`

Direct Known Subclasses:
  `OpenFinWindow`

public class RemoteWindow extends BaseClass implements HasOtherWindowsChangedHandlers
Note: this is currently an experimental feature and not covered by normal support guarantees. See `Experimental Features` for more information.
Provides APIs that manipulate a Smart GWT browser window. Within the OpenFin environment, the underlying implementation is actually via the `OpenFinWindow` class.

See Also:
  - `MultiWindow`
  - `Experimental Features`

- ## Field Summary

  ### Fields inherited from class com.smartgwt.client.core.BaseClass

  `config, configOnly, factoryCreated, factoryProperties, id, scClassName`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RemoteWindow()`
  `RemoteWindow(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `activate()`
  Focuses (activates) this RemoteWindow.
  `void`
  `activate(RemoteWindowCallback callback)`
  Focuses (activates) this RemoteWindow.
  `HandlerRegistration`
  `addOtherWindowsChangedHandler(OtherWindowsChangedHandler handler)`
  Add a otherWindowsChanged handler.
  `void`
  `blur()`
  Blurs (deactivates) this RemoteWindow.
  `void`
  `blur(RemoteWindowCallback callback)`
  Blurs (deactivates) this RemoteWindow.
  `void`
  `bringToFront()`
  Brings this RemoteWindow to the front in window stacking order.
  `void`
  `bringToFront(RemoteWindowCallback callback)`
  `void`
  `bringToFront(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback)`
  Brings this RemoteWindow to the front in window stacking order.
  `void`
  `close()`
  Closes this RemoteWindow.
  `void`
  `close(boolean force)`
  `void`
  `close(boolean force, RemoteWindowCallback callback)`
  Closes this RemoteWindow.
  `JavaScriptObject`
  `create()`
  `void`
  `deactivate()`
  Blurs (deactivates) this RemoteWindow.
  `void`
  `deactivate(RemoteWindowCallback callback)`
  Blurs (deactivates) this RemoteWindow.
  `void`
  `focus()`
  Focuses (activates) this RemoteWindow.
  `void`
  `focus(RemoteWindowCallback callback)`
  Focuses (activates) this RemoteWindow.
  `int`
  `getBrowserHeight()`
  Get the height of the entire browser window, including browser chrome.
  `int`
  `getBrowserWidth()`
  Get the width of the entire browser window, including browser chrome.
  `Map`
  `getContainerWindow()`
  Returns the container window, if present, wrapping the browser window for this RemoteWindow.
  `void`
  `getInfo(RemoteWindowMapCallback callback)`
  Checks whether this RemoteWindow is showing.
  `JavaScriptObject`
  `getJsObj()`
  `String`
  `getName()`
  Returns the name of this RemoteWindow.
  `JavaScriptObject`
  `getOrCreateJsObj()`
  `static RemoteWindow`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `int`
  `getPageHeight()`
  Get the height of the visible portion of the window, not including browser chrome or the scrollbar area.
  `int`
  `getPageWidth()`
  Get the width of the visible portion of the window, not including browser chrome or the scrollbar area.
  `RemoteWindow`
  `getParent()`
  Returns the parent `RemoteWindow` instance that opened this RemoteWindow.
  `Map`
  `getWindow()`
  Returns the browser `window` object associated with this RemoteWindow.
  `protected boolean`
  `hasCreationContextWindow()`
  `void`
  `hide()`
  Hides this RemoteWindow.
  `void`
  `hide(RemoteWindowCallback callback)`
  `void`
  `hide(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback)`
  Hides this RemoteWindow.
  `boolean`
  `isCreated()`
  `void`
  `isShowing(RemoteWindowBooleanCallback callback)`
  Checks whether this RemoteWindow is showing.
  `void`
  `maximize()`
  Maximizes this RemoteWindow.
  `void`
  `maximize(RemoteWindowCallback callback)`
  `void`
  `maximize(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback)`
  Maximizes this RemoteWindow.
  `void`
  `minimize()`
  Minimizes this RemoteWindow.
  `void`
  `minimize(RemoteWindowCallback callback)`
  `void`
  `minimize(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback)`
  Minimizes this RemoteWindow.
  `void`
  `move(int x, int y)`
  Moves this RemoteWindow.
  `void`
  `move(int x, int y, RemoteWindowCallback callback)`
  Moves this RemoteWindow.
  `void`
  `resize(int width, int height)`
  Resizes this RemoteWindow.
  `void`
  `resize(int width, int height, RemoteWindowCallback callback)`
  Resizes this RemoteWindow.
  `void`
  `restore()`
  Restores this RemoteWindow from being maximized or minimized.
  `void`
  `restore(RemoteWindowCallback callback)`
  `void`
  `restore(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback)`
  Restores this RemoteWindow from being maximized or minimized.
  `void`
  `setJavaScriptObject(JavaScriptObject jsObj)`
  `void`
  `show()`
  Shows this RemoteWindow.
  `void`
  `show(RemoteWindowCallback callback)`
  `void`
  `show(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback)`
  Shows this RemoteWindow.

  ### Methods inherited from class com.smartgwt.client.core.BaseClass

  `addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, asSGWTComponent, clearDynamicProperty, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setID, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface com.google.gwt.event.shared.HasHandlers

  `fireEvent`

- ## Constructor Details

  - ### RemoteWindow

    public RemoteWindow()

  - ### RemoteWindow

    public RemoteWindow(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static RemoteWindow getOrCreateRef(JavaScriptObject jsObj)

  - ### setJavaScriptObject

    public void setJavaScriptObject(JavaScriptObject jsObj)
    Overrides:
      `setJavaScriptObject` in class `BaseClass`

  - ### create

    public JavaScriptObject create()
    Specified by:
      `create` in class `BaseClass`

  - ### isCreated

    public boolean isCreated()
    Overrides:
      `isCreated` in class `BaseClass`

  - ### getJsObj

    public JavaScriptObject getJsObj()
    Overrides:
      `getJsObj` in class `BaseClass`

  - ### getOrCreateJsObj

    public JavaScriptObject getOrCreateJsObj()
    Overrides:
      `getOrCreateJsObj` in class `BaseClass`

  - ### activate

    public void activate()
    Focuses (activates) this RemoteWindow.

  - ### activate

    public void activate(RemoteWindowCallback callback)
    Focuses (activates) this RemoteWindow.
    Parameters:
      `callback` - callback run after it's activated

  - ### blur

    public void blur()
    Blurs (deactivates) this RemoteWindow.

  - ### blur

    public void blur(RemoteWindowCallback callback)
    Blurs (deactivates) this RemoteWindow.
    Parameters:
      `callback` - callback run after it's deactivated

  - ### bringToFront

    public void bringToFront()
    Brings this RemoteWindow to the front in window stacking order.

  - ### bringToFront

    public void bringToFront(RemoteWindowCallback callback)
    See Also:
      - `bringToFront()`

  - ### bringToFront

    public void bringToFront(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback)
    Brings this RemoteWindow to the front in window stacking order.
    Parameters:
      `callback` - callback run after raising window
      `errorCallback` - callback run if raising fails

  - ### close

    public void close()
    Closes this RemoteWindow.

  - ### close

    public void close(boolean force)
    See Also:
      - `close()`

  - ### close

    public void close(boolean force, RemoteWindowCallback callback)
    Closes this RemoteWindow.
    Parameters:
      `force` - whether to force it closed
      `callback` - callback run after it's closed

  - ### deactivate

    public void deactivate()
    Blurs (deactivates) this RemoteWindow.

  - ### deactivate

    public void deactivate(RemoteWindowCallback callback)
    Blurs (deactivates) this RemoteWindow.
    Parameters:
      `callback` - callback run after it's deactivated

  - ### focus

    public void focus()
    Focuses (activates) this RemoteWindow.

  - ### focus

    public void focus(RemoteWindowCallback callback)
    Focuses (activates) this RemoteWindow.
    Parameters:
      `callback` - callback run after it's activated

  - ### getBrowserHeight

    public int getBrowserHeight()
    Get the height of the entire browser window, including browser chrome.
    Returns:
      height of the browser

  - ### getBrowserWidth

    public int getBrowserWidth()
    Get the width of the entire browser window, including browser chrome.
    Returns:
      width of the browser

  - ### getContainerWindow

    public Map getContainerWindow()
    Returns the container window, if present, wrapping the browser window for this RemoteWindow. If OpenFin is present, this will return the associated OpenFin Window.
    Returns:
      OpenFin window

  - ### getInfo

    public void getInfo(RemoteWindowMapCallback callback)
    Checks whether this RemoteWindow is showing.
    Parameters:
      `callback` - callback to receive output

  - ### getName

    public String getName()
    Returns the name of this RemoteWindow.
    Returns:
      window name

  - ### getPageHeight

    public int getPageHeight()
    Get the height of the visible portion of the window, not including browser chrome or the scrollbar area.
    Returns:
      height of the page

  - ### getPageWidth

    public int getPageWidth()
    Get the width of the visible portion of the window, not including browser chrome or the scrollbar area.
    Returns:
      width of the page

  - ### getParent

    public RemoteWindow getParent()
    Returns the parent `RemoteWindow` instance that opened this RemoteWindow.
    Returns:
      instance wrapping the parent window or null

  - ### getWindow

    public Map getWindow()
    Returns the browser `window` object associated with this RemoteWindow.
    Returns:
      browser window

  - ### hide

    public void hide()
    Hides this RemoteWindow.

  - ### hide

    public void hide(RemoteWindowCallback callback)
    See Also:
      - `hide()`

  - ### hide

    public void hide(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback)
    Hides this RemoteWindow.
    Parameters:
      `callback` - callback run after hiding the window
      `errorCallback` - callback run if hiding fails

  - ### isShowing

    public void isShowing(RemoteWindowBooleanCallback callback)
    Checks whether this RemoteWindow is showing.
    Parameters:
      `callback` - callback to receive output

  - ### maximize

    public void maximize()
    Maximizes this RemoteWindow.

  - ### maximize

    public void maximize(RemoteWindowCallback callback)
    See Also:
      - `maximize()`

  - ### maximize

    public void maximize(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback)
    Maximizes this RemoteWindow.
    Parameters:
      `callback` - callback run after maximization
      `errorCallback` - callback run if maximizing fails

  - ### minimize

    public void minimize()
    Minimizes this RemoteWindow.

  - ### minimize

    public void minimize(RemoteWindowCallback callback)
    See Also:
      - `minimize()`

  - ### minimize

    public void minimize(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback)
    Minimizes this RemoteWindow.
    Parameters:
      `callback` - callback run after minimization
      `errorCallback` - callback run if minimizing fails

  - ### move

    public void move(int x, int y)
    Moves this RemoteWindow.
    Parameters:
      `x` - desired x-offset of left edge
      `y` - desired y-offset of top edge

  - ### move

    public void move(int x, int y, RemoteWindowCallback callback)
    Moves this RemoteWindow.
    Parameters:
      `x` - desired x-offset of left edge
      `y` - desired y-offset of top edge
      `callback` - callback run after it's moved

  - ### addOtherWindowsChangedHandler

    public HandlerRegistration addOtherWindowsChangedHandler(OtherWindowsChangedHandler handler)
    Add a otherWindowsChanged handler.

    Notification fired when the set of other `RemoteWindows` changes or requires re-synchronization due a call to create(), `close()`, or a page reload in a different RemoteWindow.

    This method has no default implementation.

    Specified by:
      `addOtherWindowsChangedHandler` in interface `HasOtherWindowsChangedHandlers`
    Parameters:
      `handler` - the otherWindowsChanged handler
    Returns:
      `HandlerRegistration` used to remove this handler

  - ### resize

    public void resize(int width, int height)
    Resizes this RemoteWindow.
    Parameters:
      `width` - desired new width
      `height` - desired new height

  - ### resize

    public void resize(int width, int height, RemoteWindowCallback callback)
    Resizes this RemoteWindow.
    Parameters:
      `width` - desired new width
      `height` - desired new height
      `callback` - callback run after it's resized

  - ### restore

    public void restore()
    Restores this RemoteWindow from being maximized or minimized.

  - ### restore

    public void restore(RemoteWindowCallback callback)
    See Also:
      - `restore()`

  - ### restore

    public void restore(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback)
    Restores this RemoteWindow from being maximized or minimized.
    Parameters:
      `callback` - callback run after restoration
      `errorCallback` - callback run if restoring fails

  - ### show

    public void show()
    Shows this RemoteWindow.

  - ### show

    public void show(RemoteWindowCallback callback)
    See Also:
      - `show()`

  - ### show

    public void show(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback)
    Shows this RemoteWindow.
    Parameters:
      `callback` - callback run after showing the window
      `errorCallback` - callback run if showing fails

  - ### hasCreationContextWindow

    protected boolean hasCreationContextWindow()