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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Focuses (activates) this RemoteWindow.void
activate
(RemoteWindowCallback callback) Focuses (activates) this RemoteWindow.Add a otherWindowsChanged handler.void
blur()
Blurs (deactivates) this RemoteWindow.void
blur
(RemoteWindowCallback callback) Blurs (deactivates) this RemoteWindow.void
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.create()
void
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
Get the height of the entire browser window, including browser chrome.int
Get the width of the entire browser window, including browser chrome.Returns the container window, if present, wrapping the browser window for this RemoteWindow.void
getInfo
(RemoteWindowMapCallback callback) Checks whether this RemoteWindow is showing.getJsObj()
getName()
Returns the name of this RemoteWindow.static RemoteWindow
getOrCreateRef
(JavaScriptObject jsObj) int
Get the height of the visible portion of the window, not including browser chrome or the scrollbar area.int
Get the width of the visible portion of the window, not including browser chrome or the scrollbar area.Returns the parentRemoteWindow
instance that opened this RemoteWindow.Returns the browserwindow
object associated with this RemoteWindow.protected boolean
void
hide()
Hides this RemoteWindow.void
hide
(RemoteWindowCallback callback) void
hide
(RemoteWindowCallback callback, RemoteWindowErrorCallback errorCallback) Hides this RemoteWindow.boolean
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
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
-
-
Method Details
-
getOrCreateRef
-
setJavaScriptObject
- Overrides:
setJavaScriptObject
in classBaseClass
-
create
-
isCreated
public boolean isCreated() -
getJsObj
-
getOrCreateJsObj
- Overrides:
getOrCreateJsObj
in 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 parentRemoteWindow
instance that opened this RemoteWindow.- Returns:
- instance wrapping the parent window or null
-
getWindow
Returns the browserwindow
object 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
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 interfaceHasOtherWindowsChangedHandlers
- 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 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()
-