java.awt.image
Interface ImageObserver

All Known Implementing Classes:
AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton , AbstractColorChooserPanel sample code for javax.swing.colorchooser.AbstractColorChooserPanel definition code for javax.swing.colorchooser.AbstractColorChooserPanel , Applet sample code for java.applet.Applet definition code for java.applet.Applet , BasicArrowButton sample code for javax.swing.plaf.basic.BasicArrowButton definition code for javax.swing.plaf.basic.BasicArrowButton , BasicComboBoxRenderer sample code for javax.swing.plaf.basic.BasicComboBoxRenderer definition code for javax.swing.plaf.basic.BasicComboBoxRenderer , BasicComboBoxRenderer.UIResource sample code for javax.swing.plaf.basic.BasicComboBoxRenderer.UIResource definition code for javax.swing.plaf.basic.BasicComboBoxRenderer.UIResource , BasicComboPopup sample code for javax.swing.plaf.basic.BasicComboPopup definition code for javax.swing.plaf.basic.BasicComboPopup , BasicInternalFrameTitlePane sample code for javax.swing.plaf.basic.BasicInternalFrameTitlePane definition code for javax.swing.plaf.basic.BasicInternalFrameTitlePane , BasicInternalFrameTitlePane.SystemMenuBar sample code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar definition code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar , BasicSplitPaneDivider sample code for javax.swing.plaf.basic.BasicSplitPaneDivider definition code for javax.swing.plaf.basic.BasicSplitPaneDivider , BasicToolBarUI.DragWindow sample code for javax.swing.plaf.basic.BasicToolBarUI.DragWindow definition code for javax.swing.plaf.basic.BasicToolBarUI.DragWindow , Box sample code for javax.swing.Box definition code for javax.swing.Box , Box.Filler sample code for javax.swing.Box.Filler definition code for javax.swing.Box.Filler , Button sample code for java.awt.Button definition code for java.awt.Button , Canvas sample code for java.awt.Canvas definition code for java.awt.Canvas , CellRendererPane sample code for javax.swing.CellRendererPane definition code for javax.swing.CellRendererPane , Checkbox sample code for java.awt.Checkbox definition code for java.awt.Checkbox , Choice sample code for java.awt.Choice definition code for java.awt.Choice , Component sample code for java.awt.Component definition code for java.awt.Component , Container sample code for java.awt.Container definition code for java.awt.Container , DefaultListCellRenderer sample code for javax.swing.DefaultListCellRenderer definition code for javax.swing.DefaultListCellRenderer , DefaultListCellRenderer.UIResource sample code for javax.swing.DefaultListCellRenderer.UIResource definition code for javax.swing.DefaultListCellRenderer.UIResource , DefaultTableCellRenderer sample code for javax.swing.table.DefaultTableCellRenderer definition code for javax.swing.table.DefaultTableCellRenderer , DefaultTableCellRenderer.UIResource sample code for javax.swing.table.DefaultTableCellRenderer.UIResource definition code for javax.swing.table.DefaultTableCellRenderer.UIResource , DefaultTreeCellEditor.DefaultTextField sample code for javax.swing.tree.DefaultTreeCellEditor.DefaultTextField definition code for javax.swing.tree.DefaultTreeCellEditor.DefaultTextField , DefaultTreeCellEditor.EditorContainer sample code for javax.swing.tree.DefaultTreeCellEditor.EditorContainer definition code for javax.swing.tree.DefaultTreeCellEditor.EditorContainer , DefaultTreeCellRenderer sample code for javax.swing.tree.DefaultTreeCellRenderer definition code for javax.swing.tree.DefaultTreeCellRenderer , Dialog sample code for java.awt.Dialog definition code for java.awt.Dialog , FileDialog sample code for java.awt.FileDialog definition code for java.awt.FileDialog , Frame sample code for java.awt.Frame definition code for java.awt.Frame , JApplet sample code for javax.swing.JApplet definition code for javax.swing.JApplet , JButton sample code for javax.swing.JButton definition code for javax.swing.JButton , JCheckBox sample code for javax.swing.JCheckBox definition code for javax.swing.JCheckBox , JCheckBoxMenuItem sample code for javax.swing.JCheckBoxMenuItem definition code for javax.swing.JCheckBoxMenuItem , JColorChooser sample code for javax.swing.JColorChooser definition code for javax.swing.JColorChooser , JComboBox sample code for javax.swing.JComboBox definition code for javax.swing.JComboBox , JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent , JDesktopPane sample code for javax.swing.JDesktopPane definition code for javax.swing.JDesktopPane , JDialog sample code for javax.swing.JDialog definition code for javax.swing.JDialog , JEditorPane sample code for javax.swing.JEditorPane definition code for javax.swing.JEditorPane , JFileChooser sample code for javax.swing.JFileChooser definition code for javax.swing.JFileChooser , JFormattedTextField sample code for javax.swing.JFormattedTextField definition code for javax.swing.JFormattedTextField , JFrame sample code for javax.swing.JFrame definition code for javax.swing.JFrame , JInternalFrame sample code for javax.swing.JInternalFrame definition code for javax.swing.JInternalFrame , JInternalFrame.JDesktopIcon sample code for javax.swing.JInternalFrame.JDesktopIcon definition code for javax.swing.JInternalFrame.JDesktopIcon , JLabel sample code for javax.swing.JLabel definition code for javax.swing.JLabel , JLayeredPane sample code for javax.swing.JLayeredPane definition code for javax.swing.JLayeredPane , JList sample code for javax.swing.JList definition code for javax.swing.JList , JMenu sample code for javax.swing.JMenu definition code for javax.swing.JMenu , JMenuBar sample code for javax.swing.JMenuBar definition code for javax.swing.JMenuBar , JMenuItem sample code for javax.swing.JMenuItem definition code for javax.swing.JMenuItem , JOptionPane sample code for javax.swing.JOptionPane definition code for javax.swing.JOptionPane , JPanel sample code for javax.swing.JPanel definition code for javax.swing.JPanel , JPasswordField sample code for javax.swing.JPasswordField definition code for javax.swing.JPasswordField , JPopupMenu sample code for javax.swing.JPopupMenu definition code for javax.swing.JPopupMenu , JPopupMenu.Separator sample code for javax.swing.JPopupMenu.Separator definition code for javax.swing.JPopupMenu.Separator , JProgressBar sample code for javax.swing.JProgressBar definition code for javax.swing.JProgressBar , JRadioButton sample code for javax.swing.JRadioButton definition code for javax.swing.JRadioButton , JRadioButtonMenuItem sample code for javax.swing.JRadioButtonMenuItem definition code for javax.swing.JRadioButtonMenuItem , JRootPane sample code for javax.swing.JRootPane definition code for javax.swing.JRootPane , JScrollBar sample code for javax.swing.JScrollBar definition code for javax.swing.JScrollBar , JScrollPane sample code for javax.swing.JScrollPane definition code for javax.swing.JScrollPane , JScrollPane.ScrollBar sample code for javax.swing.JScrollPane.ScrollBar definition code for javax.swing.JScrollPane.ScrollBar , JSeparator sample code for javax.swing.JSeparator definition code for javax.swing.JSeparator , JSlider sample code for javax.swing.JSlider definition code for javax.swing.JSlider , JSpinner sample code for javax.swing.JSpinner definition code for javax.swing.JSpinner , JSpinner.DateEditor sample code for javax.swing.JSpinner.DateEditor definition code for javax.swing.JSpinner.DateEditor , JSpinner.DefaultEditor sample code for javax.swing.JSpinner.DefaultEditor definition code for javax.swing.JSpinner.DefaultEditor , JSpinner.ListEditor sample code for javax.swing.JSpinner.ListEditor definition code for javax.swing.JSpinner.ListEditor , JSpinner.NumberEditor sample code for javax.swing.JSpinner.NumberEditor definition code for javax.swing.JSpinner.NumberEditor , JSplitPane sample code for javax.swing.JSplitPane definition code for javax.swing.JSplitPane , JTabbedPane sample code for javax.swing.JTabbedPane definition code for javax.swing.JTabbedPane , JTable sample code for javax.swing.JTable definition code for javax.swing.JTable , JTableHeader sample code for javax.swing.table.JTableHeader definition code for javax.swing.table.JTableHeader , JTextArea sample code for javax.swing.JTextArea definition code for javax.swing.JTextArea , JTextComponent sample code for javax.swing.text.JTextComponent definition code for javax.swing.text.JTextComponent , JTextField sample code for javax.swing.JTextField definition code for javax.swing.JTextField , JTextPane sample code for javax.swing.JTextPane definition code for javax.swing.JTextPane , JToggleButton sample code for javax.swing.JToggleButton definition code for javax.swing.JToggleButton , JToolBar sample code for javax.swing.JToolBar definition code for javax.swing.JToolBar , JToolBar.Separator sample code for javax.swing.JToolBar.Separator definition code for javax.swing.JToolBar.Separator , JToolTip sample code for javax.swing.JToolTip definition code for javax.swing.JToolTip , JTree sample code for javax.swing.JTree definition code for javax.swing.JTree , JViewport sample code for javax.swing.JViewport definition code for javax.swing.JViewport , JWindow sample code for javax.swing.JWindow definition code for javax.swing.JWindow , Label sample code for java.awt.Label definition code for java.awt.Label , List sample code for java.awt.List definition code for java.awt.List , MetalComboBoxButton sample code for javax.swing.plaf.metal.MetalComboBoxButton definition code for javax.swing.plaf.metal.MetalComboBoxButton , MetalComboBoxUI.MetalComboPopup sample code for javax.swing.plaf.metal.MetalComboBoxUI.MetalComboPopup definition code for javax.swing.plaf.metal.MetalComboBoxUI.MetalComboPopup , MetalFileChooserUI.FileRenderer sample code for javax.swing.plaf.metal.MetalFileChooserUI.FileRenderer definition code for javax.swing.plaf.metal.MetalFileChooserUI.FileRenderer , MetalFileChooserUI.FilterComboBoxRenderer sample code for javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxRenderer definition code for javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxRenderer , MetalInternalFrameTitlePane sample code for javax.swing.plaf.metal.MetalInternalFrameTitlePane definition code for javax.swing.plaf.metal.MetalInternalFrameTitlePane , MetalScrollButton sample code for javax.swing.plaf.metal.MetalScrollButton definition code for javax.swing.plaf.metal.MetalScrollButton , Panel sample code for java.awt.Panel definition code for java.awt.Panel , Scrollbar sample code for java.awt.Scrollbar definition code for java.awt.Scrollbar , ScrollPane sample code for java.awt.ScrollPane definition code for java.awt.ScrollPane , TextArea sample code for java.awt.TextArea definition code for java.awt.TextArea , TextComponent sample code for java.awt.TextComponent definition code for java.awt.TextComponent , TextField sample code for java.awt.TextField definition code for java.awt.TextField , Window sample code for java.awt.Window definition code for java.awt.Window

