< prev index next >
src/java.desktop/share/classes/java/awt/Component.java
Print this page
*** 3626,3644 ****
}
return getToolkit().createImage(producer);
}
/**
! * Creates an off-screen drawable image
! * to be used for double buffering.
* @param width the specified width
* @param height the specified height
* @return an off-screen drawable image, which can be used for double
! * buffering. The return value may be <code>null</code> if the
! * component is not displayable. This will always happen if
! * <code>GraphicsEnvironment.isHeadless()</code> returns
! * <code>true</code>.
* @see #isDisplayable
* @see GraphicsEnvironment#isHeadless
* @since 1.0
*/
public Image createImage(int width, int height) {
--- 3626,3643 ----
}
return getToolkit().createImage(producer);
}
/**
! * Creates an off-screen drawable image to be used for double buffering.
! *
* @param width the specified width
* @param height the specified height
* @return an off-screen drawable image, which can be used for double
! * buffering. The {@code null} value if the component is not
! * displayable or {@code GraphicsEnvironment.isHeadless()} returns
! * {@code true}.
* @see #isDisplayable
* @see GraphicsEnvironment#isHeadless
* @since 1.0
*/
public Image createImage(int width, int height) {
*** 3650,3668 ****
return (peer != null) ? peer.createImage(width, height) : null;
}
}
/**
! * Creates a volatile off-screen drawable image
! * to be used for double buffering.
! * @param width the specified width.
! * @param height the specified height.
* @return an off-screen drawable image, which can be used for double
! * buffering. The return value may be <code>null</code> if the
! * component is not displayable. This will always happen if
! * <code>GraphicsEnvironment.isHeadless()</code> returns
! * <code>true</code>.
* @see java.awt.image.VolatileImage
* @see #isDisplayable
* @see GraphicsEnvironment#isHeadless
* @since 1.4
*/
--- 3649,3667 ----
return (peer != null) ? peer.createImage(width, height) : null;
}
}
/**
! * Creates a volatile off-screen drawable image to be used for double
! * buffering.
! *
! * @param width the specified width
! * @param height the specified height
* @return an off-screen drawable image, which can be used for double
! * buffering. The {@code null} value if the component is not
! * displayable or {@code GraphicsEnvironment.isHeadless()} returns
! * {@code true}.
* @see java.awt.image.VolatileImage
* @see #isDisplayable
* @see GraphicsEnvironment#isHeadless
* @since 1.4
*/
*** 3678,3703 ****
peer.createVolatileImage(width, height) : null;
}
}
/**
! * Creates a volatile off-screen drawable image, with the given capabilities.
! * The contents of this image may be lost at any time due
! * to operating system issues, so the image must be managed
! * via the <code>VolatileImage</code> interface.
! * @param width the specified width.
! * @param height the specified height.
* @param caps the image capabilities
! * @exception AWTException if an image with the specified capabilities cannot
* be created
- * @return a VolatileImage object, which can be used
- * to manage surface contents loss and capabilities.
* @see java.awt.image.VolatileImage
* @since 1.4
*/
public VolatileImage createVolatileImage(int width, int height,
! ImageCapabilities caps) throws AWTException {
// REMIND : check caps
return createVolatileImage(width, height);
}
/**
--- 3677,3706 ----
peer.createVolatileImage(width, height) : null;
}
}
/**
! * Creates a volatile off-screen drawable image, with the given
! * capabilities. The contents of this image may be lost at any time due to
! * operating system issues, so the image must be managed via the
! * {@code VolatileImage} interface.
! *
! * @param width the specified width
! * @param height the specified height
* @param caps the image capabilities
! * @return a VolatileImage object, which can be used to manage surface
! * contents loss and capabilities. The {@code null} value if the
! * component is not displayable or
! * {@code GraphicsEnvironment.isHeadless()} returns {@code true}.
! * @throws AWTException if an image with the specified capabilities cannot
* be created
* @see java.awt.image.VolatileImage
* @since 1.4
*/
public VolatileImage createVolatileImage(int width, int height,
! ImageCapabilities caps)
! throws AWTException {
// REMIND : check caps
return createVolatileImage(width, height);
}
/**
< prev index next >