org.eclipse.actf.accservice.javapp
Class JavaWindowService

java.lang.Object
  extended by org.eclipse.actf.accservice.javapp.JavaWindowService
All Implemented Interfaces:
Serializable, IWindowService

public class JavaWindowService
extends Object
implements IWindowService

Author:
wscarter
See Also:
Serialized Form

Constructor Summary
JavaWindowService()
           
 
Method Summary
 void addTopLevelWindowListener(TopLevelWindowEventListener listener)
          add a listener to be notified of creation and destruction of top-level native windows
 Object getActiveWindow()
          get the active or current window.
 int getCurrentProcessId()
           
 int getProcessId(Object window)
          get the process id with which the given window is associated
 Object[] getTopLevelWindows()
          retreave all top-level windows from whatever object is considered to be the underlying platform's desktop.
 void removeTopLevelWindowListener(TopLevelWindowEventListener listener)
          remove a previously added top-level window listener
 void setActiveWindow(Object window)
          sets the given window as the activeWindow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaWindowService

public JavaWindowService()
Method Detail

getTopLevelWindows

public Object[] getTopLevelWindows()
retreave all top-level windows from whatever object is considered to be the underlying platform's desktop.

Specified by:
getTopLevelWindows in interface IWindowService
Returns:
array of top-level windows or an empty array if unavailable

getActiveWindow

public Object getActiveWindow()
Description copied from interface: IWindowService
get the active or current window. This is the window that has keyboard focus andis the subject of processes in the framework (e.g. inspection, validation).

Specified by:
getActiveWindow in interface IWindowService
Returns:
active or current window

addTopLevelWindowListener

public void addTopLevelWindowListener(TopLevelWindowEventListener listener)
add a listener to be notified of creation and destruction of top-level native windows

Specified by:
addTopLevelWindowListener in interface IWindowService
Parameters:
listener -

removeTopLevelWindowListener

public void removeTopLevelWindowListener(TopLevelWindowEventListener listener)
remove a previously added top-level window listener

Specified by:
removeTopLevelWindowListener in interface IWindowService
Parameters:
listener -
See Also:
IWindowService.addTopLevelWindowListener(TopLevelWindowEventListener)

getCurrentProcessId

public int getCurrentProcessId()
Specified by:
getCurrentProcessId in interface IWindowService
Returns:
process id

getProcessId

public int getProcessId(Object window)
Description copied from interface: IWindowService
get the process id with which the given window is associated

Specified by:
getProcessId in interface IWindowService
Parameters:
window - window for which process id is desired
Returns:
process id for given window or -1 if no id can be obtained

setActiveWindow

public void setActiveWindow(Object window)
Description copied from interface: IWindowService
sets the given window as the activeWindow

Specified by:
setActiveWindow in interface IWindowService
Parameters:
window - to be set as active