public interface ImageObserver

An asynchronous update interface for receiving notifications about Image information as the Image is constructed.


Field Summary
static int ABORT sample code for java.awt.image.ImageObserver.ABORT definition code for java.awt.image.ImageObserver.ABORT
          This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously was aborted before production was complete.
static int ALLBITS sample code for java.awt.image.ImageObserver.ALLBITS definition code for java.awt.image.ImageObserver.ALLBITS
          This flag in the infoflags argument to imageUpdate indicates that a static image which was previously drawn is now complete and can be drawn again in its final form.
static int ERROR sample code for java.awt.image.ImageObserver.ERROR definition code for java.awt.image.ImageObserver.ERROR
          This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously has encountered an error.
static int FRAMEBITS sample code for java.awt.image.ImageObserver.FRAMEBITS definition code for java.awt.image.ImageObserver.FRAMEBITS
          This flag in the infoflags argument to imageUpdate indicates that another complete frame of a multi-frame image which was previously drawn is now available to be drawn again.
static int HEIGHT sample code for java.awt.image.ImageObserver.HEIGHT definition code for java.awt.image.ImageObserver.HEIGHT
          This flag in the infoflags argument to imageUpdate indicates that the height of the base image is now available and can be taken from the height argument to the imageUpdate callback method.
