|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openfin.desktop.Window
public class Window
An object representing a window that can be controlled by the AppDesktop API.
| Constructor Summary | |
|---|---|
protected |
Window(Application application)
Window constructor |
| Method Summary | |
|---|---|
void |
addEventListener(String type,
EventListener listener,
AckListener callback)
Registers an event listener on the specified event |
void |
animate(AnimationTransitions transitions,
AnimationOptions options,
AckListener callback)
Performs the specified window transitions |
void |
blur()
Removes focus to the window |
void |
blur(AckListener listener)
Removes focus to the window |
void |
bringToFront()
Brings the window to the front of the window stack |
void |
bringToFront(AckListener listener)
Brings the window to the front of the window stack |
void |
close()
Closes the window |
void |
close(AckListener listener)
Closes the window |
void |
disableFrame(AckListener callback)
Prevents a user from changing a window's size/position when using the window's frame |
void |
enableFrame(AckListener callback)
Allows a user from changing a window's size/position when using the window's frame |
void |
flash(AckListener callback)
Draws attention to the window by flashing the taskbar and window caption. |
void |
focus()
Gives focus to the window |
void |
focus(AckListener listener)
Gives focus to the window |
void |
getBounds(AsyncCallback<WindowBounds> callback,
AckListener listener)
Gets the current bounds (top, left, width, height) of the window |
void |
getGroup(AsyncCallback<List<Window>> groupHandler,
AckListener callback)
Passes a list of wrapped windows in the same group An empty list is returned if the window is not in a group. |
String |
getName()
Gets name |
void |
getNativeId(AckListener listener)
Gets HWND of the current window |
void |
getOptions(AsyncCallback<WindowOptions> callback,
AckListener listener)
Returns the current options as stored in the desktop |
Application |
getParentApplication()
Returns the wrapped application that this window belongs to |
Window |
getParentWindow()
Get parent window |
void |
getSnapshot(AckListener callback)
Gets a base64 encoded PN snapshot of the window |
void |
getState(AckListener listener)
Gets the current state ("minimized", "maximized", or "restored") of the window |
String |
getUuid()
Gets UUID |
void |
hide()
Hides the window if it is shown |
void |
hide(AckListener listener)
Hides the window if it is shown |
void |
isShowing(AckListener listener)
Determines if the window is currently showing |
void |
joinGroup(Window window)
Joins the same window group as the specified window When windows are joined, if the user moves one of the windows, all other windows in the same group move too. |
void |
joinGroup(Window window,
AckListener callback)
Joins the same window group as the specified window |
void |
leaveGroup()
Leaves the current window group so that the window can be move independently of those in the group. |
void |
leaveGroup(AckListener callback)
Leaves the current window group so that the window can be move independently of those in the group. |
void |
maximize()
Maximizes the window |
void |
maximize(AckListener listener)
Mazimizes the window |
void |
mergeGroups(Window window)
Merges the instance's window group with the same window group as the specified window. |
void |
mergeGroups(Window window,
AckListener callback)
Merges the instance's window group with the same window group as the specified window. |
void |
minimize()
Minimizes the window |
void |
minimize(AckListener listener)
Minimizes the window |
void |
moveBy(int deltaLeft,
int deltaTop)
Moves the window by a specified amount |
void |
moveBy(int deltaLeft,
int deltaTop,
AckListener listener)
Moves the window by a specified amount |
void |
moveTo(int left,
int top)
Moves the window to a specified location |
void |
moveTo(int left,
int top,
AckListener listener)
Moves the window to a specified location |
void |
removeEventListener(String type,
EventListener listener,
AckListener callback)
Removes a previously registered event listener from the specified event |
void |
resizeBy(int deltaWidth,
int deltaHeight,
String anchor)
Resizes the window by the specified amount |
void |
resizeBy(int deltaWidth,
int deltaHeight,
String anchor,
AckListener listener)
Resizes the window by the specified amount |
void |
resizeTo(int width,
int height,
AckListener listener)
Resizes the window to the specified dimensions |
void |
resizeTo(int width,
int height,
String anchor)
Resizes the window to the specified dimensions |
void |
resizeTo(int width,
int height,
String anchor,
AckListener listener)
Resizes the window to the specified dimensions |
void |
restore()
Restores the window |
void |
restore(AckListener listener)
Restores the window |
void |
setAsForeground(AckListener callback)
Set's the window as the foreground window The window is activated(focused) and brought to front |
void |
setBounds(int left,
int top,
int width,
int height,
AckListener listener)
Sets the current bounds (top, left, width, height) of the window |
void |
show()
Shows the window if it is hidden |
void |
show(AckListener listener)
Shows the window if it is hidden |
void |
showAt(int left,
int top,
boolean toggle)
Shows the window if it is hidden at the specified location |
void |
showAt(int left,
int top,
boolean toggle,
AckListener listener)
Shows the window if it is hidden at the specified location |
void |
stopFlashing(AckListener callback)
Stops flashing of taskbar and window caption |
void |
updateOptions(org.json.JSONObject options)
Changes a window's options that were defined upon creation |
void |
updateOptions(WindowOptions options,
AckListener listener)
Changes a window's options that were defined upon creation |
static Window |
wrap(String applicationUuid,
String windowName,
DesktopConnection connection)
Attaches a Window object to an application Window that already exists |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Window(Application application)
application - Parent Application| Method Detail |
|---|
public String getUuid()
public String getName()
public Application getParentApplication()
public Window getParentWindow()
public void getSnapshot(AckListener callback)
callback - AckListener for the requestAckListener
public void show()
throws DesktopIOException,
DesktopException
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopExceptionpublic void show(AckListener listener)
listener - AckListener for the requestAckListener
public void hide()
throws DesktopIOException,
DesktopException
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopExceptionpublic void hide(AckListener listener)
listener - AckListener for the requestAckListener
public void close()
throws DesktopIOException,
DesktopException
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopExceptionpublic void close(AckListener listener)
listener - AckListener for the requestAckListener
public void minimize()
throws DesktopIOException,
DesktopException
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopExceptionpublic void minimize(AckListener listener)
listener - AckListener for the requestAckListener
public void maximize()
throws DesktopIOException,
DesktopException
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopExceptionpublic void maximize(AckListener listener)
listener - AckListener for the requestAckListener
public void restore()
throws DesktopIOException,
DesktopException
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopExceptionpublic void restore(AckListener listener)
listener - AckListener for the requestAckListener
public void focus()
throws DesktopIOException,
DesktopException
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopExceptionpublic void focus(AckListener listener)
listener - AckListener for the requestAckListener
public void blur()
throws DesktopIOException,
DesktopException
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopExceptionpublic void blur(AckListener listener)
listener - AckListener for the requestAckListenerpublic void flash(AckListener callback)
callback - AckListener for the requestAckListenerpublic void stopFlashing(AckListener callback)
callback - AckListener for the requestAckListener
public void showAt(int left,
int top,
boolean toggle)
throws DesktopIOException,
DesktopException
left - The left position of the windowtop - The right position of the windowtoggle - If true, the window will alternate between showing and hiding in subsequent calls
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopException
public void showAt(int left,
int top,
boolean toggle,
AckListener listener)
throws DesktopIOException,
DesktopException
left - The left position of the windowtop - The right position of the windowtoggle - If true, the window will alternate between showing and hiding in subsequent callslistener - AckListener for the request
DesktopIOException
DesktopExceptionAckListener,
DesktopIOException,
DesktopException
public void moveTo(int left,
int top)
throws DesktopIOException,
DesktopException
left - The left position of the windowtop - The right position of the window
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopException
public void moveTo(int left,
int top,
AckListener listener)
throws DesktopIOException,
DesktopException
left - The left position of the windowtop - The right position of the windowlistener - AckListener for the request
DesktopIOException
DesktopExceptionAckListener,
DesktopIOException,
DesktopException
public void moveBy(int deltaLeft,
int deltaTop)
throws DesktopIOException,
DesktopException
deltaLeft - The change in the left position of the windowdeltaTop - The change in the top position of the window
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopException
public void moveBy(int deltaLeft,
int deltaTop,
AckListener listener)
throws DesktopIOException,
DesktopException
deltaLeft - The change in the left position of the windowdeltaTop - The change in the top position of the windowlistener - AckListener for the request
DesktopIOException
DesktopExceptionAckListener,
DesktopIOException,
DesktopException
public void resizeTo(int width,
int height,
String anchor)
throws DesktopIOException,
DesktopException
width - Width of the windowheight - Height of the windowanchor - Specifies a corner to remain fixed during the resize.
Can take the values:
"top-left"
"top-right"
"bottom-left"
"bottom-right"
If undefined, the default is "top-left".
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopException
public void resizeTo(int width,
int height,
String anchor,
AckListener listener)
throws DesktopException
width - Width of the windowheight - Height of the windowanchor - Specifies a corner to remain fixed during the resize.
Can take the values:
"top-left"
"top-right"
"bottom-left"
"bottom-right"
If undefined, the default is "top-left".listener - AckListener for the request
DesktopExceptionAckListener,
DesktopException
public void resizeTo(int width,
int height,
AckListener listener)
throws DesktopIOException,
DesktopException
width - Width of the windowheight - Height of the windowlistener - AckListener for the request
DesktopIOException
DesktopExceptionAckListener,
DesktopIOException,
DesktopException
public void resizeBy(int deltaWidth,
int deltaHeight,
String anchor)
throws DesktopIOException,
DesktopException
deltaWidth - Width delta of the windowdeltaHeight - Height delta of the windowanchor - Specifies a corner to remain fixed during the resize. Please check resizeTo method for more information
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopException
public void resizeBy(int deltaWidth,
int deltaHeight,
String anchor,
AckListener listener)
throws DesktopException
deltaWidth - Width delta of the windowdeltaHeight - Height delta of the windowanchor - Specifies a corner to remain fixed during the resize. Please check resizeTo method for more informationlistener - AckListener for the request
DesktopExceptionAckListener,
DesktopExceptionpublic void getState(AckListener listener)
listener - AckListener for the requestAckListenerpublic void bringToFront(AckListener listener)
listener - AckListener for the requestAckListenerpublic void isShowing(AckListener listener)
listener - AckListener for the requestAckListener
public void getBounds(AsyncCallback<WindowBounds> callback,
AckListener listener)
callback - A function that is called if the method succeedslistener - A function that is called if the method failsAsyncCallback,
AckListener
public void setBounds(int left,
int top,
int width,
int height,
AckListener listener)
left - The left position of the window.top - The top position of the window.width - The width position of the window.height - The height position of the window.listener - AckListener for the requestAckListener
public void bringToFront()
throws DesktopException,
DesktopIOException
DesktopException
DesktopIOExceptionDesktopException,
DesktopIOException
public void updateOptions(WindowOptions options,
AckListener listener)
options - The window options to changelistener - AckListener for the requestWindowOptions,
AckListener
public void getOptions(AsyncCallback<WindowOptions> callback,
AckListener listener)
callback - A function that is called if the method succeedslistener - A function that is called if the method failsAsyncCallback,
AckListenerpublic void setAsForeground(AckListener callback)
callback - AckListener for the requestAckListenerpublic void enableFrame(AckListener callback)
callback - AckListener for the requestAckListenerpublic void disableFrame(AckListener callback)
callback - AckListener for the requestAckListener
public void updateOptions(org.json.JSONObject options)
throws DesktopException,
DesktopIOException
options - The window options to change
DesktopException
DesktopIOExceptionpublic void getNativeId(AckListener listener)
listener - A function that is called if the method failsAsyncCallback,
AckListener
public static Window wrap(String applicationUuid,
String windowName,
DesktopConnection connection)
applicationUuid - UUID of the parent ApplicationwindowName - name of the Windowconnection - Connection object to the AppDesktop
public void joinGroup(Window window)
throws DesktopException,
DesktopIOException
window - The window whose group is to be joined
DesktopException
DesktopIOException
public void joinGroup(Window window,
AckListener callback)
window - The window whose group is to be joinedcallback - AckListener for the requestAckListener
public void mergeGroups(Window window)
throws DesktopException,
DesktopIOException
window - The window whose group is to be merged
DesktopException
DesktopException
DesktopIOExceptionDesktopException,
DesktopException
public void mergeGroups(Window window,
AckListener callback)
window - The window whose group is to be mergedcallback - AckListener for the requestAckListener
public void leaveGroup()
throws DesktopException,
DesktopIOException
DesktopException
DesktopIOExceptionpublic void leaveGroup(AckListener callback)
callback - AckListener for the requestAckListener
public void animate(AnimationTransitions transitions,
AnimationOptions options,
AckListener callback)
transitions - Describes the animations to preformoptions - Options for the animationcallback - AckListener for the requestAnimationTransitions,
AnimationOptions,
AckListener
public void getGroup(AsyncCallback<List<Window>> groupHandler,
AckListener callback)
groupHandler - A class that receives a list of wrapped windows in the same group.callback - AckListener for the requestAsyncCallback,
AckListener
public void addEventListener(String type,
EventListener listener,
AckListener callback)
Supported window event types are:
app-connected (this window is connected to Runtime with javascript API)
app-loaded ( HTML document finished loading )
blurred
bounds-changed
bounds-changing
closed
close-requested
disabled-frame-bounds-changed
disabled-frame-bounds-changing
focused
frame-disabled
frame-enabled
group-changed
hidden
maximized
minimized
restored
shown
type - Event typelistener - Listener for the eventcallback - AckListener for the requestEventListener,
AckListener
public void removeEventListener(String type,
EventListener listener,
AckListener callback)
type - Event typelistener - Listener for the eventcallback - AckListener for the requestEventListener,
AckListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||