|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.model.AbstractModel
org.eclipse.actf.model.AbstractRenderableModel
org.eclipse.actf.accservice.core.win32.msaa.MsaaGuiModel
public class MsaaGuiModel
a model implementation for a hierarchy of IAccessible components used by the Microsoft Active Accessibility (MSAA) model
Field Summary | |
---|---|
static String |
MSAA_MODEL
|
Fields inherited from class org.eclipse.actf.model.AbstractRenderableModel |
---|
eventIdMap |
Fields inherited from class org.eclipse.actf.model.AbstractModel |
---|
baseType, configuration, locator, nodeToTypeNameMap, runtimeContext, treeNodeWalker |
Constructor Summary | |
---|---|
|
MsaaGuiModel()
create a new MsaaModel |
protected |
MsaaGuiModel(String extendedAttrib)
|
Method Summary | |
---|---|
void |
asyncInvokeOnUIThread(Runnable runnable)
will be invoked on the current thread |
protected Class |
getAccessibilityEventServiceType()
|
protected Class |
getAccessibleElementType()
|
ModelEventType[] |
getModelEventTypes(Class sourceType)
get the model event types for the given source type. A ModelEventType object
describes the types of events that can be fired within the context of this runtime model. If the sourceType is null ,
then all of the event types of which this model is aware will be returned else only events that can be fired by the given sourceType
will be returned.
default implementation returns null |
INodeLocator |
getNodeLocator()
retrieves a locator for finding and identifying nodes in the model. |
String |
getNodeName(Object element)
return the short name of this element. The id for an element is model-specific. For example, it may be the tag name of an element of a model representing a structure that conforms to W3the C DOM specification or the simple class name of the object. returns the qualified class name (i.e. without the package name) of the given element returns the accessibleRole of this element if it is of type MsaaAccessible |
INodeWalker |
getNodeWalker()
retrieve the NodeWalker for traversing elements in this model |
String[] |
getPackageNames()
returns an array of the names of packages to be imported by CodeProcessors. |
String |
getTypeName(String nodeName)
returns the type name associated with this nodeName. The nodeName parameter is most frequently formed by calling getNodeName . The name returned identifies
the type that is represented by this node name in the graph.
If the specified nodeName was not obtained from org.eclipse.actf.accservice.AccessibleElement |
protected void |
initEventIdMap()
used to initialize the eventId map, which is keyed by eventId that corresponds to a ModelEventType
instance. |
void |
invokeOnUIThread(Runnable runnable)
will be invoked on the current thread |
boolean |
isTopDown()
|
boolean |
isUIThread()
returns whether or not the currently executing thread is the UI thread. |
boolean |
isValid(Object comp)
returns whether or not the specified component is valid for access. Components may be invalid because their underlying resources have been disposed, because the device that displays or renders them is destroyed, or for many other reasons. default implementation merely checks that the component is not null . |
boolean |
isVisible(Object comp)
returns whether or not the specified component is currently visible |
void |
registerModelEventListener(IModelEventListener listener,
ModelEventType[] eventTypes,
Object[] params)
register a listener to receive notification when events with the given eventTypes are fired within this model. The eventTypes should be obtained from one of the getModelEventTypes methods.
Optional parameters can also be passed to facilitate additional side effects or for additional information about the context
in which events are being fired.
The only optional parameter is an int that specifies flags for MSAA event-processing. |
protected void |
registerModelEventListener(IModelEventListener listener,
ModelEventType[] eventTypes,
Object[] params,
String accServiceName)
|
boolean |
requestFocusFor(Object comp)
request the focus for the specified component. This method should be invoked, for example, just prior to validation for a report that reflects the state of the component while visible. |
void |
unregisterModelEventListener(IModelEventListener listener,
ModelEventType[] eventTypes)
unregister a previously registered listener. |
protected void |
unregisterModelEventListener(IModelEventListener listener,
ModelEventType[] eventTypes,
String accServiceName)
|
Methods inherited from class org.eclipse.actf.model.AbstractRenderableModel |
---|
getBoundingRectangle, getModelEventType, highlight, initEventIdMap, registerModelEventListener |
Methods inherited from class org.eclipse.actf.model.AbstractModel |
---|
addModelChangeListener, fireModelChangeEvent, getBaseType, getDefaultAliasPrefix, getName, getNodeId, getOrder, removeModelChangeListener, setFilters, setModelType, setNodeID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.actf.model.IModel |
---|
addModelChangeListener, getBaseType, getDefaultAliasPrefix, getName, getNodeId, getOrder, removeModelChangeListener, setNodeID |
Field Detail |
---|
public static final String MSAA_MODEL
Constructor Detail |
---|
public MsaaGuiModel()
protected MsaaGuiModel(String extendedAttrib)
Method Detail |
---|
public INodeWalker getNodeWalker()
NodeWalker
for traversing elements in this model
getNodeWalker
in interface IModel
getNodeWalker
in class AbstractModel
null
if
no walker is availablepublic String getNodeName(Object element)
MsaaAccessible
getNodeName
in interface IModel
getNodeName
in class AbstractModel
element
- - element for which name is desired
null
if not availablepublic String getTypeName(String nodeName)
getNodeName
. The name returned identifies
the type that is represented by this node name in the graph.
If the specified nodeName was not obtained from getNodeName
, then
implementers should make a rough guess regarding the underlying type on the basis of the package names
associated with this model via getPackageNames
.
org.eclipse.actf.accservice.AccessibleElement
getTypeName
in interface IModel
getTypeName
in class AbstractModel
nodeName
- - as returned by getNodeName
#getNodeName(Object)Object)
,
IModel.getPackageNames()
protected Class getAccessibleElementType()
protected Class getAccessibilityEventServiceType()
protected void initEventIdMap()
AbstractRenderableModel
ModelEventType
instance. Event ids are model-specific and typically defined as part of that model's definition.
initEventIdMap
in class AbstractRenderableModel
ModelEventType
,
AbstractRenderableModel.registerModelEventListener(IModelEventListener, ModelEventType[])
public ModelEventType[] getModelEventTypes(Class sourceType)
ModelEventType
object
describes the types of events that can be fired within the context of this runtime model. If the sourceType is null
,
then all of the event types of which this model is aware will be returned else only events that can be fired by the given sourceType
will be returned.
default implementation returns null
getModelEventTypes
in interface IRenderableModel
getModelEventTypes
in class AbstractRenderableModel
sourceType
- type to be queried for events
ModelEventType
public void registerModelEventListener(IModelEventListener listener, ModelEventType[] eventTypes, Object[] params)
getModelEventTypes
methods.
Optional parameters can also be passed to facilitate additional side effects or for additional information about the context
in which events are being fired.
The only optional parameter is an int that specifies flags for MSAA event-processing. If such a flag (or
combination of flags is not present, DEFAULT_CONTEXT_FLAG
will be used.
registerModelEventListener
in interface IRenderableModel
registerModelEventListener
in class AbstractRenderableModel
listener
- listener to be notified when specified events occureventTypes
- event types for which listener is being registeredparams
- - additional parameters (may be null
)IRenderableModel.getModelEventType(Object)
,
IRenderableModel.getModelEventTypes(Class)
protected void registerModelEventListener(IModelEventListener listener, ModelEventType[] eventTypes, Object[] params, String accServiceName)
public void unregisterModelEventListener(IModelEventListener listener, ModelEventType[] eventTypes)
getModelEventTypes
methods.
unregisterModelEventListener
in interface IRenderableModel
unregisterModelEventListener
in class AbstractRenderableModel
listener
- listener to be unregisteredeventTypes
- event types for which listener is to be unregisteredIRenderableModel.registerModelEventListener(IModelEventListener, ModelEventType[])
,
ModelEventType
protected void unregisterModelEventListener(IModelEventListener listener, ModelEventType[] eventTypes, String accServiceName)
public boolean isVisible(Object comp)
isVisible
in interface IRenderableModel
isVisible
in class AbstractRenderableModel
comp
- - component to be tested
public boolean isValid(Object comp)
null
.
isValid
in interface IRenderableModel
isValid
in class AbstractRenderableModel
comp
- - component to be tested
true
if this component is valid, false
otherwiseInvalidComponentException
public boolean requestFocusFor(Object comp)
requestFocusFor
in interface IRenderableModel
requestFocusFor
in class AbstractRenderableModel
comp
- - component for which focus is desired
true
if focus is successful, false
otherwisepublic void asyncInvokeOnUIThread(Runnable runnable)
runnable
- - Runnable to be invoked in UI threadIRenderableModel.invokeOnUIThread(Runnable)
public void invokeOnUIThread(Runnable runnable)
runnable
- - Runnable to be invoked in UI threadIRenderableModel.isUIThread()
public boolean isUIThread()
IRenderableModel
false
, the client will typically need to invoke the invokeOnUIThread
method in order to effect the GUI.
true
if the current thread is the UI thread, false
otherwiseIRenderableModel.invokeOnUIThread(Runnable)
public boolean isTopDown()
public INodeLocator getNodeLocator()
AbstractModel
getNodeLocator
in interface IModel
getNodeLocator
in class AbstractModel
public String[] getPackageNames()
IModel
IModel
will, upon its
instantiation and initialization, import the list of packages and make their traditional short-forms available.
(Of course, short-forms are language-dependent.) Each element of the array is only a name for a
package (e.g. 'my.java.package').
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |