01: package abbot.editor.recorder;
02:
03: import java.awt.*;
04: import abbot.script.*;
05:
06: /**
07: * Record simple clicks on a Button component. <p>
08: */
09: public class ButtonRecorder extends ComponentRecorder {
10:
11: public ButtonRecorder(Resolver resolver) {
12: super (resolver);
13: }
14:
15: /** Don't need to store any position or modifier information. */
16: protected Step createClick(Component target, int x, int y,
17: int mods, int count) {
18: ComponentReference cr = getResolver().addComponent(target);
19: return new Action(getResolver(), null, "actionClick",
20: new String[] { cr.getID() });
21: }
22: }
|