org.sikuli.api.event
Interface TargetEventListener


public interface TargetEventListener

Interface for a screen region to register and receive notifications when a target has appeared, vanished, or moved within this screen region.

Author:
Tom Yeh (tom.yeh@colorado.edu)

Method Summary
 void targetAppeared(TargetEvent event)
          Invoked when a target has appeared in a screen region.
 void targetMoved(TargetEvent event)
          Invoked when a target has moved to another location in a screen region.
 void targetVanished(TargetEvent event)
          Invoked when a target has vanished from a screen region.
 

Method Detail

targetAppeared

void targetAppeared(TargetEvent event)
Invoked when a target has appeared in a screen region.

Parameters:
event - the TargetEvent object for the target that might appear.

event.getTarget() returns the target that has just appeared.

event.getScreenRegion() returns the screen region where the target is being watched.

event.getTargetRegion() returns the screen region currently occupied by the target.


targetVanished

void targetVanished(TargetEvent event)
Invoked when a target has vanished from a screen region.

Parameters:
event - the TargetEvent object for the target that might vanish.

event.getTarget() returns the target that has just vanished.

event.getScreenRegion() returns the screen region where the target is being watched.

event.getTargetRegion() returns the screen region last occupied by the target before it vanished.


targetMoved

void targetMoved(TargetEvent event)
Invoked when a target has moved to another location in a screen region.

Parameters:
event - the TargetEvent object for the target that might move.

event.getTarget() returns the target that has just moved.

event.getScreenRegion() returns the screen region where the target is being watched.

event.getTargetRegion() returns the screen region currently occupied by the target (i.e., the region the target has just moved to).



Copyright © 2014. All rights reserved.