private void init(String name, Type type, Object v1, Object v2, Object v3, long now) { this.name = name; this.type = type; if (now > 0) { time = now; } else { time = new Date().getTime(); } if (Type.GENERIC.equals(type)) { setVals(v1, v2, v3); } else if (Type.FINDFAILED.equals(type) || Type.MISSING.equals(type)) { setRegion(v3); setImage(v2); setPattern(v1); } else { setRegion(v3); setMatch(v2); setPattern(v1); } }
if (FindFailedResponse.HANDLE.equals(response)) { ObserveEvent.Type type = ObserveEvent.Type.FINDFAILED; if (findFailedHandler != null && ((ObserverCallBack) findFailedHandler).getType().equals(type)) { log(lvl, "handleFindFailed: Response.HANDLE: calling handler"); evt = new ObserveEvent("", type, target, img, this, 0);
if (FindFailedResponse.HANDLE.equals(response)) { ObserveEvent.Type type = ObserveEvent.Type.MISSING; if (imageMissingHandler != null && ((ObserverCallBack) imageMissingHandler).getType().equals(type)) { log(lvl, "handleImageMissing: Response.HANDLE: calling handler"); evt = new ObserveEvent("", type, null, img, this, 0);
public void appeared(ObserveEvent e) { if (scriptHelper != null && ObserveEvent.Type.APPEAR.equals(obsType)) { run(e); } }
/** * check the observe event type * @return true if it is FINDFAILED, false otherwise */ public boolean isFindFailed() { return Type.FINDFAILED.equals(type); }
/** * check the observe event type * @return true if it is APPEAR, false otherwise */ public boolean isAppear() { return Type.APPEAR.equals(type); }
public void findfailed(ObserveEvent e) { if (scriptHelper != null && ObserveEvent.Type.FINDFAILED.equals(obsType)) { run(e); } }
public void vanished(ObserveEvent e) { if (scriptHelper != null && ObserveEvent.Type.VANISH.equals(obsType)) { run(e); } }
/** * check the observe event type * @return true if it is MISSING, false otherwise */ public boolean isMissing() { return Type.MISSING.equals(type); }
public void missing(ObserveEvent e) { if (scriptHelper != null && ObserveEvent.Type.MISSING.equals(obsType)) { run(e); } }
public void changed(ObserveEvent e) { if (scriptHelper != null && ObserveEvent.Type.CHANGE.equals(obsType)) { run(e); } }
/** * check the observe event type * @return true if it is GENERIC, false otherwise */ public boolean isGeneric() { return Type.GENERIC.equals(type); }
/** * check the observe event type * @return true if it is CHANGE, false otherwise */ public boolean isChange() { return Type.CHANGE.equals(type); }
/** * check the observe event type * @return true if it is VANISH, false otherwise */ public boolean isVanish() { return Type.VANISH.equals(type); }
public void happened(ObserveEvent e) { if (scriptHelper != null && ObserveEvent.Type.GENERIC.equals(obsType)) { run(e); } }