org.eclipse.actf.accservice
Interface IWindowService

All Superinterfaces:
Serializable
All Known Implementing Classes:
IA2WindowService, JavaWindowService, MsaaWindowService

public interface IWindowService
extends Serializable

a service for functionality related to whatever objects constitute top-level windows of the native desktop.

Author:
Mike Squillace

Method Summary
 void addTopLevelWindowListener(TopLevelWindowEventListener listener)
          add a listener to be notified of the creation or destruction of top-level 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 the listener previously added via addTopLevelWindowListener
 void setActiveWindow(Object window)
          sets the given window as the activeWindow
 

Method Detail

getTopLevelWindows

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

Returns:
array of top-level windows or an empty array if unavailable

getActiveWindow

Object getActiveWindow()
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).

Returns:
active or current window

getProcessId

int getProcessId(Object window)
get the process id with which the given window is associated

Parameters:
window - window for which process id is desired
Returns:
process id for given window or -1 if no id can be obtained

getCurrentProcessId

int getCurrentProcessId()
Returns:
process id

addTopLevelWindowListener

void addTopLevelWindowListener(TopLevelWindowEventListener listener)
add a listener to be notified of the creation or destruction of top-level windows

Parameters:
listener -

removeTopLevelWindowListener

void removeTopLevelWindowListener(TopLevelWindowEventListener listener)
remove the listener previously added via addTopLevelWindowListener

Parameters:
listener -
See Also:
addTopLevelWindowListener(TopLevelWindowEventListener)

setActiveWindow

void setActiveWindow(Object window)
sets the given window as the activeWindow

Parameters:
window - to be set as active