static int PROPERTIES sample code for java.awt.image.ImageObserver.PROPERTIES definition code for java.awt.image.ImageObserver.PROPERTIES
          This flag in the infoflags argument to imageUpdate indicates that the properties of the image are now available.
static int SOMEBITS sample code for java.awt.image.ImageObserver.SOMEBITS definition code for java.awt.image.ImageObserver.SOMEBITS
          This flag in the infoflags argument to imageUpdate indicates that more pixels needed for drawing a scaled variation of the image are available.
static int WIDTH sample code for java.awt.image.ImageObserver.WIDTH definition code for java.awt.image.ImageObserver.WIDTH
          This flag in the infoflags argument to imageUpdate indicates that the width of the base image is now available and can be taken from the width argument to the imageUpdate callback method.
 
Method Summary
 boolean imageUpdate sample code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) (Image sample code for java.awt.Image definition code for java.awt.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.
 

Field Detail

WIDTH sample code for java.awt.image.ImageObserver.WIDTH

static final int WIDTH
This flag in the infoflags argument to imageUpdate indicates that the width of the base image is now available and can be taken from the width argument to the imageUpdate callback method.

See Also:
Image.getWidth(java.awt.image.ImageObserver) sample code for java.awt.Image.getWidth(java.awt.image.ImageObserver) definition code for java.awt.Image.getWidth(java.awt.image.ImageObserver) , imageUpdate(java.awt.Image, int, int, int, int, int) sample code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) , Constant Field Values

