|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.accservice.core.win32.msaa.MsaaAccessible
public class MsaaAccessible
implementation of IAccessibleElement
for GUI controls that implement Microsoft Active Accessibility (MSAA) interfaces.
This class is a wrapper for an IAccessible pointer, a pointer that Provides access to a native Windows object that provides assistive technologies (ATs) with properties of GUI components that allow the AT to offer an alternative interface to the control. This class relies upon actf-msaa.dll for most of its implementation. The documentation for the Microsoft COM library and, in particular, for MSAA will be helpful.
Field Summary | |
---|---|
protected int |
accRef
|
protected int |
childId
|
static int |
childId_self
|
protected static boolean |
computingIndexInParent
|
protected Object |
element
|
protected Map |
errorCodeReturnMap
|
static String |
errString
|
protected static boolean |
highLightEnabled
|
protected int |
hwnd
|
protected int |
indexInParent
|
protected static int |
MAX_CHILDREN
|
protected static String |
SWT_ACC_TYPENAME
|
protected static String |
SWT_CTRL_TYPENAME
|
protected static String |
SWT_WIDGET_TYPENAME
|
Constructor Summary | |
---|---|
MsaaAccessible(int ref)
create a MsaaAccessible from an IAccessible pointer. |
|
MsaaAccessible(int hwnd,
int childID)
wrap the given object as an ACTF IAccessibleElement . |
|
MsaaAccessible(Object elem)
wrap the given object as a ACTF IAccessibleElement . |
|
MsaaAccessible(Point location)
create an MsaaAccessible element by utilizing the MSAA function AccessibleObjectFromPoint . |
Method Summary | |
---|---|
void |
checkIsValid()
tests whether or not this MsaaAccessible is in a valid state. |
static String |
classNameFromHwnd(int hwnd)
gets the class name for the given handle |
protected void |
dispose()
dispose the native resources |
boolean |
doDefaultAction()
|
boolean |
drawRectangle(Rectangle pt)
|
Object |
element()
get the element associated with this accessible element |
boolean |
equals(Object other)
|
static boolean |
eraseDesktop()
|
boolean |
eraseRectangle(Rectangle drawRef)
|
Map |
errorCodeMap()
|
protected void |
finalize()
|
Object |
getAccessibleAction()
return the default action |
int |
getAccessibleAddress()
|
IAccessibleElement |
getAccessibleChild(int index)
return the accessible that has the given index in its parent. |
int |
getAccessibleChildCount()
return the number of children. |
IAccessibleElement[] |
getAccessibleChildren()
return all of the children of this MsaaAccessible. |
Object |
getAccessibleDefaultAction()
|
String |
getAccessibleDescription()
return description or use of control |
String |
getAccessibleHelp()
return help info (usually a tool tip) |
String |
getAccessibleHelpTopic()
|
int |
getAccessibleIndexInParent()
retreave the index of this accessible within its parent accessible |
String |
getAccessibleKeyboardShortcut()
return the keyboard shortcut or mnemonic |
Rectangle |
getAccessibleLocation()
Gets the bounds of this object in the form of a Rectangle object. |
String |
getAccessibleMsaaRole()
|
String |
getAccessibleName()
return the name or short description of this element |
IAccessibleElement |
getAccessibleParent()
returns the parent accessible object. |
String |
getAccessibleRole()
return role or function of control. |
IAccessibleElement[] |
getAccessibleSelection()
get the list of selected accessibles. |
Set |
getAccessibleState()
return the state of the control. |
Object |
getAccessibleValue()
return the value (e.g. of a scroll bar or combo) |
int |
getChildId()
get the child ID for this MsaaAccessible, if any. |
int |
getWindowHandle()
|
String |
getWindowHandleAsHex()
get the handle value as a hex string |
boolean |
hasFocus()
returns whether the accessible object has the keyboard focus |
int |
hashCode()
|
protected void |
initFromHtmlElement(int htmlElemRef)
|
protected void |
initFromHwnd(int hwnd,
int childID)
|
protected void |
initFromPoint(int x,
int y)
|
protected void |
internalDispose()
|
protected boolean |
internalDoDefaultAction()
|
protected boolean |
internalDrawRectangle(int x,
int y,
int wt,
int ht)
|
protected static boolean |
internalEraseDesktop()
|
protected boolean |
internalEraseRectangle(int left,
int top,
int right,
int bottom)
|
protected String |
internalGetAccessibleAction()
|
protected int |
internalGetAccessibleChild(int childID)
|
protected int |
internalGetAccessibleChildCount()
|
protected int[] |
internalGetAccessibleChildren()
|
protected String |
internalGetAccessibleDescription()
|
protected String |
internalGetAccessibleHelp()
|
protected String |
internalGetAccessibleHelpTopic()
|
protected String |
internalGetAccessibleKeyboardShortcut()
|
protected Rectangle |
internalGetAccessibleLocation()
|
protected String |
internalGetAccessibleName()
|
protected int |
internalGetAccessibleParent()
|
protected String |
internalGetAccessibleRole()
|
protected int |
internalGetAccessibleRoleAsInt()
|
protected int[] |
internalGetAccessibleSelection()
|
protected int |
internalGetAccessibleState()
|
protected String |
internalGetAccessibleValue()
|
protected int |
internalGetAddress()
|
protected int |
internalGetChildId()
|
protected static String |
internalGetClassNameFromHwnd(int hwnd)
|
protected int |
internalGetWindowHandle()
|
protected boolean |
internalHasFocus()
|
protected static int |
internalInitFromHtmlElement(int htmlElemRef)
|
protected static int |
internalInitFromHwnd(int hwnd,
int childID)
|
protected static int |
internalInitFromPoint(int x,
int y)
|
protected int |
internalRef()
used by native code only. |
protected boolean |
internalSelect(int flag)
|
protected boolean |
isDisposed(Object control)
|
static boolean |
isHighlightEnabled()
|
protected boolean |
isSimpleChild()
returns whether or not this MsaaAccessible is a simple child. |
static Map |
propertyMap()
|
protected void |
putErrorCode(String key,
String value)
|
boolean |
select(int flag)
|
static void |
setHighlightEnabled(boolean val)
|
MsaaAccessible |
testAndConvertToIA2(MsaaAccessible acc)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final String SWT_CTRL_TYPENAME
protected static final String SWT_WIDGET_TYPENAME
protected static final String SWT_ACC_TYPENAME
public static int childId_self
protected static boolean highLightEnabled
protected static boolean computingIndexInParent
protected int accRef
protected int hwnd
protected int childId
protected Object element
protected int indexInParent
public static String errString
protected Map errorCodeReturnMap
protected static final int MAX_CHILDREN
Constructor Detail |
---|
public MsaaAccessible(int hwnd, int childID)
IAccessibleElement
. The
ACTF engine will invoke this constructor using a registered adaptor factory. Clients do not
typically call this constructor.
Note: To create a MsaaAccessible from a handle for an SWT control, use a child id of
ACC.CHILDID_SELF
.
hwnd
- -
window handle for an SWT controlchildID
- -
child ID (if any)public MsaaAccessible(Object elem)
IAccessibleElement
. The
ACTF engine will invoke this constructor using a registered adaptor factory. Clients do not
typically call this constructor.
Currently, supported controls include:
IHTMLElement
interface
elem
- public MsaaAccessible(Point location)
AccessibleObjectFromPoint
.
location
- - any location on the current display devicepublic MsaaAccessible(int ref)
ref
- - pointer valueMethod Detail |
---|
public Object element()
element
in interface IAccessibleElement
null
if this object was not initialized in such a way that the original element is availableprotected int internalRef()
public int getAccessibleAddress()
protected int internalGetAddress()
public int getWindowHandle()
public String getWindowHandleAsHex()
public int getChildId()
ACC.CHILDID_SELF
public void checkIsValid() throws InvalidComponentException
getElement()
(if any) is not disposed
checkIsValid
in interface IAccessibleElement
InvalidComponentException
protected boolean isDisposed(Object control)
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public String toString()
toString
in class Object
protected void initFromHwnd(int hwnd, int childID)
protected void initFromPoint(int x, int y)
protected void initFromHtmlElement(int htmlElemRef)
protected int internalGetWindowHandle()
protected int internalGetChildId()
protected static int internalInitFromHwnd(int hwnd, int childID)
protected static int internalInitFromHtmlElement(int htmlElemRef)
protected static int internalInitFromPoint(int x, int y)
protected void dispose() throws InvalidComponentException
InvalidComponentException
protected void internalDispose()
public static String classNameFromHwnd(int hwnd)
hwnd
- -
window handle
protected static String internalGetClassNameFromHwnd(int hwnd)
public IAccessibleElement getAccessibleParent() throws InvalidComponentException
getAccessibleParent
in interface IAccessibleElement
null
if no parent for this element exists
InvalidComponentException
protected int internalGetAccessibleParent()
public int getAccessibleChildCount() throws InvalidComponentException
getAccessibleChildCount
in interface IAccessibleElement
InvalidComponentException
protected int internalGetAccessibleChildCount()
public IAccessibleElement getAccessibleChild(int index) throws InvalidComponentException
getAccessibleChild
in interface IAccessibleElement
index
- index of desired child in parent
null
if
the index is invalid
InvalidComponentException
protected int internalGetAccessibleChild(int childID)
public int getAccessibleIndexInParent() throws InvalidComponentException
getAccessibleIndexInParent
in interface IAccessibleElement
InvalidComponentException
public IAccessibleElement[] getAccessibleChildren() throws InvalidComponentException
getAccessibleChildren
in interface IAccessibleElement
InvalidComponentException
protected int[] internalGetAccessibleChildren()
protected boolean isSimpleChild()
ACC.CHILDID_SELF
.
true
if this is a simple child, false
otherwisepublic boolean hasFocus() throws InvalidComponentException
InvalidComponentException
protected boolean internalHasFocus()
public String getAccessibleName() throws InvalidComponentException
getAccessibleName
in interface IAccessibleElement
InvalidComponentException
protected String internalGetAccessibleName()
public Object getAccessibleValue() throws InvalidComponentException
getAccessibleValue
in interface IAccessibleElement
InvalidComponentException
protected String internalGetAccessibleValue()
public String getAccessibleHelp() throws InvalidComponentException
InvalidComponentException
protected String internalGetAccessibleHelp()
public String getAccessibleKeyboardShortcut() throws InvalidComponentException
getAccessibleKeyboardShortcut
in interface IAccessibleElement
InvalidComponentException
protected String internalGetAccessibleKeyboardShortcut()
public Object getAccessibleAction() throws InvalidComponentException
getAccessibleAction
in interface IAccessibleElement
null
if no default action is provided
InvalidComponentException
public Object getAccessibleDefaultAction() throws InvalidComponentException
InvalidComponentException
protected String internalGetAccessibleAction()
public String getAccessibleDescription() throws InvalidComponentException
getAccessibleDescription
in interface IAccessibleElement
InvalidComponentException
protected String internalGetAccessibleDescription()
public String getAccessibleRole() throws InvalidComponentException
Note: All attempts will be made to
return one of the pre-defined role constants in AccessibleConstants
. Should the role be
unknown or not match one of the pre-defined constants, the original
role string from the underlying accessibility model will be returned.
getAccessibleRole
in interface IAccessibleElement
InvalidComponentException
AccessibleConstants
public String getAccessibleMsaaRole() throws InvalidComponentException
InvalidComponentException
protected int internalGetAccessibleRoleAsInt()
protected String internalGetAccessibleRole()
public Set getAccessibleState() throws InvalidComponentException
Note: All attempts will be made to
return one of the pre-defined state constants in AccessibleConstants
. Should the state be
unknown or not match one of the pre-defined constants, the original
state from the underlying accessibility model will be returned.
getAccessibleState
in interface IAccessibleElement
InvalidComponentException
AccessibleConstants
protected int internalGetAccessibleState()
public IAccessibleElement[] getAccessibleSelection() throws InvalidComponentException
getAccessibleSelection
in interface IAccessibleElement
InvalidComponentException
protected int[] internalGetAccessibleSelection()
public Rectangle getAccessibleLocation() throws InvalidComponentException
getAccessibleLocation
in interface IAccessibleElement
InvalidComponentException
protected Rectangle internalGetAccessibleLocation()
public boolean drawRectangle(Rectangle pt)
protected boolean internalDrawRectangle(int x, int y, int wt, int ht)
public boolean eraseRectangle(Rectangle drawRef)
public static boolean eraseDesktop()
protected static boolean internalEraseDesktop()
protected boolean internalEraseRectangle(int left, int top, int right, int bottom)
public static boolean isHighlightEnabled()
public static void setHighlightEnabled(boolean val)
public MsaaAccessible testAndConvertToIA2(MsaaAccessible acc) throws Exception
Exception
public boolean doDefaultAction() throws InvalidComponentException
InvalidComponentException
protected boolean internalDoDefaultAction()
public String getAccessibleHelpTopic() throws InvalidComponentException
InvalidComponentException
protected String internalGetAccessibleHelpTopic()
public boolean select(int flag) throws InvalidComponentException
InvalidComponentException
protected boolean internalSelect(int flag)
protected void putErrorCode(String key, String value)
public Map errorCodeMap()
public static Map propertyMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |