Java Doc for BufferedImagePeer.java in  » 6.0-JDK-Modules » j2me » sun » awt » image » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » sun.awt.image 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


sun.awt.image.BufferedImagePeer

All known Subclasses:   sun.awt.pocketpc.PPCSubImage,  sun.awt.gtk.GdkSubImage,  sun.awt.qt.QtImage,  java.awt.QtImage,  java.awt.MWImage,  sun.awt.pocketpc.PPCImage,  sun.awt.gtk.GdkImage,  sun.awt.qt.QtSubImage,
BufferedImagePeer
public interface BufferedImagePeer (Code)
Provides a peer for the implementation of BufferedImage. In basis and personal profile, BufferedImage is a very much stripped down version of its J2SE couterpart. In effect, it only allows the getting and setting of RGBs and cannot be constructed with any public constructors. Instead, it can only be constructed by the GraphicsConfiguration.createCompatiableImage method. The result is that BufferedImage in basis and personal is abstract and final and an instance can only be created via the factory method. This has the advantage of reducing the graphics formats to be supported by BufferedImage to the formats of the native graphics library. To implement BufferedImage this interface is used to provide an interface to the implemntation. BufferedImage delegates its method calls to an instance of this interface.
author:
   Nicholas Allen




Method Summary
 voidflush()
     Flushes all resources being used to cache optimization information.
 ColorModelgetColorModel()
     Returns the ColorModel.
 GraphicsgetGraphics()
     This method returns a Graphics2D , but is here for backwards compatibility.
 intgetHeight()
     Returns the height of the BufferedImage.
 intgetHeight(ImageObserver observer)
     Returns the actual height of the image.
 ObjectgetProperty(String name, ImageObserver observer)
     Returns a property of the image by name.
 ObjectgetProperty(String name)
     Returns a property of the image by name.
 String[]getPropertyNames()
     Returns an array of names recognized by BufferedImagePeer.getProperty(String) getProperty(String) or null, if no property names are recognized.
 intgetRGB(int x, int y)
     Returns an integer pixel in the default RGB color model (TYPE_INT_ARGB) and default sRGB colorspace.
 int[]getRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)
     Returns an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, from a portion of the image data.
 ImageProducergetSource()
     Returns the object that produces the pixels for the image.
 BufferedImagegetSubimage(int x, int y, int w, int h)
     Returns a subimage defined by a specified rectangular region. The returned BufferedImage shares the same data array as the original image. x, y the coordinates of the upper-left corner of thespecified rectangular region
Parameters:
  w - the width of the specified rectangular region
Parameters:
  h - the height of the specified rectangular region a BufferedImage that is the subimage of thisBufferedImage.
 intgetType()
     Returns the image type.
 intgetWidth()
     Returns the width of the BufferedImage.
 intgetWidth(ImageObserver observer)
     Returns the actual width of the image.
 voidsetRGB(int x, int y, int rgb)
     Sets a pixel in this BufferedImage to the specified RGB value.
 voidsetRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)
     Sets an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, into a portion of the image data.



Method Detail
flush
void flush()(Code)
Flushes all resources being used to cache optimization information. The underlying pixel data is unaffected.



getColorModel
ColorModel getColorModel()(Code)
Returns the ColorModel. the ColorModel of thisBufferedImage.



getGraphics
Graphics getGraphics()(Code)
This method returns a Graphics2D , but is here for backwards compatibility. BufferedImagePeer.createGraphics() createGraphics is more convenient, since it is declared to return a Graphics2D. a Graphics2D, which can be used to draw intothis image.



getHeight
int getHeight()(Code)
Returns the height of the BufferedImage. the height of this BufferedImage.



getHeight
int getHeight(ImageObserver observer)(Code)
Returns the actual height of the image. If the height is not known yet then the ImageObserver is notified later and -1 is returned.
Parameters:
  observer - the ImageObserver that receivesinformation about the image the height of the image or -1 if the heightis not yet known.
See Also:   java.awt.Image.getWidth(ImageObserver)
See Also:   ImageObserver



getProperty
Object getProperty(String name, ImageObserver observer)(Code)
Returns a property of the image by name. Individual property names are defined by the various image formats. If a property is not defined for a particular image, this method returns the UndefinedProperty field. If the properties for this image are not yet known, then this method returns null and the ImageObserver object is notified later. The property name "comment" should be used to store an optional comment that can be presented to the user as a description of the image, its source, or its author.
Parameters:
  name - the property name
Parameters:
  observer - the ImageObserver that receivesnotification regarding image information an Object that is the property referred to by thespecified name or null if theproperties of this image are not yet known.
See Also:   ImageObserver
See Also:   java.awt.Image.UndefinedProperty



getProperty
Object getProperty(String name)(Code)
Returns a property of the image by name.
Parameters:
  name - the property name an Object that is the property referred to bythe specified name.



