org.eclipse.actf.model.flash.util

## Class FlashMSAAUtil

- java.lang.Object
- - org.eclipse.actf.model.flash.util.FlashMSAAUtil

    public class FlashMSAAUtil
    extends Object

Utility class for accessible objects of Flash.

### Constructor Summary

Constructors
Constructor and Description
`FlashMSAAUtil()`

### Method Summary

Methods
`static FlashMSAAObject[]` `getFlashElements(FlashMSAAObject root)`
`static FlashMSAAObject[]` `getFlashElements(FlashMSAAObject root, boolean showOffScreen, boolean scanAll)`
`static IFlashPlayer[]` `getFlashPlayers(int hwnd)`
`static IFlashPlayer[]` `getFlashPlayers(int hwnd, boolean showOffScreen, boolean scanAll)`
`static String` `getHtmlAttribute(int iacc, String name)`
`static IDispatch` `getHtmlElementFromObject(Object objUnknown)`
`static IDispatch` `getHtmlElementFromPtr(int iacc)`
`static boolean` `isFlash(FlashMSAAObject accObject)`
`static boolean` `isFlash(int iacc)`
`static boolean` `isFlashClass(String className)` Check if the class name relates to Flash content
`static boolean` `isInvisibleFlash(FlashMSAAObject accObject)`
`static boolean` `isInvisibleFlash(int iacc)`
`static boolean` `isScanAll()`
`static boolean` `isShowOffscreen()`
`static void` `setScanAll(boolean scan_all)`
`static void` `setShowOffscreen(boolean show_offscreen)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### FlashMSAAUtil

    public FlashMSAAUtil()

### Method Detail

#### isFlash

    public static boolean isFlash(int iacc)

Parameters:
  `iacc` - the address of IAccessible
Returns:
  whether the target is a Flash object or not.

#### isInvisibleFlash

    public static boolean isInvisibleFlash(int iacc)

Parameters:
  `iacc` - the address of IAccessible
Returns:
  whether the accObject is an invisible Flash object or not. Invisible means that the Flash object is in window-less mode.

#### getFlashPlayers

    public static IFlashPlayer[] getFlashPlayers(int hwnd)

Parameters:
  `hwnd` - the root window to be used to obtain descendant FlashPlayers.
Returns:
  array `IFlashPlayer` that are descendant of the root window. It is same as getFlashPlayers(hwnd, false, false).

#### getFlashPlayers

    public static IFlashPlayer[] getFlashPlayers(int hwnd,
                                 boolean showOffScreen,
                                 boolean scanAll)

Parameters:
  `hwnd` - the root window to be used to obtain descendant FlashPlayers.
  `showOffScreen` - whether the objects being off screen are collected or not.
  `scanAll` - whether the window-less Flash objects are collected or not.
Returns:
  array `IFlashPlayer` that are descendant of the root window.

#### isFlash

    public static boolean isFlash(FlashMSAAObject accObject)

Parameters:
  `accObject` - the accessible object to be checked.
Returns:
  whether the accObject is a Flash object or not.

#### isInvisibleFlash

    public static boolean isInvisibleFlash(FlashMSAAObject accObject)

Parameters:
  `accObject` - the accessible object to be checked.
Returns:
  whether the accObject is an invisible Flash object or not. Invisible means that the Flash object is in window-less mode.

#### isFlashClass

    public static boolean isFlashClass(String className)

Check if the class name relates to Flash content

Parameters:
  `className` - target class name
Returns:
  true if class name is MacromediaFlashPlayerActiveX or ShockwaveFlashPlugin

#### getFlashElements

    public static FlashMSAAObject[] getFlashElements(FlashMSAAObject root)

Parameters:
  `root` - the root element to be used to obtain its children.
Returns:
  the children of the inputElement. It is same as getFlashElements(inputElement, false, false).

#### getFlashElements

    public static FlashMSAAObject[] getFlashElements(FlashMSAAObject root,
                                     boolean showOffScreen,
                                     boolean scanAll)

Parameters:
  `root` - the root element to be traversed to collect Flash objects.
  `showOffScreen` - whether the objects being off screen are collected or not.
  `scanAll` - whether the window-less Flash objects are collected or not.
Returns:
  the collected Flash objects.

#### isScanAll

    public static boolean isScanAll()

Returns:
  the scan mode of Flash finder. If it is true then the window-less Flash objects are also collected.

#### setScanAll

    public static void setScanAll(boolean scan_all)

Parameters:
  `scan_all` - the scan mode of Flash finder. If it is true then the window-less Flash objects are also collected.

#### isShowOffscreen

    public static boolean isShowOffscreen()

Returns:
  the scan mode of Flash finder. If it is true then the off screen objects are also collected.

#### setShowOffscreen

    public static void setShowOffscreen(boolean show_offscreen)

Parameters:
  `show_offscreen` - the scan mode of Flash finder. If it is true then the off screen objects are also collected.

#### getHtmlElementFromPtr

    public static IDispatch getHtmlElementFromPtr(int iacc)

Parameters:
  `iacc` - the address of IAccessible
Returns:
  the HTML element interface of the objUnknown.

#### getHtmlAttribute

    public static String getHtmlAttribute(int iacc,
                          String name)

Parameters:
  `iacc` - the address of IAccessible
  `name` - target attribute name
Returns:
  the attribute value string.

#### getHtmlElementFromObject

    public static IDispatch getHtmlElementFromObject(Object objUnknown)

Parameters:
  `objUnknown` - the object to be used to obtain the interface of HTML element. It must be an instance of IAccessibleObject or an instance of IUnknown
Returns:
  the HTML element interface of the objUnknown.
See Also:
  `IUnknown`