// creation of testobject here
// first we write what we are intend to do to log file
log.println( "creating a test environment" );
SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF());
final XShape oShape = SOF.createShape(xDrawDoc,
3000,4500,15000,1000,"Rectangle");
DrawTools.getShapes(DrawTools.getDrawPage(xDrawDoc,0)).add(oShape);
AccessibilityTools at = new AccessibilityTools();
XWindow xWindow = at.getCurrentWindow ((XMultiServiceFactory)tParam.getMSF(),aModel);
XAccessible xRoot = at.getAccessibleObject(xWindow);
at.printAccessibleTree(log, xRoot, tParam.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
oObj = at.getAccessibleObjectForRole
(xRoot, AccessibleRole.SHAPE, "Rectangle");
// create test environment here
TestEnvironment tEnv = new TestEnvironment( oObj );
tEnv.addObjRelation("EventProducer",
new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
public void fireEvent() {
try {
Size size = oShape.getSize();
size.Width += 100;
oShape.setSize(size);
} catch(com.sun.star.beans.PropertyVetoException e) {}
}
});
log.println("Implementation Name: " + utils.getImplName(oObj));