Locators for Non-Components: Locators as Non-Component Support Modules


The non-component support module mentioned in the previous description is called a locator. A locator is an object that contains information that JavaStar uses when referencing a non-component object. Locators have two methods--one for recording and one for playback. When you are recording, JavaStar sends a screen location to the locator. The locator looks through all objects, locates the object in that location, then returns a string to insert into the script. During playback, JavaStar sends locator strings back to the locator, and the locator returns the screen location.

JavaStar currently provides locators for several popular non-AWT toolkits:

You can find the class files and the source code for the Bongo, IFC, and KL Group locators in the ../javastar/contrib/locators directory. For KL Group, newKLG is the most recent version.

You can find the JFC Swing locator ` in the ../javastar/contribe/jfc directory (newNCL is the latest locator).

JavaStar provides a simple and a full version of each locator. The simple version allows identification only by index. The full version allows internal names and support for object captions, as well as indexes.

If these are the only non-AWT toolkits your applications or applets use, you do not need to create a locator--you just need to know how to use the existing ones. For other non-AWT toolkits, however, you do need to implement your own locators. This requires knowledge of Java, but JavaStar provides tools and examples so that you don't have to create this from scratch.




Send feedback to JavaStar-feedback@suntest.com
Copyright © 1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303. All rights reserved.