teamdev.jxdesktop
Interface Screenable

All Known Subinterfaces:
Screen, UIElement, Window

public interface Screenable

This interface defines operations for a UI element that supports capturing of its image.


Method Summary
 java.awt.Rectangle getBounds()
          Returns the dimensions of the bounding rectangle of the specified screenable object.
 java.awt.image.BufferedImage getImage()
          Returns the image that represents the screen shot of the current object.
 java.awt.Point getLocation()
          Gets the location of this component.
 java.awt.Dimension getSize()
          Returns the size of this component of a Dimension object.
 

Method Detail

getBounds

public java.awt.Rectangle getBounds()
Returns the dimensions of the bounding rectangle of the specified screenable object. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.

Returns:
the dimensions of the bounding rectangle of the specified screenable object

getLocation

public java.awt.Point getLocation()
Gets the location of this component. The location will be relative to the parent's coordinate space.

Returns:
an instance of Point representing the top-left corner of the component's bounds in the coordinate space of the component's parent

getSize

public java.awt.Dimension getSize()
Returns the size of this component of a Dimension object. The height field of the Dimension object contains this component's height, and the width field of the Dimension object contains this component's width.

Returns:
a Dimension object that indicates the size of this component

getImage

public java.awt.image.BufferedImage getImage()
                                      throws java.lang.IllegalStateException
Returns the image that represents the screen shot of the current object.

Returns:
the image that represents the screen shot of the current object
Throws:
java.awt.IllegalComponentStateException - if an error occurs during creation of the image
java.lang.IllegalStateException