public class ObserveEvent extends Object
ObserverCallBack
Modifier and Type | Class and Description |
---|---|
static class |
ObserveEvent.Type |
Modifier | Constructor and Description |
---|---|
protected |
ObserveEvent() |
protected |
ObserveEvent(String name,
ObserveEvent.Type type,
Object v1,
Object v2,
Object v3,
long now)
INTERNAL USE ONLY: creates an observed event
|
Modifier and Type | Method and Description |
---|---|
List<Match> |
getChanges() |
int |
getCount() |
Image |
getImage() |
Match |
getMatch() |
String |
getName() |
Pattern |
getPattern() |
Region |
getRegion() |
FindFailedResponse |
getResponse() |
long |
getTime() |
String |
getType()
get the observe event type
|
Object[] |
getVals()
for type GENERIC: (the value's type is known by creator and user of getVals as some private protocol)
|
boolean |
isAppear()
check the observe event type
|
boolean |
isChange()
check the observe event type
|
boolean |
isFindFailed()
check the observe event type
|
boolean |
isGeneric()
check the observe event type
|
boolean |
isMissing()
check the observe event type
|
boolean |
isVanish()
check the observe event type
|
void |
repeat()
tell the observer to repeat this event's observe action immediately
after returning from this handler (APPEAR, VANISH)
|
void |
repeat(long secs)
tell the observer to repeat this event's observe action after given time in secs
after returning from this handler (APPEAR, VANISH)
|
protected void |
setChanges(List<Match> c) |
void |
setImage(Object img) |
protected void |
setIndex(int index) |
protected void |
setMatch(Object m) |
void |
setPattern(Object p) |
protected void |
setRegion(Object r) |
void |
setResponse(FindFailedResponse resp) |
protected void |
setVals(Object v1,
Object v2,
Object v3)
for type GENERIC: 3 values can be stored in the event
(the value's type is known by creator and user of getVals as some private protocol)
|
void |
stopObserver()
stops the observer
|
void |
stopObserver(String text)
stops the observer and prints the given text
|
String |
toString() |
protected ObserveEvent()
protected ObserveEvent(String name, ObserveEvent.Type type, Object v1, Object v2, Object v3, long now)
public String getType()
public boolean isAppear()
public boolean isVanish()
public boolean isChange()
public boolean isGeneric()
public boolean isFindFailed()
public boolean isMissing()
protected void setVals(Object v1, Object v2, Object v3)
v1
- v2
- v3
- public Object[] getVals()
public String getName()
public Region getRegion()
protected void setRegion(Object r)
public Match getMatch()
protected void setMatch(Object m)
protected void setIndex(int index)
public Pattern getPattern()
public void setPattern(Object p)
public Image getImage()
public void setImage(Object img)
public void setResponse(FindFailedResponse resp)
public FindFailedResponse getResponse()
public long getTime()
public void repeat()
public void repeat(long secs)
secs
- secondspublic int getCount()
public void stopObserver()
public void stopObserver(String text)
text
- text