org.eclipse.actf.accservice.javapp.adapt
Class SwingAccessibilityAdaptor

java.lang.Object
  extended by org.eclipse.actf.accservice.adapt.AccessibilityAdaptor
      extended by org.eclipse.actf.accservice.javapp.adapt.SwingAccessibilityAdaptor
All Implemented Interfaces:
IAdaptor

public class SwingAccessibilityAdaptor
extends AccessibilityAdaptor

adaptor implementation for converting nodes in a Swing component hierarchy to instances of IAccessibleElement.

Author:
Mike Squillace

Constructor Summary
SwingAccessibilityAdaptor()
           
 
Method Summary
 Object adapt(Object o, Class type)
          adapts the object to the given type.
 
Methods inherited from class org.eclipse.actf.accservice.adapt.AccessibilityAdaptor
createAccessibleElement, getSupportedTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingAccessibilityAdaptor

public SwingAccessibilityAdaptor()
Method Detail

adapt

public Object adapt(Object o,
                    Class type)
             throws Exception
adapts the object to the given type. This method is responsible for casting or transforming or somehow producing an object of the specified type that represents a set of properties of or directly corresponds to the specified object. The type to which the object is to be adapted should be one of those returned by getSupportedTypes.

All attempts should be made to insure that this method is symmetric. That is, if object o is of type B, then:

 adapt(adapt(o, A.class), B.class) = o
 

Also note that both types A and B should be returned by getSupportedTypes.

Parameters:
o - - object to be adapted
type - - the type to which the object is to be adapted
Returns:
an instance of the specified type or null if the object could not be adapted to the given type
Throws:
Exception
See Also:
IAdaptor.getSupportedTypes()