getPropertyNames
String[] getPropertyNames()(Code)
Returns an array of names recognized by BufferedImagePeer.getProperty(String) getProperty(String) or null, if no property names are recognized. a String array containing all of the propertynames that getProperty(String) recognizes;or null if no property names are recognized.



getRGB
int getRGB(int x, int y)(Code)
Returns an integer pixel in the default RGB color model (TYPE_INT_ARGB) and default sRGB colorspace. Color conversion takes place if this default model does not match the image ColorModel. There are only 8-bits of precision for each color component in the returned data when using this method. x, y the coordinates of the pixel from which to getthe pixel in the default RGB color model and sRGBcolor space an integer pixel in the default RGB color model anddefault sRGB colorspace.



getRGB
int[] getRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)(Code)
Returns an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, from a portion of the image data. Color conversion takes place if the default model does not match the image ColorModel. There are only 8-bits of precision for each color component in the returned data when using this method. With a specified coordinate (x, y) in the image, the ARGB pixel can be accessed in this way:
 pixel   = rgbArray[offset + (y-startY)*scansize + (x-startX)];
 
startX,  startY the starting coordinates
Parameters:
  w - width of region
Parameters:
  h - height of region
Parameters:
  rgbArray - if not null, the rgb pixels arewritten here
Parameters:
  offset - offset into the rgbArray
Parameters:
  scansize - scanline stride for the rgbArray array of RGB pixels. IllegalArgumentException if an unknowndatatype is specified



getSource
ImageProducer getSource()(Code)
Returns the object that produces the pixels for the image. the ImageProducer that is used to produce thepixels for this image.
See Also:   ImageProducer



getSubimage
BufferedImage getSubimage(int x, int y, int w, int h)(Code)
Returns a subimage defined by a specified rectangular region. The returned BufferedImage shares the same data array as the original image. x, y the coordinates of the upper-left corner of thespecified rectangular region
Parameters:
  w - the width of the specified rectangular region
Parameters:
  h - the height of the specified rectangular region a BufferedImage that is the subimage of thisBufferedImage. RasterFormatException if the specifiedarea is not contained within this BufferedImage.



getType
int getType()(Code)
Returns the image type. If it is not one of the known types, TYPE_CUSTOM is returned. the image type of this BufferedImage.
See Also:   BufferedImagePeer.TYPE_INT_RGB
See Also:   BufferedImagePeer.TYPE_INT_ARGB
See Also:   BufferedImagePeer.TYPE_INT_ARGB_PRE
See Also:   BufferedImagePeer.TYPE_INT_BGR
See Also:   BufferedImagePeer.TYPE_3BYTE_BGR
See Also:   BufferedImagePeer.TYPE_4BYTE_ABGR
See Also:   BufferedImagePeer.TYPE_4BYTE_ABGR_PRE
See Also:   BufferedImagePeer.TYPE_BYTE_GRAY
See Also:   BufferedImagePeer.TYPE_BYTE_BINARY
See Also:   BufferedImagePeer.TYPE_BYTE_INDEXED
See Also:   BufferedImagePeer.TYPE_USHORT_GRAY
See Also:   BufferedImagePeer.TYPE_USHORT_565_RGB
See Also:   BufferedImagePeer.TYPE_USHORT_555_RGB
See Also:   BufferedImagePeer.TYPE_CUSTOM



getWidth
int getWidth()(Code)
Returns the width of the BufferedImage. the width of this BufferedImage.



getWidth
int getWidth(ImageObserver observer)(Code)
Returns the actual width of the image. If the width is not known yet then the ImageObserver is notified later and -1 is returned.
Parameters:
  observer - the ImageObserver that receivesinformation about the image the width of the image or -1 if the widthis not yet known.
See Also:   java.awt.Image.getHeight(ImageObserver)
See Also:   ImageObserver



setRGB
void setRGB(int x, int y, int rgb)(Code)
Sets a pixel in this BufferedImage to the specified RGB value. The pixel is assumed to be in the default RGB color model, TYPE_INT_ARGB, and default sRGB color space. For images with an IndexColorModel, the index with the nearest color is chosen. x, y the coordinates of the pixel to set
Parameters:
  rgb - the RGB value



setRGB
void setRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)(Code)
Sets an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, into a portion of the image data. Color conversion takes place if the default model does not match the image ColorModel. There are only 8-bits of precision for each color component in the returned data when using this method. With a specified coordinate (x, y) in the this image, the ARGB pixel can be accessed in this way:
 pixel   = rgbArray[offset + (y-startY)*scansize + (x-startX)];
 
WARNING: No dithering takes place. startX, startY the starting coordinates
Parameters:
  w - width of the region
Parameters:
  h - height of the region
Parameters:
  rgbArray - the rgb pixels
Parameters:
  offset - offset into the rgbArray
Parameters:
  scansize - scanline stride for the rgbArray



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.