Uses of Class
java.awt.Image
Package
Description
Provides the classes necessary to create an applet and the classes an applet
uses to communicate with its applet context.
Contains all of the classes for creating user interfaces and for painting
graphics and images.
Drag and Drop is a direct manipulation gesture found in many Graphical User
Interface systems that provides a mechanism to transfer information between
two entities logically associated with presentation elements in the GUI.
Provides classes and interface relating to fonts.
Provides interfaces that enable the development of input methods that can be
used with any Java runtime environment.
Provides classes for creating and modifying images.
Contains classes related to developing beans -- components based on
the JavaBeans architecture.
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
Provides one interface and many abstract classes that Swing uses to provide
its pluggable look-and-feel capabilities.
Provides the class
HTMLEditorKit
and supporting classes for creating
HTML text editors.-
Uses of Image in java.applet
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Returns anImage
object that can then be painted on the screen.Deprecated, for removal: This API element is subject to removal in a future version.Returns anImage
object that can then be painted on the screen.Deprecated, for removal: This API element is subject to removal in a future version.Returns anImage
object that can then be painted on the screen. -
Uses of Image in java.awt
Modifier and TypeFieldDescriptionprotected Image
Component.FlipBufferStrategy.drawBuffer
The drawing bufferModifier and TypeMethodDescriptionComponent.createImage
(int width, int height) Creates an off-screen drawable image to be used for double buffering.Component.createImage
(ImageProducer producer) Creates an image from the specified image producer.Toolkit.createImage
(byte[] imagedata) Creates an image which decodes the image stored in the specified byte array.abstract Image
Toolkit.createImage
(byte[] imagedata, int imageoffset, int imagelength) Creates an image which decodes the image stored in the specified byte array, and at the specified offset and length.abstract Image
Toolkit.createImage
(ImageProducer producer) Creates an image with the specified image producer.abstract Image
Toolkit.createImage
(String filename) Returns an image which gets pixel data from the specified file.abstract Image
Toolkit.createImage
(URL url) Returns an image which gets pixel data from the specified URL.protected Image
Component.FlipBufferStrategy.getBackBuffer()
Provides direct access to the back buffer as an image.Frame.getIconImage()
Returns the image to be displayed as the icon for this frame.Taskbar.getIconImage()
Obtains an image of this application's icon.abstract Image
Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG.abstract Image
Returns an image which gets pixel data from the specified URL.TrayIcon.getImage()
Returns the current image used for thisTrayIcon
.Image.getScaledInstance
(int width, int height, int hints) Creates a scaled version of this image.Modifier and TypeMethodDescriptionWindow.getIconImages()
Returns the sequence of images to be displayed as the icon for this window.Modifier and TypeMethodDescriptionvoid
Adds an image to the list of images being tracked by this media tracker.void
Adds a scaled image to the list of images being tracked by this media tracker.int
Component.checkImage
(Image image, int width, int height, ImageObserver observer) Returns the status of the construction of a screen representation of the specified image.int
Component.checkImage
(Image image, ImageObserver observer) Returns the status of the construction of a screen representation of the specified image.abstract int
Toolkit.checkImage
(Image image, int width, int height, ImageObserver observer) Indicates the construction status of a specified image that is being prepared for display.Toolkit.createCustomCursor
(Image cursor, Point hotSpot, String name) Creates a new custom cursor object.abstract boolean
Graphics.drawImage
(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer) Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.abstract boolean
Graphics.drawImage
(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer) Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.abstract boolean
Graphics.drawImage
(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.abstract boolean
Graphics.drawImage
(Image img, int x, int y, int width, int height, ImageObserver observer) Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.abstract boolean
Graphics.drawImage
(Image img, int x, int y, Color bgcolor, ImageObserver observer) Draws as much of the specified image as is currently available.abstract boolean
Graphics.drawImage
(Image img, int x, int y, ImageObserver observer) Draws as much of the specified image as is currently available.abstract boolean
Graphics2D.drawImage
(Image img, AffineTransform xform, ImageObserver obs) Renders an image, applying a transform from image space into user space before drawing.boolean
Component.imageUpdate
(Image img, int infoflags, int x, int y, int w, int h) Repaints the component when the image has changed.boolean
Component.prepareImage
(Image image, int width, int height, ImageObserver observer) Prepares an image for rendering on this component at the specified width and height.boolean
Component.prepareImage
(Image image, ImageObserver observer) Prepares an image for rendering on this component.abstract boolean
Toolkit.prepareImage
(Image image, int width, int height, ImageObserver observer) Prepares an image for rendering.void
MediaTracker.removeImage
(Image image) Removes the specified image from this media tracker.void
MediaTracker.removeImage
(Image image, int id) Removes the specified image from the specified tracking ID of this media tracker.void
MediaTracker.removeImage
(Image image, int id, int width, int height) Removes the specified image with the specified width, height, and ID from this media tracker.void
Taskbar.setIconImage
(Image image) Requests the system to change this application's icon to the providedimage
.void
Window.setIconImage
(Image image) Sets the image to be displayed as the icon for this window.void
Sets the image for thisTrayIcon
.void
Taskbar.setWindowIconBadge
(Window w, Image badge) Affixes a small badge to this application's icon in the task area for the specified window.Modifier and TypeMethodDescriptionvoid
Window.setIconImages
(List<? extends Image> icons) Sets the sequence of images to be displayed as the icon for this window.ModifierConstructorDescriptionCreates aTrayIcon
with the specified image.Creates aTrayIcon
with the specified image and tooltip text.Creates aTrayIcon
with the specified image, tooltip and popup menu. -
Uses of Image in java.awt.dnd
Modifier and TypeMethodDescriptionprotected DragSourceContext
DragSource.createDragSourceContext
(DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl) Creates theDragSourceContext
to handle the current drag operation.void
DragGestureEvent.startDrag
(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl) Start the drag given the initialCursor
to display, a dragImage
, the offset of theImage
, theTransferable
object, and theDragSourceListener
to use.void
DragSource.startDrag
(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point dragOffset, Transferable transferable, DragSourceListener dsl) Start a drag, given theDragGestureEvent
that initiated the drag, the initialCursor
to use, theImage
to drag, the offset of theImage
origin from the hotspot of theCursor
at the instant of the trigger, the subject data of the drag, and theDragSourceListener
.void
DragSource.startDrag
(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl, FlavorMap flavorMap) Start a drag, given theDragGestureEvent
that initiated the drag, the initialCursor
to use, theImage
to drag, the offset of theImage
origin from the hotspot of theCursor
at the instant of the trigger, theTransferable
subject data of the drag, theDragSourceListener
, and theFlavorMap
.ModifierConstructorDescriptionDragSourceContext
(DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point offset, Transferable t, DragSourceListener dsl) Called fromDragSource
, this constructor creates a newDragSourceContext
given theDragSourceContextPeer
for this Drag, theDragGestureEvent
that triggered the Drag, the initialCursor
to use for the Drag, an (optional)Image
to display while the Drag is taking place, the offset of theImage
origin from the hotspot at the instant of the triggering event, theTransferable
subject data, and theDragSourceListener
to use during the Drag and Drop operation. -
Uses of Image in java.awt.font
ModifierConstructorDescriptionImageGraphicAttribute
(Image image, int alignment) Constructs anImageGraphicAttribute
from the specifiedImage
.ImageGraphicAttribute
(Image image, int alignment, float originX, float originY) Constructs anImageGraphicAttribute
from the specifiedImage
. -
Uses of Image in java.awt.im.spi
Modifier and TypeMethodDescriptionInputMethodDescriptor.getInputMethodIcon
(Locale inputLocale) Returns an icon for the corresponding input method. -
Uses of Image in java.awt.image
Modifier and TypeClassDescriptionclass
This class provides default implementations of severalImage
methods for classes that want to implement theMultiResolutionImage
interface.class
This class is an array-based implementation of theAbstractMultiResolutionImage
class.class
TheBufferedImage
subclass describes anImage
with an accessible buffer of image data.class
VolatileImage is an image which can lose its contents at any time due to circumstances beyond the control of the application (e.g., situations caused by the operating system or by other applications).Modifier and TypeMethodDescriptionprotected abstract Image
AbstractMultiResolutionImage.getBaseImage()
Return the base image representing the best version of the image for rendering at the default width and height.protected Image
BaseMultiResolutionImage.getBaseImage()
BaseMultiResolutionImage.getResolutionVariant
(double destImageWidth, double destImageHeight) MultiResolutionImage.getResolutionVariant
(double destImageWidth, double destImageHeight) Gets a specific image that is the best variant to represent this logical image at the indicated size.Modifier and TypeMethodDescriptionBaseMultiResolutionImage.getResolutionVariants()
MultiResolutionImage.getResolutionVariants()
Gets a readable list of all resolution variants.Modifier and TypeMethodDescriptionboolean
ImageObserver.imageUpdate
(Image img, int infoflags, int x, int y, int width, int height) This method is called when information about an image which was previously requested using an asynchronous interface becomes available.ModifierConstructorDescriptionBaseMultiResolutionImage
(int baseImageIndex, Image... resolutionVariants) Creates a multi-resolution image with the given base image index and resolution variants.BaseMultiResolutionImage
(Image... resolutionVariants) Creates a multi-resolution image with the given resolution variants.PixelGrabber
(Image img, int x, int y, int w, int h, boolean forceRGB) Create a PixelGrabber object to grab the (x, y, w, h) rectangular section of pixels from the specified image.PixelGrabber
(Image img, int x, int y, int w, int h, int[] pix, int off, int scansize) Create a PixelGrabber object to grab the (x, y, w, h) rectangular section of pixels from the specified image into the given array. -
Uses of Image in java.beans
-
Uses of Image in javax.swing
Modifier and TypeFieldDescriptionprotected Image
JViewport.backingStoreImage
The view image used for a backing store.Modifier and TypeMethodDescriptionstatic Image
GrayFilter.createDisabledImage
(Image i) Creates a disabled imageTransferHandler.getDragImage()
Returns the drag image.ImageIcon.getImage()
Returns this icon'sImage
.RepaintManager.getOffscreenBuffer
(Component c, int proposedWidth, int proposedHeight) Return the offscreen buffer that should be used as a double buffer with the componentc
.RepaintManager.getVolatileOffscreenBuffer
(Component c, int proposedWidth, int proposedHeight) Return a volatile offscreen buffer that should be used as a double buffer with the specified componentc
.Modifier and TypeMethodDescriptionstatic Image
GrayFilter.createDisabledImage
(Image i) Creates a disabled imageboolean
DebugGraphics.drawImage
(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer) OverridesGraphics.drawImage
.boolean
DebugGraphics.drawImage
(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer) OverridesGraphics.drawImage
.boolean
DebugGraphics.drawImage
(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) OverridesGraphics.drawImage
.boolean
DebugGraphics.drawImage
(Image img, int x, int y, int width, int height, ImageObserver observer) OverridesGraphics.drawImage
.boolean
DebugGraphics.drawImage
(Image img, int x, int y, Color bgcolor, ImageObserver observer) OverridesGraphics.drawImage
.boolean
DebugGraphics.drawImage
(Image img, int x, int y, ImageObserver observer) OverridesGraphics.drawImage
.boolean
AbstractButton.imageUpdate
(Image img, int infoflags, int x, int y, int w, int h) If the button icon for the current button state is eithernull
or not anImageIcon
with anImage
equal to the passed inImage
, returnfalse
; otherwise it will delegate to the super-class.boolean
JLabel.imageUpdate
(Image img, int infoflags, int x, int y, int w, int h) If the component is not showing or either the icon or disabled icon is not anImageIcon
with anImage
equal to the passed inImage
, returnfalse
; otherwise it will delegate to the super-class.boolean
JLayer.imageUpdate
(Image img, int infoflags, int x, int y, int w, int h) Delegates its functionality to theLayerUI.imageUpdate(java.awt.Image, int, int, int, int, int, JLayer)
method, if theLayerUI
is set.boolean
JSlider.imageUpdate
(Image img, int infoflags, int x, int y, int w, int h) Repaints the component when the image has changed.protected void
Loads the image, returning only when the image is loaded.void
TransferHandler.setDragImage
(Image img) Sets the drag image parameter.void
Sets the image displayed by this icon. -
Uses of Image in javax.swing.plaf
Modifier and TypeMethodDescriptionboolean
LayerUI.imageUpdate
(Image img, int infoflags, int x, int y, int w, int h, JLayer<? extends V> l) Delegates its functionality to the default implementation of theJLayer.imageUpdate
method which is inherited fromJLayer
's base classes. -
Uses of Image in javax.swing.text.html