Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
index e4c5450cc1..217b1adc55 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
@@ -197,6 +197,9 @@ Image(Device device) {
* and depth). For example, Windows 95, 98, and ME do not allow
* images larger than 16M.
* </p>
+ * <p>
+ * You must dispose the image when it is no longer required.
+ * </p>
*
* @param device the device on which to create the image
* @param width the width of the new image
@@ -209,6 +212,8 @@ Image(Device device) {
* @exception SWTError <ul>
* <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li>
* </ul>
+ *
+ * @see #dispose()
*/
public Image(Device device, int width, int height) {
super(device);
@@ -228,6 +233,9 @@ public Image(Device device, int width, int height) {
* <dt><b>{@link SWT#IMAGE_GRAY}</b></dt>
* <dd>the result is a copy of srcImage which has a <em>gray scale</em> look</dd>
* </dl>
+ * <p>
+ * You must dispose the image when it is no longer required.
+ * </p>
*
* @param device the device on which to create the image
* @param srcImage the image to use as the source
@@ -246,6 +254,8 @@ public Image(Device device, int width, int height) {
* @exception SWTError <ul>
* <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li>
* </ul>
+ *
+ * @see #dispose()
*/
public Image(Device device, Image srcImage, int flag) {
super(device);
@@ -511,6 +521,9 @@ public Image(Device device, Image srcImage, int flag) {
* and depth). For example, Windows 95, 98, and ME do not allow
* images larger than 16M.
* </p>
+ * <p>
+ * You must dispose the image when it is no longer required.
+ * </p>
*
* @param device the device on which to create the image
* @param bounds a rectangle specifying the image's width and height (must not be null)
@@ -523,6 +536,8 @@ public Image(Device device, Image srcImage, int flag) {
* @exception SWTError <ul>
* <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li>
* </ul>
+ *
+ * @see #dispose()
*/
public Image(Device device, Rectangle bounds) {
super(device);
@@ -534,6 +549,9 @@ public Image(Device device, Rectangle bounds) {
/**
* Constructs an instance of this class from the given
* <code>ImageData</code>.
+ * <p>
+ * You must dispose the image when it is no longer required.
+ * </p>
*
* @param device the device on which to create the image
* @param data the image data to create the image from (must not be null)
@@ -548,6 +566,8 @@ public Image(Device device, Rectangle bounds) {
* @exception SWTError <ul>
* <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li>
* </ul>
+ *
+ * @see #dispose()
*/
public Image(Device device, ImageData data) {
super(device);
@@ -566,6 +586,9 @@ public Image(Device device, ImageData data) {
* the source image should contain black wherever the icon is to be
* transparent.
* </p>
+ * <p>
+ * You must dispose the image when it is no longer required.
+ * </p>
*
* @param device the device on which to create the icon
* @param source the color data for the icon
@@ -579,6 +602,8 @@ public Image(Device device, ImageData data) {
* @exception SWTError <ul>
* <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li>
* </ul>
+ *
+ * @see #dispose()
*/
public Image(Device device, ImageData source, ImageData mask) {
super(device);
@@ -625,6 +650,9 @@ public Image(Device device, ImageData source, ImageData mask) {
* return image;
* }
* </pre>
+ * <p>
+ * You must dispose the image when it is no longer required.
+ * </p>
*
* @param device the device on which to create the image
* @param stream the input stream to load the image from
@@ -642,6 +670,8 @@ public Image(Device device, ImageData source, ImageData mask) {
* @exception SWTError <ul>
* <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li>
* </ul>
+ *
+ * @see #dispose()
*/
public Image(Device device, InputStream stream) {
super(device);
@@ -658,6 +688,9 @@ public Image(Device device, InputStream stream) {
* This constructor is provided for convenience when loading
* a single image only. If the specified file contains
* multiple images, only the first one will be used.
+ * <p>
+ * You must dispose the image when it is no longer required.
+ * </p>
*
* @param device the device on which to create the image
* @param filename the name of the file to load the image from
@@ -675,6 +708,8 @@ public Image(Device device, InputStream stream) {
* @exception SWTError <ul>
* <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li>
* </ul>
+ *
+ * @see #dispose()
*/
public Image(Device device, String filename) {
super(device);

Back to the top