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
Note: this is currently an experimental feature and not
covered by normal support guarantees. See
Provides APIs that manipulate a Smart GWT browser window. Within the OpenFin environment, the underlying implementation is actually via the
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:
-
Field Summary
Fields inherited from class com.smartgwt.client.core.BaseClass
config, configOnly, factoryCreated, factoryProperties, id, scClassName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Focuses (activates) this RemoteWindow.voidactivate(RemoteWindowCallback callback) Focuses (activates) this RemoteWindow.Add a otherWindowsChanged handler.voidblur()Blurs (deactivates) this RemoteWindow.voidblur(RemoteWindowCallback callback) Blurs (deactivates) this RemoteWindow.voidBrings this RemoteWindow to the front in window stacking order.voidbringToFront(RemoteWindowCallback callback) voidbringToFront(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback) Brings this RemoteWindow to the front in window stacking order.voidclose()Closes this RemoteWindow.voidclose(boolean force) voidclose(boolean force, RemoteWindowCallback callback) Closes this RemoteWindow.create()voidBlurs (deactivates) this RemoteWindow.voiddeactivate(RemoteWindowCallback callback) Blurs (deactivates) this RemoteWindow.voidfocus()Focuses (activates) this RemoteWindow.voidfocus(RemoteWindowCallback callback) Focuses (activates) this RemoteWindow.intGet the height of the entire browser window, including browser chrome.intGet the width of the entire browser window, including browser chrome.Returns the container window, if present, wrapping the browser window for this RemoteWindow.voidgetInfo(RemoteWindowMapCallback callback) Checks whether this RemoteWindow is showing.getJsObj()getName()Returns the name of this RemoteWindow.static RemoteWindowgetOrCreateRef(JavaScriptObject jsObj) intGet the height of the visible portion of the window, not including browser chrome or the scrollbar area.intGet the width of the visible portion of the window, not including browser chrome or the scrollbar area.Returns the parentRemoteWindowinstance that opened this RemoteWindow.Returns the browserwindowobject associated with this RemoteWindow.protected booleanvoidhide()Hides this RemoteWindow.voidhide(RemoteWindowCallback callback) voidhide(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback) Hides this RemoteWindow.booleanvoidisShowing(RemoteWindowBooleanCallback callback) Checks whether this RemoteWindow is showing.voidmaximize()Maximizes this RemoteWindow.voidmaximize(RemoteWindowCallback callback) voidmaximize(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback) Maximizes this RemoteWindow.voidminimize()Minimizes this RemoteWindow.voidminimize(RemoteWindowCallback callback) voidminimize(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback) Minimizes this RemoteWindow.voidmove(int x, int y) Moves this RemoteWindow.voidmove(int x, int y, RemoteWindowCallback callback) Moves this RemoteWindow.voidresize(int width, int height) Resizes this RemoteWindow.voidresize(int width, int height, RemoteWindowCallback callback) Resizes this RemoteWindow.voidrestore()Restores this RemoteWindow from being maximized or minimized.voidrestore(RemoteWindowCallback callback) voidrestore(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback) Restores this RemoteWindow from being maximized or minimized.voidvoidshow()Shows this RemoteWindow.voidshow(RemoteWindowCallback callback) voidshow(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, setScClassNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
RemoteWindow
public RemoteWindow() -
RemoteWindow
-
-
Method Details
-
getOrCreateRef
-
setJavaScriptObject
- Overrides:
setJavaScriptObjectin classBaseClass
-
create
-
isCreated
public boolean isCreated() -
getJsObj
-
getOrCreateJsObj
- Overrides:
getOrCreateJsObjin classBaseClass
-
activate
public void activate()Focuses (activates) this RemoteWindow. -
activate
Focuses (activates) this RemoteWindow.- Parameters:
callback- callback run after it's activated
-
blur
public void blur()Blurs (deactivates) this RemoteWindow. -
blur
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
- See Also:
-
bringToFront
Brings this RemoteWindow to the front in window stacking order.- Parameters:
callback- callback run after raising windowerrorCallback- callback run if raising fails
-
close
public void close()Closes this RemoteWindow. -
close
public void close(boolean force) - See Also:
-
close
Closes this RemoteWindow.- Parameters:
force- whether to force it closedcallback- callback run after it's closed
-
deactivate
public void deactivate()Blurs (deactivates) this RemoteWindow. -
deactivate
Blurs (deactivates) this RemoteWindow.- Parameters:
callback- callback run after it's deactivated
-
focus
public void focus()Focuses (activates) this RemoteWindow. -
focus
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
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
Checks whether this RemoteWindow is showing.- Parameters:
callback- callback to receive output
-
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
Returns the parentRemoteWindowinstance that opened this RemoteWindow.- Returns:
- instance wrapping the parent window or null
-
getWindow
Returns the browserwindowobject associated with this RemoteWindow.- Returns:
- browser window
-
hide
public void hide()Hides this RemoteWindow. -
hide
- See Also:
-
hide
Hides this RemoteWindow.- Parameters:
callback- callback run after hiding the windowerrorCallback- callback run if hiding fails
-
isShowing
Checks whether this RemoteWindow is showing.- Parameters:
callback- callback to receive output
-
maximize
public void maximize()Maximizes this RemoteWindow. -
maximize
- See Also:
-
maximize
Maximizes this RemoteWindow.- Parameters:
callback- callback run after maximizationerrorCallback- callback run if maximizing fails
-
minimize
public void minimize()Minimizes this RemoteWindow. -
minimize
- See Also:
-
minimize
Minimizes this RemoteWindow.- Parameters:
callback- callback run after minimizationerrorCallback- callback run if minimizing fails
-
move
public void move(int x, int y) Moves this RemoteWindow.- Parameters:
x- desired x-offset of left edgey- desired y-offset of top edge
-
move
Moves this RemoteWindow.- Parameters:
x- desired x-offset of left edgey- desired y-offset of top edgecallback- callback run after it's moved
-
addOtherWindowsChangedHandler
Add a otherWindowsChanged handler.Notification fired when the set of other
RemoteWindowschanges 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:
addOtherWindowsChangedHandlerin interfaceHasOtherWindowsChangedHandlers- Parameters:
handler- the otherWindowsChanged handler- Returns:
HandlerRegistrationused to remove this handler
-
resize
public void resize(int width, int height) Resizes this RemoteWindow.- Parameters:
width- desired new widthheight- desired new height
-
resize
Resizes this RemoteWindow.- Parameters:
width- desired new widthheight- desired new heightcallback- callback run after it's resized
-
restore
public void restore()Restores this RemoteWindow from being maximized or minimized. -
restore
- See Also:
-
restore
Restores this RemoteWindow from being maximized or minimized.- Parameters:
callback- callback run after restorationerrorCallback- callback run if restoring fails
-
show
public void show()Shows this RemoteWindow. -
show
- See Also:
-
show
Shows this RemoteWindow.- Parameters:
callback- callback run after showing the windowerrorCallback- callback run if showing fails
-
hasCreationContextWindow
protected boolean hasCreationContextWindow()
-