HEIGHT sample code for java.awt.image.ImageObserver.HEIGHT

static final int HEIGHT
This flag in the infoflags argument to imageUpdate indicates that the height of the base image is now available and can be taken from the height argument to the imageUpdate callback method.

See Also:
Image.getHeight(java.awt.image.ImageObserver) sample code for java.awt.Image.getHeight(java.awt.image.ImageObserver) definition code for java.awt.Image.getHeight(java.awt.image.ImageObserver) , imageUpdate(java.awt.Image, int, int, int, int, int) sample code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) , Constant Field Values

PROPERTIES sample code for java.awt.image.ImageObserver.PROPERTIES

static final int PROPERTIES
This flag in the infoflags argument to imageUpdate indicates that the properties of the image are now available.

See Also:
Image.getProperty(java.lang.String, java.awt.image.ImageObserver) sample code for java.awt.Image.getProperty(java.lang.String, java.awt.image.ImageObserver) definition code for java.awt.Image.getProperty(java.lang.String, java.awt.image.ImageObserver) , imageUpdate(java.awt.Image, int, int, int, int, int) sample code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) , Constant Field Values

SOMEBITS sample code for java.awt.image.ImageObserver.SOMEBITS

static final int SOMEBITS
This flag in the infoflags argument to imageUpdate indicates that more pixels needed for drawing a scaled variation of the image are available. The bounding box of the new pixels can be taken from the x, y, width, and height arguments to the imageUpdate callback method.

See Also:
Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver) sample code for java.awt.Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , imageUpdate(java.awt.Image, int, int, int, int, int) sample code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) , Constant Field Values

FRAMEBITS sample code for java.awt.image.ImageObserver.FRAMEBITS

static final int FRAMEBITS
This flag in the infoflags argument to imageUpdate indicates that another complete frame of a multi-frame image which was previously drawn is now available to be drawn again. The x, y, width, and height arguments to the imageUpdate callback method should be ignored.

