public class Finder extends Object implements Iterator<Match>
Constructor and Description |
---|
Finder()
Just to force library initialization
|
Finder(BufferedImage bimg)
Constructor for special use from a BufferedImage
|
Finder(Image img)
Finder constructor for special use from an Image
|
Finder(ScreenImage simg)
Finder constructor for special use from a ScreenImage
|
Finder(ScreenImage simg,
Region region)
Finder constructor for special use from a ScreenImage
|
Finder(String imageFilename)
Finder constructor (finding within an image).
|
Finder(String imageFilename,
Region region)
Finder constructor (finding within an image within the given region).
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
to explicitly free the Finder's resources
|
protected void |
finalize() |
String |
find(Image img)
do a find op with the given pattern in the Finder's image
(hasNext() and next() will reveal possible match results)
|
String |
find(Pattern aPtn)
do a find op with the given pattern in the Finder's image
(hasNext() and next() will reveal possible match results)
|
String |
find(String imageOrText)
do a find op with the given image or the given text in the Finder's image
(hasNext() and next() will reveal possible match results)
|
String |
findAll(Image img)
do a findAll op with the given image in the Finder's image
(hasNext() and next() will reveal possible match results)
|
String |
findAll(Pattern aPtn)
do a find op with the given pattern in the Finder's image
(hasNext() and next() will reveal possible match results)
|
String |
findAll(String imageOrText)
do a findAll op with the given image or the given text in the Finder's image
(hasNext() and next() will reveal possible match results)
|
protected void |
findAllRepeat()
internal use: repeat with same Finder
|
String |
findAllText(String text)
do a findAll op with the given text in the Finder's image
(hasNext() and next() will reveal possible match results)
|
protected void |
findRepeat()
internal use: repeat with same Finder
|
String |
findText(String text)
do a text find with the given text in the Finder's image
(hasNext() and next() will reveal possible match results)
|
boolean |
hasNext() |
boolean |
isValid() |
Match |
next() |
void |
remove()
not used
|
void |
resetImage(Image img) |
protected void |
setRepeating()
internal use: to be able to reuse the same Finder
|
protected void |
setScreenImage(ScreenImage simg)
internal use: exchange the source image in existing Finder
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public Finder()
public Finder(String imageFilename) throws IOException
imageFilename
- a string (name, path, url)IOException
- if imagefile not foundpublic Finder(String imageFilename, Region region) throws IOException
imageFilename
- a string (name, path, url)region
- search Region within image - topleft = (0,0)IOException
- if imagefile not foundpublic Finder(BufferedImage bimg)
bimg
- BufferedImagepublic Finder(ScreenImage simg)
simg
- ScreenImagepublic Finder(ScreenImage simg, Region region)
simg
- ScreenImageregion
- the cropping regionpublic Finder(Image img)
img
- Imagepublic void resetImage(Image img)
public void destroy()
protected void finalize() throws Throwable
protected void setScreenImage(ScreenImage simg)
simg
- ScreenImagepublic boolean isValid()
protected void setRepeating()
protected void findRepeat()
protected void findAllRepeat()
public String find(String imageOrText)
imageOrText
- image file name or textpublic String find(Pattern aPtn)
aPtn
- Patternpublic String find(Image img)
img
- Imagepublic String findText(String text)
text
- textpublic String findAll(String imageOrText)
imageOrText
- iamge file name or textpublic String findAll(Pattern aPtn)
aPtn
- Patternpublic String findAll(Image img)
img
- Imagepublic String findAllText(String text)
text
- textpublic boolean hasNext()