org.sikuli.api.visual
Class ImageCanvas

java.lang.Object
  extended by org.sikuli.api.visual.Canvas
      extended by org.sikuli.api.visual.ImageCanvas

public class ImageCanvas
extends Canvas


Constructor Summary
ImageCanvas(BufferedImage image)
           
ImageCanvas(URL imageUrl)
           
 
Method Summary
static BufferedImage createComponentImage(Component component)
           
 BufferedImage createImage()
           
 void display(double seconds)
          Displays a canvas for the specified duration.
 void display(int seconds)
          Displays a canvas for the specified duration.
 void displayWhile(Runnable runnable)
          Displays the canvas and blocks the calling thread, while running the passed runnable on a background thread.
 void hide()
          Clears the shown canvas.
 void show()
          Shows a canvas.
 
Methods inherited from class org.sikuli.api.visual.Canvas
add, add, addBox, addCircle, addDot, addImage, addLabel, addLabel, clear
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageCanvas

public ImageCanvas(URL imageUrl)

ImageCanvas

public ImageCanvas(BufferedImage image)
Method Detail

display

public void display(int seconds)
Description copied from class: Canvas
Displays a canvas for the specified duration. This method blocks the calling thread for the specified duration.

Overrides:
display in class Canvas
Parameters:
seconds - the specified duration in seconds.

display

public void display(double seconds)
Description copied from class: Canvas
Displays a canvas for the specified duration. This method blocks the calling thread for the specified duration.

Specified by:
display in class Canvas
Parameters:
seconds - the specified duration in seconds.

displayWhile

public void displayWhile(Runnable runnable)
Description copied from class: Canvas
Displays the canvas and blocks the calling thread, while running the passed runnable on a background thread. When the passed Runnable completes, this method returns immediately and hides the canvas.

Specified by:
displayWhile in class Canvas
Parameters:
runnable - A runnable to run in the background.

show

public void show()
Description copied from class: Canvas
Shows a canvas. This is a non-blocking method. The canvas should be hidden using the Canvas.hide() method.

Specified by:
show in class Canvas

hide

public void hide()
Description copied from class: Canvas
Clears the shown canvas.

Specified by:
hide in class Canvas

createImage

public BufferedImage createImage()
Specified by:
createImage in class Canvas

createComponentImage

public static BufferedImage createComponentImage(Component component)


Copyright © 2014. All rights reserved.