See Also:
Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver) sample code for java.awt.Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , imageUpdate(java.awt.Image, int, int, int, int, int) sample code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) , Constant Field Values

ALLBITS sample code for java.awt.image.ImageObserver.ALLBITS

static final int ALLBITS
This flag in the infoflags argument to imageUpdate indicates that a static image which was previously drawn is now complete and can be drawn again in its final form. The x, y, width, and height arguments to the imageUpdate callback method should be ignored.

See Also:
Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver) sample code for java.awt.Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , imageUpdate(java.awt.Image, int, int, int, int, int) sample code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) , Constant Field Values

ERROR sample code for java.awt.image.ImageObserver.ERROR

static final int ERROR
This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously has encountered an error. No further information will become available and drawing the image will fail. As a convenience, the ABORT flag will be indicated at the same time to indicate that the image production was aborted.

See Also:
imageUpdate(java.awt.Image, int, int, int, int, int) sample code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) , Constant Field Values

ABORT sample code for java.awt.image.ImageObserver.ABORT

static final int ABORT
This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously was aborted before production was complete. No more information will become available without further action to trigger another image production sequence. If the ERROR flag was not also set in this image update, then accessing any of the data in the image will restart the production again, probably from the beginning.

See Also:
imageUpdate(java.awt.Image, int, int, int, int, int) sample code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) , Constant Field Values
Method Detail

imageUpdate sample code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.image.ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

boolean imageUpdate(Image sample code for java.awt.Image definition code for java.awt.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. Asynchronous interfaces are method calls such as getWidth(ImageObserver) and drawImage(img, x, y, ImageObserver) which take an ImageObserver object as an argument. Those methods register the caller as interested either in information about the overall image itself (in the case of getWidth(ImageObserver)) or about an output version of an image (in the case of the drawImage(img, x, y, [w, h,] ImageObserver) call).

This method should return true if further updates are needed or false if the required information has been acquired. The image which was being tracked is passed in using the img argument. Various constants are combined to form the infoflags argument which indicates what information about the image is now available. The interpretation of the x, y, width, and height arguments depends on the contents of the infoflags argument.

The infoflags argument should be the bitwise inclusive OR of the following flags: WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT.

Parameters:
img - the image being observed.
infoflags - the bitwise inclusive OR of the following flags: WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT.
x - the x coordinate.
y - the y coordinate.
width - the width.
height - the height.
Returns:
false if the infoflags indicate that the image is completely loaded; true otherwise.
See Also:
WIDTH sample code for java.awt.image.ImageObserver.WIDTH definition code for java.awt.image.ImageObserver.WIDTH , HEIGHT sample code for java.awt.image.ImageObserver.HEIGHT definition code for java.awt.image.ImageObserver.HEIGHT , PROPERTIES sample code for java.awt.image.ImageObserver.PROPERTIES definition code for java.awt.image.ImageObserver.PROPERTIES , SOMEBITS sample code for java.awt.image.ImageObserver.SOMEBITS definition code for java.awt.image.ImageObserver.SOMEBITS , FRAMEBITS sample code for java.awt.image.ImageObserver.FRAMEBITS definition code for java.awt.image.ImageObserver.FRAMEBITS , ALLBITS sample code for java.awt.image.ImageObserver.ALLBITS definition code for java.awt.image.ImageObserver.ALLBITS , ERROR sample code for java.awt.image.ImageObserver.ERROR definition code for java.awt.image.ImageObserver.ERROR , ABORT sample code for java.awt.image.ImageObserver.ABORT definition code for java.awt.image.ImageObserver.ABORT , Image.getWidth(java.awt.image.ImageObserver) sample code for java.awt.Image.getWidth(java.awt.image.ImageObserver) definition code for java.awt.Image.getWidth(java.awt.image.ImageObserver) , Image.getHeight(java.awt.image.ImageObserver) sample code for java.awt.Image.getHeight(java.awt.image.ImageObserver) definition code for java.awt.Image.getHeight(java.awt.image.ImageObserver) , Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver) sample code for java.awt.Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver)