com.opera.core.systems.scope.services.ums
Class WindowManager

java.lang.Object
  extended by com.opera.core.systems.scope.AbstractService
      extended by com.opera.core.systems.scope.services.ums.WindowManager
All Implemented Interfaces:
IWindowManager

public class WindowManager
extends AbstractService
implements IWindowManager

window-manager service implementation, handles events such as window-closed and updated and tracks window being loaded

Author:
Deniz Turkoglu

Field Summary
 
Fields inherited from class com.opera.core.systems.scope.AbstractService
services
 
Constructor Summary
WindowManager(ScopeServices services, java.lang.String version)
           
 
Method Summary
 void addWindow(WmProtos.WindowInfo info)
           
 void clearFilter()
           
 void closeAllWindows()
           
 void closeWindow(int windowId)
           
 void filterActiveWindow()
          Filter only the active window so we don't get messages from other windows (like thread messages)
 void filterWindow(java.lang.Integer windowId)
           
 void findDriverWindow()
          Find a window suitable for driving, find the active window, if it is not a normal window, find the first normal window via JXPath.
 int getActiveWindowId()
           
 java.lang.String getActiveWindowTitle()
           
 java.util.concurrent.atomic.AtomicInteger getLastHttpResponseCode()
           
 int getOpenWindowCount()
           
 java.util.List<java.lang.Integer> getWindowHandles()
           
 void init()
          Get the list of all windows, then find a driver window (which needs to be 'normal' window) after that set the active window to that window.
 void openUrl(int windowId, java.lang.String url)
           
 void removeWindow(java.lang.Integer windowId)
           
 void resetWindowsList()
           
 void setActiveWindow(java.lang.String title)
           
 void setActiveWindowId(java.lang.Integer windowId)
          Sets the active window if the window is of type 'normal' discards any other window such as 'dialog' or 'unknown'.
 
Methods inherited from class com.opera.core.systems.scope.AbstractService
buildPayload, executeCommand, executeCommand, getVersion, isVersionInRange, sleep, xpathIterator, xpathPointer, xpathQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowManager

public WindowManager(ScopeServices services,
                     java.lang.String version)
Method Detail

getLastHttpResponseCode

public java.util.concurrent.atomic.AtomicInteger getLastHttpResponseCode()
Specified by:
getLastHttpResponseCode in interface IWindowManager

getOpenWindowCount

public int getOpenWindowCount()
Specified by:
getOpenWindowCount in interface IWindowManager

setActiveWindowId

public void setActiveWindowId(java.lang.Integer windowId)
Description copied from interface: IWindowManager
Sets the active window if the window is of type 'normal' discards any other window such as 'dialog' or 'unknown'.

Specified by:
setActiveWindowId in interface IWindowManager

getActiveWindowId

public int getActiveWindowId()
Specified by:
getActiveWindowId in interface IWindowManager

addWindow

public void addWindow(WmProtos.WindowInfo info)
Specified by:
addWindow in interface IWindowManager

removeWindow

public void removeWindow(java.lang.Integer windowId)
Specified by:
removeWindow in interface IWindowManager

init

public void init()
Description copied from interface: IWindowManager
Get the list of all windows, then find a driver window (which needs to be 'normal' window) after that set the active window to that window.

Specified by:
init in interface IWindowManager

findDriverWindow

public void findDriverWindow()
Description copied from interface: IWindowManager
Find a window suitable for driving, find the active window, if it is not a normal window, find the first normal window via JXPath.

Specified by:
findDriverWindow in interface IWindowManager

filterActiveWindow

public void filterActiveWindow()
Filter only the active window so we don't get messages from other windows (like thread messages)

Specified by:
filterActiveWindow in interface IWindowManager

setActiveWindow

public void setActiveWindow(java.lang.String title)
Specified by:
setActiveWindow in interface IWindowManager

closeAllWindows

public void closeAllWindows()
Specified by:
closeAllWindows in interface IWindowManager

getWindowHandles

public java.util.List<java.lang.Integer> getWindowHandles()
Specified by:
getWindowHandles in interface IWindowManager

resetWindowsList

public void resetWindowsList()
Specified by:
resetWindowsList in interface IWindowManager

clearFilter

public void clearFilter()
Specified by:
clearFilter in interface IWindowManager

filterWindow

public void filterWindow(java.lang.Integer windowId)
Specified by:
filterWindow in interface IWindowManager

getActiveWindowTitle

public java.lang.String getActiveWindowTitle()

openUrl

public void openUrl(int windowId,
                    java.lang.String url)
Specified by:
openUrl in interface IWindowManager

closeWindow

public void closeWindow(int windowId)
Specified by:
closeWindow in interface IWindowManager


Copyright © 2011. All Rights Reserved.